Skip to content

ci: build each architecture on a native runner - #60

Merged
guillaume-sainthillier merged 1 commit into
mainfrom
ci/native-arm-builds
Oct 12, 2026
Merged

guillaume-sainthillier merged 1 commit into
mainfrom
ci/native-arm-builds

Conversation

@guillaume-sainthillier

Copy link
Copy Markdown
Member

arm64 images were built under QEMU on amd64 runners. In the last scheduled run, compiling the extensions of 8.5-symfony took 876 s for arm64 vs 67 s for amd64, so the -symfony / -ci jobs took 7–16 min.

  • Native runners: every image is built once per architecture: ubuntu-24.04 and ubuntu-24.04-arm (free for public repos). No more QEMU.
  • Push by digest, then publish: build jobs push untagged images by digest and upload the digest as an artifact. A new Publish (<path>) job per image tags both digests as one multi-platform image with docker buildx imagetools create. It refuses to move a tag if one architecture is missing, and still publishes the other images if one fails (!cancelled()).
  • Build cache per image and architecture: scope=<path>-<arch>. All 23 jobs shared the default scope and overwrote each other's cache; the last scheduled run reused 0 steps.
  • Workflow changes rebuild everything on PRs: the "changed path" check now also looks at this workflow file, so this PR builds all 46 jobs instead of none.
  • Timeouts: build 90 → 30 min, publish 10 min. CI passed now also needs publish, which is skipped on PRs.

The image list is written once (image: &images) and reused by the publish matrix through a YAML anchor.

Checked: actionlint passes, and the publish script was dry-run with 0, 1 and 2 digests (fails, fails, builds the expected imagetools create -t … -t … repo@sha256:… repo@sha256:… command). The build half runs on this PR; the publish half only runs on main, so the first push after merging is the one to watch.

#57 (PHP 8.6) also edits the image list and will need a rebase after this one.

arm64 images were built under QEMU on amd64 runners. Compiling the PHP
extensions of 8.5-symfony took 876 s for arm64 against 67 s for amd64, so
the -symfony and -ci jobs ran 7-16 minutes.

Each image is now built once per architecture, arm64 on ubuntu-24.04-arm
(free for public repositories), and pushed untagged by digest. A publish
job per image then tags the two digests as one multi-platform image, and
refuses to if one architecture is missing.

- Build cache: one GitHub Actions cache scope per image and architecture.
  All jobs shared the default scope and overwrote each other's cache; the
  last scheduled run reused none of it.
- Pull requests that change the workflow rebuild every image, so CI
  changes are tested before they reach main.
- Build timeout: 90 -> 30 minutes.
@guillaume-sainthillier
guillaume-sainthillier merged commit 8f16f9f into main Oct 12, 2026
49 checks passed
@guillaume-sainthillier
guillaume-sainthillier deleted the ci/native-arm-builds branch October 12, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant