Repository navigation
Re-apply Blacksmith macOS CI/CD runner migration #4984
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
adfea65
ci: add temporary Blacksmith macOS capacity probe
lawrencecchen b3a6da0
Re-apply Blacksmith macOS CI/CD runner migration
lawrencecchen 316e73b
ci: route macOS runners through MACOS_RUNNER repo variables
lawrencecchen 2a06dc9
ci: make manual perf/e2e runner default follow MACOS_RUNNER var
lawrencecchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # macOS CI runners | ||
|
|
||
| All paid macOS CI/CD jobs pick their runner from two repository variables instead of a hardcoded label: | ||
|
|
||
| - `MACOS_RUNNER_15` for macOS 15 jobs (most jobs, plus the e2e/perf defaults) | ||
| - `MACOS_RUNNER_26` for macOS 26 jobs (release, nightly, the `release-build` job, compat) | ||
|
|
||
| Workflows reference them as `runs-on: ${{ vars.MACOS_RUNNER_15 || 'warp-macos-15-arm64-6x' }}`. If a variable is unset, the job falls back to WarpBuild, so CI is never broken by a missing variable. | ||
|
|
||
| ## Switch Blacksmith <-> WarpBuild | ||
|
|
||
| The switch is a repo-variable change. It takes effect on the next workflow run, with no PR or commit. | ||
|
|
||
| Use Blacksmith (default): | ||
|
|
||
| ```bash | ||
| gh variable set MACOS_RUNNER_15 --repo manaflow-ai/cmux -b blacksmith-6vcpu-macos-15 | ||
| gh variable set MACOS_RUNNER_26 --repo manaflow-ai/cmux -b blacksmith-6vcpu-macos-26 | ||
| ``` | ||
|
|
||
| Fall back to WarpBuild (e.g. Blacksmith macOS capacity is queuing, as happened in https://github.com/manaflow-ai/cmux/pull/4926): | ||
|
|
||
| ```bash | ||
| gh variable delete MACOS_RUNNER_15 --repo manaflow-ai/cmux | ||
| gh variable delete MACOS_RUNNER_26 --repo manaflow-ai/cmux | ||
| ``` | ||
|
|
||
| Deleting the variables reverts to the WarpBuild fallback baked into the workflows. You can also set them explicitly to `warp-macos-15-arm64-6x` / `warp-macos-26-arm64-6x`. | ||
|
|
||
| Check current values: | ||
|
|
||
| ```bash | ||
| gh variable list --repo manaflow-ai/cmux | ||
| ``` | ||
|
|
||
| ## Manual runs | ||
|
|
||
| `perf-activation.yml` and `test-e2e.yml` keep a `runner` choice input that defaults to `auto`. `auto` (and the empty `pull_request` case for perf) follows `MACOS_RUNNER_15` then the Warp fallback, so flipping the repo variable also redirects these workflows. An explicit choice wins over the variable; both dropdowns expose `warp-macos-15-arm64-6x` / `warp-macos-26-arm64-6x` so an operator can pick Warp directly during a Blacksmith outage. `test-e2e.yml` also keeps `depot-macos-*` choices and a Depot identity guard for GUI-activation runs. | ||
|
|
||
| ## Guard | ||
|
|
||
| `tests/test_ci_self_hosted_guard.sh` (run by the `workflow-guard-tests` job) asserts every paid macOS job references `vars.MACOS_RUNNER_*` or a Blacksmith/Warp label, so a job can never silently fall back to a free GitHub-hosted runner. Keep new labels in `.github/actionlint.yaml`. |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unconditional sudo with no fallback unlike test-e2e pattern
Low Severity
The
launchctl asuserwrapper unconditionally requiressudo -nwithout first checking availability, unlike the robust pattern intest-e2e.ymlwhich guards withif sudo -n true 2>/dev/nulland falls back to direct execution with a warning. Thestat -f %Su /dev/consolecall also lacks2>/dev/null || trueerror suppression and the$CONSOLE_USER != "root"safety check. Sinceperf-activation.ymltriggers onpull_requestand can fall back to WarpBuild runners (whenvars.MACOS_RUNNER_15is unset), this step will hard-fail on any runner without passwordless sudo, where the old directswiftinvocation would have succeeded.Reviewed by Cursor Bugbot for commit 316e73b. Configure here.