From ffa6ff91c68ced8ed531947d9535171574f98ea8 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Mon, 25 Aug 2025 20:17:35 -0400 Subject: [PATCH 01/21] fix(kokoro): Update homebrew to fix build environment issues --- ci/kokoro/macos/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index 67bdaa68c97a9..9c57b13f6d50b 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -16,6 +16,9 @@ set -euo pipefail +# TEMPORARY WORKAROUND for outdated homebrew in Kokoro images. +brew update-reset + source "$(dirname "$0")/../../lib/init.sh" source module ci/lib/io.sh From 4a49d438763de4ee8e505ec4b9be9647c59f700d Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Tue, 26 Aug 2025 13:17:35 -0400 Subject: [PATCH 02/21] chore: Add debug output to macOS build script --- ci/kokoro/macos/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index 9c57b13f6d50b..76c2c509f78ba 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -16,6 +16,11 @@ set -euo pipefail +# New debug output to confirm which script is running +echo "================================================================" +echo "== EXECUTING SCRIPT FROM 'preview-kokoro-fix' BRANCH ==" +echo "================================================================" + # TEMPORARY WORKAROUND for outdated homebrew in Kokoro images. brew update-reset From 7aa08426ccd7f07d36a579282cac06971095fc4f Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Tue, 26 Aug 2025 13:57:48 -0400 Subject: [PATCH 03/21] fix: clean homebrew --- ci/kokoro/macos/build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index 76c2c509f78ba..cda6a8188ff9e 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -21,8 +21,15 @@ echo "================================================================" echo "== EXECUTING SCRIPT FROM 'preview-kokoro-fix' BRANCH ==" echo "================================================================" -# TEMPORARY WORKAROUND for outdated homebrew in Kokoro images. -brew update-reset +# TEMPORARY WORKAROUND for corrupted homebrew taps in Kokoro images. +echo "==> Cleaning up Homebrew taps" +brew untap homebrew/cask --force || true +brew untap homebrew/cask-versions --force || true +brew untap homebrew/core --force || true + +# Perform a fresh update +echo "==> Updating Homebrew" +brew update -v source "$(dirname "$0")/../../lib/init.sh" source module ci/lib/io.sh From cba0ac22806524a73c372c4c4ab84fee97ee0ce4 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Tue, 26 Aug 2025 18:03:03 -0400 Subject: [PATCH 04/21] fix: add brew update-reset --- ci/kokoro/macos/builds/cmake-vcpkg.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index b5e50a9a8dbad..e189ea738b0e3 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -28,6 +28,7 @@ NCPU="$(sysctl -n hw.logicalcpu)" readonly NCPU io::log_h2 "Update or install dependencies" +brew update-reset # Install bash and ninja brew install bash ninja From ac8f53257763fae634ef05e97d0806f42cc7b75f Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Tue, 26 Aug 2025 20:09:37 -0400 Subject: [PATCH 05/21] chore: add bunch of logs --- ci/kokoro/macos/builds/cmake-vcpkg.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index e189ea738b0e3..013226f0a6d76 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -28,9 +28,25 @@ NCPU="$(sysctl -n hw.logicalcpu)" readonly NCPU io::log_h2 "Update or install dependencies" + +io::log_h2 "DEBUG: Brew version before update" +brew --version +io::log_h2 "DEBUG: Brew doctor before update" +brew doctor + +# TEMPORARY WORKAROUND for outdated homebrew in Kokoro images. +echo "==> Forcefully resetting Homebrew" brew update-reset + +io::log_h2 "DEBUG: Brew version after update-reset" +brew --version +io::log_h2 "DEBUG: Brew doctor after update-reset" +brew doctor + # Install bash and ninja +io::log_h2 "DEBUG: Before brew install bash ninja" brew install bash ninja +io::log_h2 "DEBUG: After brew install bash ninja" # Install a specific version of CMake to match our GHA builds ( From 3caab66c819804f8fbf2d485d1af362358e553ac Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Tue, 26 Aug 2025 21:28:21 -0400 Subject: [PATCH 06/21] chore: add fixes to homebrew in build.sh --- ci/kokoro/macos/build.sh | 34 ++++++++++++++++++++------- ci/kokoro/macos/builds/cmake-vcpkg.sh | 9 ------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index cda6a8188ff9e..93e35dc8250c9 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -21,15 +21,31 @@ echo "================================================================" echo "== EXECUTING SCRIPT FROM 'preview-kokoro-fix' BRANCH ==" echo "================================================================" -# TEMPORARY WORKAROUND for corrupted homebrew taps in Kokoro images. -echo "==> Cleaning up Homebrew taps" -brew untap homebrew/cask --force || true -brew untap homebrew/cask-versions --force || true -brew untap homebrew/core --force || true - -# Perform a fresh update -echo "==> Updating Homebrew" -brew update -v +# ===== START HOMEBREW FIXES ===== +io::log_h2 "Attempting to fix Homebrew environment" + +# Check initial state +io::log_h2 "DEBUG: Brew version before any fixes" +brew --version || echo "brew version failed" +io::log_h2 "DEBUG: Brew doctor before any fixes" +brew doctor || echo "brew doctor failed" + +# Fix the git origin for Homebrew itself +io::log_h2 "DEBUG: Setting Homebrew git origin" +git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew || echo "Failed to set Homebrew origin, continuing..." + +# Forcefully reset Homebrew to clean up any corruption +io::log_h2 "DEBUG: Running brew update-reset" +brew update-reset + +# Check state after reset +io::log_h2 "DEBUG: Brew version after update-reset" +brew --version || echo "brew version failed" +io::log_h2 "DEBUG: Brew doctor after update-reset" +brew doctor || echo "brew doctor failed" + +io::log_h2 "DEBUG: Homebrew environment fixes complete" +# ===== END HOMEBREW FIXES ===== source "$(dirname "$0")/../../lib/init.sh" source module ci/lib/io.sh diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index 013226f0a6d76..357c9e6e50b51 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -34,15 +34,6 @@ brew --version io::log_h2 "DEBUG: Brew doctor before update" brew doctor -# TEMPORARY WORKAROUND for outdated homebrew in Kokoro images. -echo "==> Forcefully resetting Homebrew" -brew update-reset - -io::log_h2 "DEBUG: Brew version after update-reset" -brew --version -io::log_h2 "DEBUG: Brew doctor after update-reset" -brew doctor - # Install bash and ninja io::log_h2 "DEBUG: Before brew install bash ninja" brew install bash ninja From 70eac13ff2fbf6a5171b1a8f5130153e571d31f4 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Tue, 26 Aug 2025 21:40:06 -0400 Subject: [PATCH 07/21] chore: use echo --- ci/kokoro/macos/build.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index 93e35dc8250c9..8b624d44c1894 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -22,29 +22,29 @@ echo "== EXECUTING SCRIPT FROM 'preview-kokoro-fix' BRANCH ==" echo "================================================================" # ===== START HOMEBREW FIXES ===== -io::log_h2 "Attempting to fix Homebrew environment" +echo "== Attempting to fix Homebrew environment" # Check initial state -io::log_h2 "DEBUG: Brew version before any fixes" +echo "== DEBUG: Brew version before any fixes" brew --version || echo "brew version failed" -io::log_h2 "DEBUG: Brew doctor before any fixes" +echo "== DEBUG: Brew doctor before any fixes" brew doctor || echo "brew doctor failed" # Fix the git origin for Homebrew itself -io::log_h2 "DEBUG: Setting Homebrew git origin" +echo "== DEBUG: Setting Homebrew git origin" git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew || echo "Failed to set Homebrew origin, continuing..." # Forcefully reset Homebrew to clean up any corruption -io::log_h2 "DEBUG: Running brew update-reset" +echo "== DEBUG: Running brew update-reset" brew update-reset # Check state after reset -io::log_h2 "DEBUG: Brew version after update-reset" +echo "== DEBUG: Brew version after update-reset" brew --version || echo "brew version failed" -io::log_h2 "DEBUG: Brew doctor after update-reset" +echo "== DEBUG: Brew doctor after update-reset" brew doctor || echo "brew doctor failed" -io::log_h2 "DEBUG: Homebrew environment fixes complete" +echo "== DEBUG: Homebrew environment fixes complete" # ===== END HOMEBREW FIXES ===== source "$(dirname "$0")/../../lib/init.sh" From 695ff37f996759560ace57c94ac119e0ab368675 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 02:49:19 -0400 Subject: [PATCH 08/21] chore: brew fixes --- ci/kokoro/macos/build.sh | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index 8b624d44c1894..fe6c35fd5c8b5 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -22,29 +22,41 @@ echo "== EXECUTING SCRIPT FROM 'preview-kokoro-fix' BRANCH ==" echo "================================================================" # ===== START HOMEBREW FIXES ===== -echo "== Attempting to fix Homebrew environment" +echo "Attempting to fix Homebrew environment" # Check initial state -echo "== DEBUG: Brew version before any fixes" +echo "DEBUG: Brew version before any fixes" brew --version || echo "brew version failed" -echo "== DEBUG: Brew doctor before any fixes" +echo "DEBUG: Brew doctor before any fixes" brew doctor || echo "brew doctor failed" -# Fix the git origin for Homebrew itself -echo "== DEBUG: Setting Homebrew git origin" -git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew || echo "Failed to set Homebrew origin, continuing..." +# 1. Fix Git Origins as suggested by brew doctor +echo "DEBUG: Setting Homebrew git origins" +git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew || echo "Failed to set Homebrew origin" +git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core || echo "Failed to set homebrew-core origin" -# Forcefully reset Homebrew to clean up any corruption -echo "== DEBUG: Running brew update-reset" +# 2. Untap unnecessary taps as suggested by brew doctor +echo "DEBUG: Untapping unnecessary taps" +brew untap homebrew/cask --force || echo "Failed to untap homebrew/cask" +brew untap homebrew/core --force || echo "Failed to untap homebrew/core" +# Also untap cask-versions just in case +brew untap homebrew/cask-versions --force || echo "Failed to untap homebrew/cask-versions" + +# 3. Clean up broken symlinks +echo "DEBUG: Cleaning up Homebrew" +brew cleanup -f || echo "brew cleanup failed" + +# 4. Forcefully reset Homebrew +echo "DEBUG: Running brew update-reset" brew update-reset -# Check state after reset -echo "== DEBUG: Brew version after update-reset" +# Check state after fixes +echo "DEBUG: Brew version after fixes" brew --version || echo "brew version failed" -echo "== DEBUG: Brew doctor after update-reset" +echo "DEBUG: Brew doctor after fixes" brew doctor || echo "brew doctor failed" -echo "== DEBUG: Homebrew environment fixes complete" +echo "DEBUG: Homebrew environment fixes complete" # ===== END HOMEBREW FIXES ===== source "$(dirname "$0")/../../lib/init.sh" @@ -102,7 +114,7 @@ printf "%10s %s\n" "clang:" "$(clang --version 2>&1 | head -1)" printf "%10s %s\n" "brew:" "$(brew --version 2>&1 | head -1)" printf "%10s %s\n" "branch:" "${BRANCH}" -io::log_h2 "Brew packages" +echo "Brew packages" export HOMEBREW_NO_AUTO_UPDATE=1 export HOMEBREW_NO_INSTALL_CLEANUP=1 brew list --versions --formula From 0b0604fa6043dcbf2a3c128b2bfe7a40d5e21ded Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 03:23:58 -0400 Subject: [PATCH 09/21] chore: brew fixes 2 --- ci/kokoro/macos/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index fe6c35fd5c8b5..1a630313201db 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -44,7 +44,7 @@ brew untap homebrew/cask-versions --force || echo "Failed to untap homebrew/cask # 3. Clean up broken symlinks echo "DEBUG: Cleaning up Homebrew" -brew cleanup -f || echo "brew cleanup failed" +brew cleanup -s || echo "brew cleanup failed" # 4. Forcefully reset Homebrew echo "DEBUG: Running brew update-reset" From 6ad5744da4728f76969e821828d7d6ab56aea77f Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 03:59:10 -0400 Subject: [PATCH 10/21] chore: disable brew doctor --- ci/kokoro/macos/build.sh | 2 +- ci/kokoro/macos/builds/cmake-vcpkg.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index 1a630313201db..cb5d86cc39ed6 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -54,7 +54,7 @@ brew update-reset echo "DEBUG: Brew version after fixes" brew --version || echo "brew version failed" echo "DEBUG: Brew doctor after fixes" -brew doctor || echo "brew doctor failed" +# brew doctor || echo "brew doctor failed" echo "DEBUG: Homebrew environment fixes complete" # ===== END HOMEBREW FIXES ===== diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index 357c9e6e50b51..46aca2bb9dd5a 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -32,7 +32,7 @@ io::log_h2 "Update or install dependencies" io::log_h2 "DEBUG: Brew version before update" brew --version io::log_h2 "DEBUG: Brew doctor before update" -brew doctor +# brew doctor # Install bash and ninja io::log_h2 "DEBUG: Before brew install bash ninja" From c590056da03819626ea4d22f947098618ea94c8c Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 04:36:16 -0400 Subject: [PATCH 11/21] fix: use brew install for cmake:wqa --- ci/kokoro/macos/builds/cmake-vcpkg.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index 46aca2bb9dd5a..2c573658f2164 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -40,11 +40,7 @@ brew install bash ninja io::log_h2 "DEBUG: After brew install bash ninja" # Install a specific version of CMake to match our GHA builds -( - cd "${HOME}" - curl -fsSL -o cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/fd21fcf239bcd0231c9fed5719403ec128151af4/Formula/cmake.rb - brew install cmake.rb -) +brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/fd21fcf239bcd0231c9fed5719403ec128151af4/Formula/c/cmake.rb io::log_h2 "Using CMake version" cmake --version From c8dd3b0f775e37ee135637f26822d8f0590bf0ba Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 12:23:04 -0400 Subject: [PATCH 12/21] fix: brew install for cmake URL --- ci/kokoro/macos/builds/cmake-vcpkg.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index 2c573658f2164..045bbc8e1493a 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -39,8 +39,10 @@ io::log_h2 "DEBUG: Before brew install bash ninja" brew install bash ninja io::log_h2 "DEBUG: After brew install bash ninja" -# Install a specific version of CMake to match our GHA builds -brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/fd21fcf239bcd0231c9fed5719403ec128151af4/Formula/c/cmake.rb +# Install v3.28.1 CMake +io::log_h2 "DEBUG: Before brew install for cmake" +brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4c210b9063c89a89abd9a6db5bae1b5f4e8fdb7d/Formula/c/cmake.rb +io::log_h2 "DEBUG: After brew install for cmake" io::log_h2 "Using CMake version" cmake --version From 5eab84f8d426408ace584d1abffee4da91cf31da Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 13:04:32 -0400 Subject: [PATCH 13/21] fix: add build-from-source flag for brew install cmake --- ci/kokoro/macos/builds/cmake-vcpkg.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index 045bbc8e1493a..4d4cd943f4ac1 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -34,19 +34,19 @@ brew --version io::log_h2 "DEBUG: Brew doctor before update" # brew doctor -# Install bash and ninja -io::log_h2 "DEBUG: Before brew install bash ninja" -brew install bash ninja -io::log_h2 "DEBUG: After brew install bash ninja" - # Install v3.28.1 CMake io::log_h2 "DEBUG: Before brew install for cmake" -brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4c210b9063c89a89abd9a6db5bae1b5f4e8fdb7d/Formula/c/cmake.rb +brew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/4c210b9063c89a89abd9a6db5bae1b5f4e8fdb7d/Formula/c/cmake.rb io::log_h2 "DEBUG: After brew install for cmake" io::log_h2 "Using CMake version" cmake --version +# Install bash and ninja +io::log_h2 "DEBUG: Before brew install bash ninja" +brew install bash ninja +io::log_h2 "DEBUG: After brew install bash ninja" + # Fetch vcpkg at the specified hash, download to the tmpfs directory when # running on Kokoro. if [[ -z "${KOKORO_ARTIFACTS_DIR:-}" ]]; then From 70460458f638ff8ebcfc5c6507ade4c198ac65b7 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 13:54:06 -0400 Subject: [PATCH 14/21] fix: brew fix in cmake-vcpkg.sh --- ci/kokoro/macos/builds/cmake-vcpkg.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index 4d4cd943f4ac1..2bf6bbb4993a8 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -21,6 +21,31 @@ source module ci/etc/integration-tests-config.sh source module ci/lib/io.sh source module ci/kokoro/lib/vcpkg.sh +# ===== START HOMEBREW FIXES ===== +echo "== Attempting to fix Homebrew environment IN cmake-vcpkg.sh" + +# 1. Fix Git Origins as suggested by brew doctor +echo "== DEBUG: Setting Homebrew git origins" +git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew || echo "Failed to set Homebrew origin" +git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core || echo "Failed to set homebrew-core origin" + +# 2. Untap unnecessary taps as suggested by brew doctor +echo "== DEBUG: Untapping unnecessary taps" +brew untap homebrew/cask --force || echo "Failed to untap homebrew/cask" +brew untap homebrew/core --force || echo "Failed to untap homebrew/core" +brew untap homebrew/cask-versions --force || echo "Failed to untap homebrew/cask-versions" + +# 3. Clean up broken symlinks and scrub the cache +echo "== DEBUG: Cleaning up Homebrew" +brew cleanup -s || echo "brew cleanup failed" + +# 4. Forcefully reset Homebrew +echo "== DEBUG: Running brew update-reset" +brew update-reset + +echo "== DEBUG: Homebrew environment fixes complete IN cmake-vcpkg.sh" +# ===== END HOMEBREW FIXES ===== + readonly SOURCE_DIR="." readonly BINARY_DIR="cmake-out/macos-vcpkg" From dd7fec710aee68699bbb2c2064ceb047ef084ca9 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 14:22:47 -0400 Subject: [PATCH 15/21] fix: run brew doctor 2 times --- ci/kokoro/macos/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index cb5d86cc39ed6..1a630313201db 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -54,7 +54,7 @@ brew update-reset echo "DEBUG: Brew version after fixes" brew --version || echo "brew version failed" echo "DEBUG: Brew doctor after fixes" -# brew doctor || echo "brew doctor failed" +brew doctor || echo "brew doctor failed" echo "DEBUG: Homebrew environment fixes complete" # ===== END HOMEBREW FIXES ===== From a5ed4c0fe120b34025d7e447338a0fdc982a7af4 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 16:36:54 -0400 Subject: [PATCH 16/21] fix: disable 2nd brew doctor --- ci/kokoro/macos/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index 1a630313201db..1fce612ea87d6 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -54,7 +54,7 @@ brew update-reset echo "DEBUG: Brew version after fixes" brew --version || echo "brew version failed" echo "DEBUG: Brew doctor after fixes" -brew doctor || echo "brew doctor failed" +#brew doctor || echo "brew doctor failed" echo "DEBUG: Homebrew environment fixes complete" # ===== END HOMEBREW FIXES ===== From 34d5cf4ac0aea54c3324440b48ffb4bacc313988 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 16:48:22 -0400 Subject: [PATCH 17/21] fix: enable 2nd brew doctor --- ci/kokoro/macos/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index 1fce612ea87d6..1a630313201db 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -54,7 +54,7 @@ brew update-reset echo "DEBUG: Brew version after fixes" brew --version || echo "brew version failed" echo "DEBUG: Brew doctor after fixes" -#brew doctor || echo "brew doctor failed" +brew doctor || echo "brew doctor failed" echo "DEBUG: Homebrew environment fixes complete" # ===== END HOMEBREW FIXES ===== From 05bf45031509d9b820a8c3f6984eba824d8c37d3 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 16:59:29 -0400 Subject: [PATCH 18/21] fix: disable 2nd brew doctor and download cmake.rb --- ci/kokoro/macos/build.sh | 2 +- ci/kokoro/macos/builds/cmake-vcpkg.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ci/kokoro/macos/build.sh b/ci/kokoro/macos/build.sh index 1a630313201db..1fce612ea87d6 100755 --- a/ci/kokoro/macos/build.sh +++ b/ci/kokoro/macos/build.sh @@ -54,7 +54,7 @@ brew update-reset echo "DEBUG: Brew version after fixes" brew --version || echo "brew version failed" echo "DEBUG: Brew doctor after fixes" -brew doctor || echo "brew doctor failed" +#brew doctor || echo "brew doctor failed" echo "DEBUG: Homebrew environment fixes complete" # ===== END HOMEBREW FIXES ===== diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index 2bf6bbb4993a8..490391f4fd986 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -61,7 +61,11 @@ io::log_h2 "DEBUG: Brew doctor before update" # Install v3.28.1 CMake io::log_h2 "DEBUG: Before brew install for cmake" -brew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/4c210b9063c89a89abd9a6db5bae1b5f4e8fdb7d/Formula/c/cmake.rb +( + cd "${HOME}" + curl -fsSL -o cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/fd21fcf239bcd0231c9fed5719403ec128151af4/Formula/cmake.rb + brew install cmake.rb +) io::log_h2 "DEBUG: After brew install for cmake" io::log_h2 "Using CMake version" From 786caeb0850382bca3ace5da499a5bb29d83b68e Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 17:28:05 -0400 Subject: [PATCH 19/21] chore: disable GHA temporarily --- .github/workflows/codeql-analysis.yml | 10 ++-- .../external-account-integration.yml | 14 +++--- .github/workflows/macos-bazel.yml | 30 ++++++------ .github/workflows/macos-cmake.yml | 46 +++++++++---------- .github/workflows/test-runner-untrusted.yml | 22 ++++----- .github/workflows/test-runner.yml | 38 +++++++-------- .github/workflows/windows-bazel.yml | 30 ++++++------ .github/workflows/windows-cmake.yml | 46 +++++++++---------- 8 files changed, 118 insertions(+), 118 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 8aa00d91b395a..19332c6f65b5b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,10 +1,10 @@ name: "CodeQL" -on: - # Run the analysis once every 24 hours. The actual time does not matter - # that much, start with a time that allows for easier troubleshooting. - schedule: - - cron: '00 22 * * *' +# on: +# # Run the analysis once every 24 hours. The actual time does not matter +# # that much, start with a time that allows for easier troubleshooting. +# schedule: +# - cron: '00 22 * * *' jobs: analyze: diff --git a/.github/workflows/external-account-integration.yml b/.github/workflows/external-account-integration.yml index 7ce4cf5dda765..71596eeda637b 100644 --- a/.github/workflows/external-account-integration.yml +++ b/.github/workflows/external-account-integration.yml @@ -1,12 +1,12 @@ name: "External Account Integration" -on: - workflow_call: - inputs: - checkout-ref: - required: true - description: "The ref we want to compile" - type: string +# on: +# workflow_call: +# inputs: +# checkout-ref: +# required: true +# description: "The ref we want to compile" +# type: string permissions: contents: read diff --git a/.github/workflows/macos-bazel.yml b/.github/workflows/macos-bazel.yml index 5af5ef491eb8c..0cf4f93ec50d7 100644 --- a/.github/workflows/macos-bazel.yml +++ b/.github/workflows/macos-bazel.yml @@ -1,20 +1,20 @@ name: macOS-Bazel-Builds -on: - workflow_call: - inputs: - checkout-ref: - required: true - description: "The ref we want to compile" - type: string - bazel-cache-mode: - required: true - description: "READ_WRITE or READ_ONLY" - type: string - execute-integration-tests: - required: true - description: "Integration tests require credentials." - type: boolean +# on: +# workflow_call: +# inputs: +# checkout-ref: +# required: true +# description: "The ref we want to compile" +# type: string +# bazel-cache-mode: +# required: true +# description: "READ_WRITE or READ_ONLY" +# type: string +# execute-integration-tests: +# required: true +# description: "Integration tests require credentials." +# type: boolean permissions: contents: read diff --git a/.github/workflows/macos-cmake.yml b/.github/workflows/macos-cmake.yml index 38e20058dce57..7070d117b83ca 100644 --- a/.github/workflows/macos-cmake.yml +++ b/.github/workflows/macos-cmake.yml @@ -1,28 +1,28 @@ name: macOS-CMake-Builds -on: - workflow_call: - inputs: - checkout-ref: - required: true - description: "The ref we want to compile" - type: string - full-matrix: - required: true - description: "Build the full matrix" - type: boolean - sccache-mode: - required: true - description: "READ_WRITE or DISABLED" - type: string - vcpkg-cache-mode: - required: true - description: "read or readwrite" - type: string - execute-integration-tests: - required: true - description: "Integration tests require credentials." - type: boolean +# on: +# workflow_call: +# inputs: +# checkout-ref: +# required: true +# description: "The ref we want to compile" +# type: string +# full-matrix: +# required: true +# description: "Build the full matrix" +# type: boolean +# sccache-mode: +# required: true +# description: "READ_WRITE or DISABLED" +# type: string +# vcpkg-cache-mode: +# required: true +# description: "read or readwrite" +# type: string +# execute-integration-tests: +# required: true +# description: "Integration tests require credentials." +# type: boolean permissions: contents: read diff --git a/.github/workflows/test-runner-untrusted.yml b/.github/workflows/test-runner-untrusted.yml index 0a5bc0efdf960..8f29b8e7cfa2b 100644 --- a/.github/workflows/test-runner-untrusted.yml +++ b/.github/workflows/test-runner-untrusted.yml @@ -2,17 +2,17 @@ name: "gha: macOS & Windows Untrusted" # Build on pull requests and pushes to `main`. The PR builds will be # non-blocking for now, but that is configured elsewhere. -on: - # Start the build in the context of the target branch. This is considered - # "safe", as the workflow files are already committed. These types of builds - # have access to the secrets in the build, which we need to use the remote - # caches (Bazel and sccache). - pull_request: - types: - - opened - - synchronize - - reopened - workflow_dispatch: +# on: +# # Start the build in the context of the target branch. This is considered +# # "safe", as the workflow files are already committed. These types of builds +# # have access to the secrets in the build, which we need to use the remote +# # caches (Bazel and sccache). +# pull_request: +# types: +# - opened +# - synchronize +# - reopened +# workflow_dispatch: # Cancel in-progress runs of the workflow if somebody adds a new commit to the # PR or branch. That reduces billing, but it creates more noise about cancelled diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index 580708aa7e488..47bfe1950e0e7 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -2,25 +2,25 @@ name: "gha: macOS & Windows" # Build on pull requests and pushes to `main`. The PR builds will be # non-blocking for now, but that is configured elsewhere. -on: - # Start these builds on pushes (think "after the merge") too. Normally there - # are no `ci-gha**` branches in our repository. The contributors to the repo - # can create such branches when testing or troubleshooting builds. In such - # branches we can disable builds (to speed up the testing) or add new ones, - # without impacting the rest of the team. - push: - branches: [ 'v[2-9]**', 'ci-gha**', 'prepare-for-v3.0.0' ] - # Start the build in the context of the target branch. This is considered - # "safe", as the workflow files are already committed. These types of builds - # have access to the secrets in the build, which we need to use the remote - # caches (Bazel and sccache). - pull_request_target: - types: - - opened - - synchronize - - reopened - schedule: - - cron: '0 5 * * 1,2,3,4,5' +# on: +# # Start these builds on pushes (think "after the merge") too. Normally there +# # are no `ci-gha**` branches in our repository. The contributors to the repo +# # can create such branches when testing or troubleshooting builds. In such +# # branches we can disable builds (to speed up the testing) or add new ones, +# # without impacting the rest of the team. +# push: +# branches: [ 'v[2-9]**', 'ci-gha**', 'prepare-for-v3.0.0' ] +# # Start the build in the context of the target branch. This is considered +# # "safe", as the workflow files are already committed. These types of builds +# # have access to the secrets in the build, which we need to use the remote +# # caches (Bazel and sccache). +# pull_request_target: +# types: +# - opened +# - synchronize +# - reopened +# schedule: +# - cron: '0 5 * * 1,2,3,4,5' # Cancel in-progress runs of the workflow if somebody adds a new commit to the # PR or branch. That reduces billing, but it creates more noise about cancelled diff --git a/.github/workflows/windows-bazel.yml b/.github/workflows/windows-bazel.yml index 9ac496fd2cf25..338c0296e7453 100644 --- a/.github/workflows/windows-bazel.yml +++ b/.github/workflows/windows-bazel.yml @@ -1,20 +1,20 @@ name: Windows-Builds -on: - workflow_call: - inputs: - checkout-ref: - required: true - description: "The ref we want to compile" - type: string - bazel-cache-mode: - required: true - description: "READ_WRITE or READ_ONLY" - type: string - execute-integration-tests: - required: true - description: "Integration tests require credentials." - type: boolean +# on: +# workflow_call: +# inputs: +# checkout-ref: +# required: true +# description: "The ref we want to compile" +# type: string +# bazel-cache-mode: +# required: true +# description: "READ_WRITE or READ_ONLY" +# type: string +# execute-integration-tests: +# required: true +# description: "Integration tests require credentials." +# type: boolean permissions: contents: read diff --git a/.github/workflows/windows-cmake.yml b/.github/workflows/windows-cmake.yml index 0a09fc10369af..eb75a60dced7f 100644 --- a/.github/workflows/windows-cmake.yml +++ b/.github/workflows/windows-cmake.yml @@ -1,28 +1,28 @@ name: Windows-Builds -on: - workflow_call: - inputs: - checkout-ref: - required: true - description: "The ref we want to compile" - type: string - full-matrix: - required: true - description: "Build the full matrix" - type: boolean - sccache-mode: - required: true - description: "READ_WRITE or DISABLED" - type: string - vcpkg-cache-mode: - required: true - description: "read or readwrite" - type: string - execute-integration-tests: - required: true - description: "Integration tests require credentials." - type: boolean +# on: +# workflow_call: +# inputs: +# checkout-ref: +# required: true +# description: "The ref we want to compile" +# type: string +# full-matrix: +# required: true +# description: "Build the full matrix" +# type: boolean +# sccache-mode: +# required: true +# description: "READ_WRITE or DISABLED" +# type: string +# vcpkg-cache-mode: +# required: true +# description: "read or readwrite" +# type: string +# execute-integration-tests: +# required: true +# description: "Integration tests require credentials." +# type: boolean permissions: contents: read From 2d847a8c4cf350d8698e04cb153a89afef855404 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 17:28:32 -0400 Subject: [PATCH 20/21] fix: brew install cmake fix --- ci/kokoro/macos/builds/cmake-vcpkg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index 490391f4fd986..9c6b160b1a8d2 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -64,7 +64,7 @@ io::log_h2 "DEBUG: Before brew install for cmake" ( cd "${HOME}" curl -fsSL -o cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/fd21fcf239bcd0231c9fed5719403ec128151af4/Formula/cmake.rb - brew install cmake.rb + brew install --build-from-source ./cmake.rb ) io::log_h2 "DEBUG: After brew install for cmake" From 6831e6c18aef696d5d9fad8513a414c95dd91eb5 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Wed, 27 Aug 2025 20:25:11 -0400 Subject: [PATCH 21/21] fix: create brew tap for cmake --- ci/kokoro/macos/builds/cmake-vcpkg.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ci/kokoro/macos/builds/cmake-vcpkg.sh b/ci/kokoro/macos/builds/cmake-vcpkg.sh index 9c6b160b1a8d2..16087898ecd66 100755 --- a/ci/kokoro/macos/builds/cmake-vcpkg.sh +++ b/ci/kokoro/macos/builds/cmake-vcpkg.sh @@ -59,12 +59,23 @@ brew --version io::log_h2 "DEBUG: Brew doctor before update" # brew doctor -# Install v3.28.1 CMake +# Install v3.27.2 CMake io::log_h2 "DEBUG: Before brew install for cmake" ( cd "${HOME}" + mkdir homebrew-local-tap + cd homebrew-local-tap + git init + mkdir Formula + curl -fsSL -o cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/fd21fcf239bcd0231c9fed5719403ec128151af4/Formula/cmake.rb - brew install --build-from-source ./cmake.rb + mv cmake.rb ./Formula/ + + git add . + git commit -m "Add CMake formula" + + brew tap homebrew-local-tap "${HOME}/homebrew-local-tap" + brew install --build-from-source homebrew-local-tap/cmake ) io::log_h2 "DEBUG: After brew install for cmake"