Build aarch64 PR packages natively on GitHub's arm64 runners

The droplet pool is x86, so aarch64 builds ran under QEMU about 30x slower;
omarchy-mac-boot's check() took 2h47m of the 180-minute job limit. Heavy
packages stay on the droplets until a native build of each is shown to fit.
This commit is contained in:
Marcelo Alcantara committed 2026-09-27 23:44:28 +10:00
1 parent 3a6c921c73
commit 7c646625c2
2 files changed
+18 -8

No files matched your search

+11 -5
View File
@@ -1,8 +1,9 @@
name: Build changed packages name: Build changed packages
# Build every package directory a PR touches, one job per package per arch, on # Build every package directory a PR touches, one job per package per arch:
# the self-hosted droplet pool. Artifacts are unsigned; publish.yml signs and # x86_64 on the self-hosted droplet pool, aarch64 natively on GitHub's arm64
# publishes them on merge. # runners. Artifacts are unsigned; publish.yml signs and publishes them on
# merge.
# #
# Tooling runs from the base branch; a PR supplies only pkgbuilds/. The # Tooling runs from the base branch; a PR supplies only pkgbuilds/. The
# vouch gate limits who may spend compute; this limits what their PR can run. # vouch gate limits who may spend compute; this limits what their PR can run.
@@ -159,13 +160,18 @@ jobs:
build: build:
needs: changes needs: changes
if: needs.changes.outputs.count != '0' if: needs.changes.outputs.count != '0'
runs-on: [self-hosted, omarchy-builder] # The droplets are x86, so aarch64 there runs under QEMU, about 30x
# slower: omarchy-mac-boot's check() took 2h47m of the 180 minutes.
# aarch64 builds natively on GitHub's arm64 runners (4 vCPU, 16 GB),
# except the packages listed here, which stay on the 32-vCPU droplets
# until a native build of each has been shown to fit.
runs-on: ${{ (matrix.arch == 'aarch64' && !contains(fromJSON('["linux-aurora","strata","obs-studio"]'), matrix.package)) && 'ubuntu-24.04-arm' || fromJSON('["self-hosted","omarchy-builder"]') }}
timeout-minutes: 180 timeout-minutes: 180
strategy: strategy:
fail-fast: false fail-fast: false
matrix: ${{ fromJson(needs.changes.outputs.matrix) }} matrix: ${{ fromJson(needs.changes.outputs.matrix) }}
steps: steps:
# Tooling from base: everything that executes on this droplet's host # Tooling from base: everything that executes on this runner's host
# (bin/, helpers/, build/) comes from the base branch. Only the PR's # (bin/, helpers/, build/) comes from the base branch. Only the PR's
# package directories are overlaid. A PR can therefore change what # package directories are overlaid. A PR can therefore change what
# gets built, never how the runner builds it. A PR that changes both # gets built, never how the runner builds it. A PR that changes both
+7 -3
View File
@@ -6,8 +6,10 @@ signing on merge exactly as before.
## Pieces ## Pieces
- `.github/workflows/build-pr.yml` — on a PR touching `pkgbuilds/**`, one job - `.github/workflows/build-pr.yml` — on a PR touching `pkgbuilds/**`, one job
per changed package on runners labelled `omarchy-builder`. Uploads the per changed package on runners labelled `omarchy-builder`. aarch64 jobs
unsigned `.pkg.tar.zst` as a workflow artifact (7 days). run on GitHub's native `ubuntu-24.04-arm` runners instead, except the few
heavy packages the workflow keeps on the droplets. Uploads the unsigned
`.pkg.tar.zst` as a workflow artifact (7 days).
- `runner-cloud-init.yaml` — Ubuntu 24.04 user-data: docker + buildx, the - `runner-cloud-init.yaml` — Ubuntu 24.04 user-data: docker + buildx, the
GitHub runner registered `--ephemeral`, runs one job, powers off. GitHub runner registered `--ephemeral`, runs one job, powers off.
- `controller.sh` — systemd timer every minute on a small always-on droplet. - `controller.sh` — systemd timer every minute on a small always-on droplet.
@@ -67,7 +69,9 @@ Watch it with `journalctl -u omarchy-controller -f` on the box.
- Publish is incremental and immutable: pull the channel db, refuse - Publish is incremental and immutable: pull the channel db, refuse
different bytes under an existing name, accept identical bytes, upload different bytes under an existing name, accept identical bytes, upload
packages then signatures then the db. packages then signatures then the db.
- aarch64 under QEMU with credential-preserving binfmt. - aarch64 under QEMU with credential-preserving binfmt. PR builds now run
aarch64 natively on `ubuntu-24.04-arm` (QEMU was ~30x slower); publish.yml
still builds under QEMU when a merged tree has no PR artifact.
- Vouch gate: collaborators, `.github/VOUCHED.td`, or the `build-approved` - Vouch gate: collaborators, `.github/VOUCHED.td`, or the `build-approved`
label; denounced authors cannot be overridden by the label. label; denounced authors cannot be overridden by the label.
- Tests run on PRs only; `result`, `self-tests`, `build-isolation` are the - Tests run on PRs only; `result`, `self-tests`, `build-isolation` are the