Skip to content

Commit 9f57798

Browse files
committed
try to pin cmake to 3.31.6
1 parent 4953167 commit 9f57798

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/basic.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,25 @@ jobs:
129129
shell: bash
130130
working-directory: ${{env.CMAKE_BUILD_DIR}}
131131
run: |
132-
brew list cmake &>/dev/null || brew install cmake
133132
brew list lcov &>/dev/null || brew install lcov
134133
brew list openssl@${{matrix.openssl-version}} &>/dev/null || brew install openssl@${{matrix.openssl-version}}
135134
brew list ossp-uuid &>/dev/null || brew install ossp-uuid
136135
brew list catch2 &>/dev/null || brew install catch2
136+
# taken from https://github.com/actions/runner-images/pull/12791/files
137+
# Pin cmake to 3.31.6 because 4.x is not backward compatible
138+
cmake_commit="b4e46db74e74a8c1650b38b1da222284ce1ec5ce"
139+
tap_name="local/pinned"
140+
echo "Creating local tap (no git)..."
141+
brew tap-new --no-git "$tap_name" >/dev/null
142+
cmake_formula_dir="$(brew --repo "$tap_name")/Formula"
143+
mkdir -p "$cmake_formula_dir"
144+
cmake_rb_link="https://raw.githubusercontent.com/Homebrew/homebrew-core/$cmake_commit/Formula/c/cmake.rb"
145+
cmake_rb_path="$cmake_formula_dir/cmake.rb"
146+
echo "Downloading cmake.rb from $cmake_rb_link"
147+
curl -fsSL --retry 3 --retry-delay 5 "$cmake_rb_link" -o "$cmake_rb_path"
148+
echo "Installing cmake 3.31.6 from custom tap..."
149+
brew install "$tap_name/cmake"
150+
137151
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DAWSSDK_VERSION=$AWSSDK_VER \
138152
-DGCSSDK_VERSION=$GCSSDK_VER
139153
# GCS SDK needs OPENSSL_ROOT_DIR set for MAC, so build here

0 commit comments

Comments
 (0)