Repository navigation
Rebuild aarch64 natively when publish finds no artifact - #681
Merged
Merged
Conversation
A merged aarch64 tree without a PR build artifact (expired after 7 days, or a dispatch) was rebuilt on the x86 droplet under QEMU: omarchy-mac-boot took ~167 of the 240 minutes. A new job builds it on ubuntu-24.04-arm the way build-pr.yml does and uploads it under the same label, so the publish job signs and uploads it on the droplet like a PR artifact. The plan logs reuse or rebuild for every package; x86_64, signing and the publish concurrency are unchanged.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
#671 moved aarch64 PR builds to GitHub's
ubuntu-24.04-armrunners, but publish.yml still built a merged aarch64 tree on the x86 droplet, under QEMU, whenever it had no PR artifact: a PR merged more than 7 days after its last build, or aworkflow_dispatch. omarchy-mac-boot takes ~167 of the job's 240 minutes that way (itscheck()runs omarchy-mac's kill -9 interruption matrices, ~15x slower emulated), and the figure grows with every test added upstream.What changed
changesjob now decides, per package and architecture, whether a build artifact exists for the merged tree, and logs the decision (reuse the build artifact (run N, expires …),rebuild natively on ubuntu-24.04-arm, orbuild in the publish job on the self-hosted builder). The same table goes into the run summary.rebuildjob builds each aarch64 entry without an artifact onubuntu-24.04-arm, with the same checkout, builder image andbin/build --mirror edgecall as build-pr.yml's aarch64 path. It makes the same "already published at master's version" check the publish job makes, and uploads under the usual<pkg>-<arch>-<tree hash>label. It has no secrets and a read-only token.publishjob waits for it. Collect finds that artifact the way it finds a PR artifact, and says which one it took (artifact from this run's native aarch64 rebuild/reusing the build artifact from run N). It never builds aarch64 under emulation any more: an aarch64 tree without an artifact is recorded asnative-build-failed, and the job stops before anything is signed or uploaded, as a failed build did before. The report shows "rebuilt natively on arm64".publishenvironment and its secrets, the run-levelpublishconcurrency group (one writer).resultnow also fails whenchangesfails; before, a failed plan skipped publish andresultpassed.Tested
Fork run on maralcbr/omarchy-pkgs, branch
proof/109-publish-native: this commit plus a harness commit that triggers on that branch, runs the publish job on a hosted runner without thepublishenvironment, skips the Publish step and drops the report job. Nothing was signed or uploaded. omarchy-mac-boot and tzupdate had pkgrel bumped to 99 plus a marker line, so no tree matches a published one.Four pushes (runs on maralcbr/omarchy-pkgs):
omarchy-mac-boot-aarch64-64ba2af…: no build artifact: rebuild natively on ubuntu-24.04-arm, and the same for tzupdate aarch64, while tzupdate x86_64 gotbuild in the publish job on the self-hosted builder. omarchy-mac-boot 20260927-99 took 10m44s natively, withcheck()at 9m22s and all 277ok(it was ~167 min under QEMU). Collect loggedartifact from this run's native aarch64 rebuildfor both aarch64 packages and built tzupdate x86_64 inline, as before.reuse the build artifact (run 36349009718, expires …), the rebuild job was skipped, and Collect loggedreusing the build artifact from run 36349009718.no artifact from the native rebuild; not building aarch64 under emulationand wrote the record withnative-build-failed, with no slots and nothing emulated.resultwent red.already published at master's version, nothing to buildand uploaded nothing, and Collect skipped both architectures.actionlint reports nothing new (same 5 pre-existing shellcheck notes as master).
Alternatives rejected
publishgroup, so every later merge waits behind it. It hides the cost rather than removing it.check()to know it is emulated (qemu-user reportsaarch64, so bin/build would have to pass a flag through), and it makes a package's test coverage depend on which host built it. With aarch64 now native in both build-pr and publish, no CI path runs these tests emulated.Separate proposal (not implemented)
If an emulated aarch64 build ever comes back (say, a host-side
bin/build --arch aarch64on an x86 box), sampling is cheap and safe as belt-and-braces. omarchy-mac's own CI (tests.yml) runsboot/test/allin full, natively, on every PR, so it would lose nothing. The shape:OMARCHY_TEST_INTERRUPT_SAMPLE=<n>makes theinterrupt after|during|midloops in mac-migrate-mx-test.sh, mac-migrate-legacy-test.sh and mac-migrate-test.sh run every n-th step, plus always the first and last. Only bin/build sets it, and only when the build arch differs from the host arch. Unset keeps today's full matrix. It needs the omarchy-mac owner's agreement, so it isn't in this PR.Notes
publishconcurrency group replaces a pending run when a newer merge arrives (only the running one is protected), and each run plans only its own push's diff, so three quick merges can skip the middle one's packages. The fork proof shows this happening. Artifact reuse also trusts the label, not the producing workflow.native-build-failedrecord, and nothing is published. Re-run all jobs after fixing the cause.