File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1616
1717set -euo pipefail
1818
19+ # Homebrew cleanup
20+ git -C " /usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew || echo " Failed to set Homebrew origin"
21+ 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"
22+ brew untap homebrew/cask --force || echo " Failed to untap homebrew/cask"
23+ brew untap homebrew/core --force || echo " Failed to untap homebrew/core"
24+ brew untap homebrew/cask-versions --force || echo " Failed to untap homebrew/cask-versions"
25+ brew cleanup -s || echo " brew cleanup failed"
26+ brew update-reset
27+
1928source " $( dirname " $0 " ) /../../lib/init.sh"
2029source module ci/lib/io.sh
2130
Original file line number Diff line number Diff line change @@ -34,8 +34,24 @@ brew install bash ninja
3434# Install a specific version of CMake to match our GHA builds
3535(
3636 cd " ${HOME} "
37+ # Create a temporary local tap
38+ mkdir -p user/homebrew-tap/Formula
39+ cd user/homebrew-tap
40+ git init
41+
42+ # Download the Homebrew formula for CMake==3.27.2
3743 curl -fsSL -o cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/fd21fcf239bcd0231c9fed5719403ec128151af4/Formula/cmake.rb
38- brew install cmake.rb
44+ mv cmake.rb ./Formula/
45+
46+ git add .
47+ git commit -m " Add CMake formula"
48+
49+ # Tap the local repository
50+ brew tap user/homebrew-tap " ${HOME} /user/homebrew-tap"
51+
52+ # Uninstall existing CMake and install CMake from the local tap
53+ brew uninstall cmake
54+ brew install --build-from-source user/homebrew-tap/cmake
3955)
4056
4157io::log_h2 " Using CMake version"
You can’t perform that action at this time.
0 commit comments