-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI for latest actions and to use matrix (#841)
Updates GitHub CI to make it easier to add more Bazel/Xcode Versions. Changes: - Update `checkout` and `upload-artifacts` actions to `v4`, this fixes warnings we get on every PR for deprecated Node versions - Add `matrix` strategy for all jobs, this adds a `bazel_version` and `xcode_version` which each job will be configured to run against. We can add Bazel 7 once #795 is done. - Merge the `--config=vfs` and non-vfs job, this can be set with a custom matrix without duplicating the job code. - Remove `--remote-cache` flag, this was set by every job already.
- Loading branch information
1 parent
349ca62
commit 201b82e
Showing
4 changed files
with
97 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Sets up the CI environment. | ||
# | ||
# Required environment variables: | ||
# - XCODE_VERSION: The version of Xcode to use. | ||
|
||
# If flag --no-bzlmod is passed, writes a user.bazelrc file to disable Bzlmod. | ||
if [[ "$*" == *--no-bzlmod* ]]; then | ||
echo "build --noenable_bzlmod" >> user.bazelrc | ||
fi | ||
# If flag --use-remote-cache is passed, writes a user.bazelrc file to enable remote cache. | ||
if [[ "$*" == *--use-remote-cache* ]]; then | ||
echo "build --config=ci_with_caches" >> user.bazelrc | ||
fi | ||
|
||
set -e | ||
# Add the ci config override. | ||
echo "common --config=ci" >> user.bazelrc | ||
|
||
echo "Selecting Xcode for environment" | ||
echo "Xcode before: $(xcode-select -p)" | ||
sudo xcode-select -s "/Applications/Xcode_$XCODE_VERSION.app" | ||
echo "Xcode after: $(xcode-select -p)" | ||
|
||
echo "Running with environment:" | ||
printenv | ||
|
||
sudo xcode-select -p | ||
sudo xcode-select -s /Applications/Xcode_15.2.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters