Skip to content

Commit 406b82d

Browse files
cxzl25williamhyun
authored andcommitted
ORC-2046: Fix macos-14-arm64 CI failure
### What changes were proposed in this pull request? ### Why are the changes needed? ``` actions/runner-images#12934 ``` Success https://github.com/apache/orc/actions/runs/17684310687/job/50265505914 ``` Runner Image Image: macos-14-arm64 Version: 20250901.1774 Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20250901.1774/images/macos/macos-14-arm64-Readme.md ``` Failed https://github.com/apache/orc/actions/runs/18735596344/job/53524232003?pr=2452 ``` Runner Image Image: macos-14-arm64 Version: 20251013.0032 Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20251013.0032/images/macos/macos-14-arm64-Readme.md ``` ### How was this patch tested? ### Was this patch authored or co-authored using generative AI tooling? Closes #2455 from cxzl25/env_cmake. Authored-by: sychen <sychen@ctrip.com> Signed-off-by: William Hyun <william@apache.org>
1 parent e53c19b commit 406b82d

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,30 @@ jobs:
7373
distribution: zulu
7474
java-version: ${{ matrix.java }}
7575
cache: 'maven'
76+
- name: Install CMake
77+
if: matrix.os == 'macos-14'
78+
run: |
79+
# Pin cmake to 3.31.6 due to a backward compatibility issue
80+
cmake_commit="b4e46db74e74a8c1650b38b1da222284ce1ec5ce"
81+
tap_name="local/pinned"
82+
83+
echo "Creating local tap (no git)..."
84+
brew tap-new --no-git "$tap_name" >/dev/null
85+
86+
cmake_formula_dir="$(brew --repo "$tap_name")/Formula"
87+
mkdir -p "$cmake_formula_dir"
88+
89+
cmake_rb_link="https://raw.githubusercontent.com/Homebrew/homebrew-core/$cmake_commit/Formula/c/cmake.rb"
90+
cmake_rb_path="$cmake_formula_dir/cmake.rb"
91+
92+
echo "Downloading cmake.rb from $cmake_rb_link"
93+
curl -fsSL "$cmake_rb_link" -o "$cmake_rb_path"
94+
95+
echo "uninstalling existing cmake..."
96+
brew uninstall cmake
97+
98+
echo "Installing cmake 3.31.6 from custom tap..."
99+
brew install "$tap_name/cmake"
76100
- name: "Test"
77101
run: |
78102
mkdir -p ~/.m2

0 commit comments

Comments
 (0)