ci(switch): run fused build only after offline selftest

Avoid burning the self-hosted Mac when the ubuntu packaging gate fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Andrew Quenehen
2026-08-02 22:08:49 -03:00
parent 669c9f4d8b
commit d13064ee64
3 changed files with 10 additions and 4 deletions
+5 -3
View File
@@ -144,9 +144,11 @@ jobs:
switch-build:
name: Switch fused build
needs: switch-changes
if: >-
needs.switch-changes.outputs.changed == 'true'
needs: [switch-changes, switch-selftest]
if: |
always()
&& needs.switch-changes.outputs.changed == 'true'
&& needs.switch-selftest.result == 'success'
&& github.repository == 'bryanthaboi/gen1recomp'
&& (github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name == github.repository)
+2 -1
View File
@@ -146,7 +146,8 @@ runs:
head is that repo (same-repo push/PR). **Fork repository** CI never runs
fused. **Fork → canonical PRs** also skip Switch fused (offline selftest
still runs) so untrusted head code is not executed on the self-hosted Mac;
iOS device build eligibility is unchanged.
iOS device build eligibility is unchanged. Fused also waits for a successful
offline selftest before starting on the Mac runner.
3. On successful PR fused builds, a follow-up workflow posts a PR comment
linking the Actions artifact named `gen1recomp-switch-nro`
(comment tag `switch-build-result`; see
+3
View File
@@ -74,6 +74,9 @@ do
local rest = ci:sub(start)
local nextJob = rest:find("\n [%w_-]+:", 2)
local block = nextJob and rest:sub(1, nextJob - 1) or rest
mustContain(block, "needs: [switch-changes, switch-selftest]", "switch-build needs")
mustContain(block, "needs.switch-selftest.result == 'success'", "switch-build waits for selftest")
mustContain(block, "always()", "switch-build always() for skipped deps")
mustContain(block, "needs.switch-changes.outputs.changed == 'true'", "switch-build")
mustContain(block, "bryanthaboi/gen1recomp", "switch-build canonical")
mustContain(block, '["self-hosted", "macOS"]', "switch-build runner")