[macOS] Pin CMake to 3.31.6 due to a backward compatibility issue for all macOS images.#12791
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR pins CMake to version 3.31.6 across all macOS images to resolve backward compatibility issues with newer CMake versions. The implementation switches from installing a downloaded formula file directly to using a custom Homebrew tap for better package management.
- Replaces direct formula file installation with a custom Homebrew tap approach
- Maintains the same CMake version (3.31.6) and commit reference for consistency
- Adds proper tap creation and formula management for the pinned CMake version
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| cmake_rb_path="$cmake_formula_dir/cmake.rb" | ||
|
|
||
| echo "Downloading cmake.rb from $cmake_rb_link" | ||
| curl -fsSL "$cmake_rb_link" -o "$cmake_rb_path" |
There was a problem hiding this comment.
The code removes the use of download_with_retry function and replaces it with a simple curl command. This removes the retry mechanism that was previously in place, which could make the installation less reliable in case of network issues.
| curl -fsSL "$cmake_rb_link" -o "$cmake_rb_path" | |
| curl -fsSL --retry 5 --retry-delay 5 "$cmake_rb_link" -o "$cmake_rb_path" |
|
Could latest CMake 3.31.8 not be used? |
|
Hey @xavier2k6! Unfortunately 3.31.6 is the latest available version in brew: https://github.com/Homebrew/homebrew-core/commits/0da738a3fdbb58b610a3918af076fd4ea6433e3a/Formula/c/cmake.rb |
|
I feel that this fix breaks more than it fixes: Some Homebrew packages depend on CMake for building, and will try to install it. Since CMake now belongs to the With this change, we now have to Since all of Homebrew follows their main branch, it feels weird to make CMake an exception. |
|
Hey @kintel! Good point. Please open an issue - we'll work on the options. |
Workaround for actions/runner-images#12791
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
What is the backward compatibility issue that this solves? It seems to me this causes far more issues than it solves. The biggest issue is that no homebrew package that depends on cmake can be installed. |
It will be fixed next week when cmake will be unpin. |
I'm curious on this one also |
Description
Related issue:
Check list