From 46d33dd2016cd1a4af23dd42192ac5dad4a155dd Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 27 Feb 2026 13:47:36 -0800 Subject: [PATCH 1/2] brew CI: install with --HEAD if necessary Signed-off-by: Steve Peters --- .../lib/project-default-devel-homebrew-amd64.bash | 12 ++++++++++-- jenkins-scripts/lib/project-install-homebrew.bash | 10 +++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash b/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash index b2daaf437..c041a606e 100644 --- a/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash +++ b/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash @@ -67,11 +67,19 @@ then echo '# END SECTION' fi +echo "# BEGIN SECTION: check if ${PROJECT_FORMULA} is HEAD formula" +# Install with --HEAD if formula lacks a stable URL +HEAD_FLAG="" +if brew ruby -e "exit '${PROJECT_FORMULA}'.f.stable.nil?"; then + HEAD_FLAG="--HEAD" +fi +echo '# END SECTION' + echo "# BEGIN SECTION: install ${PROJECT_FORMULA} dependencies" # Process the package dependencies -brew install ${PROJECT_FORMULA} ${PROJECT_ARGS} --only-dependencies +brew install ${PROJECT_FORMULA} ${PROJECT_ARGS} --only-dependencies ${HEAD_FLAG} # the following is needed to install :build dependencies of a formula -brew install $(brew deps --1 --include-build ${PROJECT_FORMULA}) +brew install $(brew deps --1 --include-build ${PROJECT_FORMULA}) ${HEAD_FLAG} # pytest is needed to run python tests with junit xml output PIP_PACKAGES_NEEDED="${PIP_PACKAGES_NEEDED} pytest" diff --git a/jenkins-scripts/lib/project-install-homebrew.bash b/jenkins-scripts/lib/project-install-homebrew.bash index f28626e80..a17976583 100644 --- a/jenkins-scripts/lib/project-install-homebrew.bash +++ b/jenkins-scripts/lib/project-install-homebrew.bash @@ -54,8 +54,16 @@ then echo '# END SECTION' fi +echo "# BEGIN SECTION: check if ${BOTTLE_NAME} is HEAD formula" +# Install with --HEAD if formula lacks a stable URL +HEAD_FLAG="" +if brew ruby -e "exit '${BOTTLE_NAME}'.f.stable.nil?"; then + HEAD_FLAG="--HEAD" +fi +echo '# END SECTION' + echo "# BEGIN SECTION: install ${BOTTLE_NAME}" -brew install --include-test ${BOTTLE_NAME} +brew install --include-test ${BOTTLE_NAME} ${HEAD_FLAG} # add X11 path so glxinfo can be found export PATH="${PATH}:/opt/X11/bin" From 1542462d128268532f7d0e3bc06bb09bf7679130 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 27 Feb 2026 15:25:05 -0800 Subject: [PATCH 2/2] revert HEAD_FLAG for include-build dependencies Signed-off-by: Steve Peters --- jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash b/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash index c041a606e..661afcd8c 100644 --- a/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash +++ b/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash @@ -79,7 +79,7 @@ echo "# BEGIN SECTION: install ${PROJECT_FORMULA} dependencies" # Process the package dependencies brew install ${PROJECT_FORMULA} ${PROJECT_ARGS} --only-dependencies ${HEAD_FLAG} # the following is needed to install :build dependencies of a formula -brew install $(brew deps --1 --include-build ${PROJECT_FORMULA}) ${HEAD_FLAG} +brew install $(brew deps --1 --include-build ${PROJECT_FORMULA}) # pytest is needed to run python tests with junit xml output PIP_PACKAGES_NEEDED="${PIP_PACKAGES_NEEDED} pytest"