-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MacOS version detection #1546
Conversation
bazelbuild#1542 relied on platform.mac_ver() to detect the MacOS version, which did not work as expected. Consequently, the previous PR led the CI to activate an incorrect version of Xcode. This behavior has been fixed by this change. Related to bazelbuild#1431.
Does that work though? Here we set Xcode 13, bazel still tried to use Xcode 14.2. |
Xcode support on Bazel CI basically means running the following two commands:
However, rules_apple seems to be doing its own thing by setting the |
@fweikert Doesn't setting |
@fweikert I guess we can verify if
IIUC, https://cs.opensource.google/bazel/bazel/+/master:tools/osx/xcode_configure.bzl;l=195-197, this is now rules_apple detects the default xcode version and uses it to populate |
So I did some testing, and yes, the Xcode version is correctly selected, but it's an invalid Xcode version for the macOS version that the machine is on. At the moment, when we set As mentioned in this comment, is there a way for us to run on the Mac Studio machines running Monterey instead of Ventura? In that way, we should be able to correctly use Xcode 13.0. See here the build logs: bazelbuild/rules_apple#1820 |
Seems if we set the xcode_version we aren't being routed to a machine that supports that version (sort of the opposite of what the logic here is touching). We want Xcode 13, which means we can't get placed on Ventura machines. |
I'm not sure how well rules_apple works on Apple Silicon machines, if that's not a concern, you can simply change BTW, how soon will you move the Xcode 14? I guess at some point, we'll have to upgrade the OS of the MacStudio machines as well. Until the virtualization of the mac fleet is done, there is no easy way to switch OS versions for Mac machines on Bazel CI. |
bazelbuild#1542 relied on platform.mac_ver() to detect the MacOS version, which did not work as expected. Consequently, the previous PR led the CI to activate an incorrect version of Xcode. This behavior has been fixed by this change. Related to bazelbuild#1431. Users can still request a specific Xcode version in their CI config.
#1542 relied on platform.mac_ver() to detect the MacOS version, which did not work as expected. Consequently, the previous PR led the CI to activate an incorrect version of Xcode. This behavior has been fixed by this change.
Related to #1431.
Users can still request a specific Xcode version in their CI config.