Skip to content

Commit d1ca0af

Browse files
authored
ci: replace custom cmake script with action (microsoft#2780)
## Summary: Helps (but doesn't fix) microsoft#2789 Replace the custom bash script to pin cmake with an action that upstream React Native is using.
1 parent f9b9069 commit d1ca0af

1 file changed

Lines changed: 4 additions & 25 deletions

File tree

  • .github/actions/microsoft-setup-toolchain

.github/actions/microsoft-setup-toolchain/action.yml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,10 @@ inputs:
2222
runs:
2323
using: composite
2424
steps:
25-
- name: Pin cmake version
26-
if: ${{ inputs.platform == 'macos' || inputs.platform == 'ios' || inputs.platform == 'visionos' }}
27-
run: |
28-
brew uninstall cmake
29-
# Copied from https://github.com/actions/runner-images/pull/12791
30-
# Pin cmake to 3.31.6 due to a backward compatibility issue
31-
# https://github.com/actions/runner-images/issues/11926
32-
cmake_commit="b4e46db74e74a8c1650b38b1da222284ce1ec5ce"
33-
tap_name="local/pinned"
34-
35-
echo "Creating local tap (no git)..."
36-
brew tap-new --no-git "$tap_name" >/dev/null
37-
38-
cmake_formula_dir="$(brew --repo "$tap_name")/Formula"
39-
mkdir -p "$cmake_formula_dir"
40-
41-
cmake_rb_link="https://raw.githubusercontent.com/Homebrew/homebrew-core/$cmake_commit/Formula/c/cmake.rb"
42-
cmake_rb_path="$cmake_formula_dir/cmake.rb"
43-
44-
echo "Downloading cmake.rb from $cmake_rb_link"
45-
curl -fsSL "$cmake_rb_link" -o "$cmake_rb_path"
46-
47-
echo "Installing cmake 3.31.6 from custom tap..."
48-
brew install "$tap_name/cmake"
49-
shell: bash
25+
- name: Install cmake
26+
uses: jwlawson/actions-setup-cmake@v2
27+
with:
28+
cmake-version: '3.26.4'
5029
- name: Set up Ccache
5130
id: setup-ccache
5231
if: ${{ inputs.platform == 'ios' || inputs.platform == 'macos' || inputs.platform == 'visionos' }}

0 commit comments

Comments
 (0)