mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-12 00:10:56 +02:00
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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user