CI: native arm64 runners, registry buildx cache, drop arm/v7#45
Merged
Conversation
- arm64 jobs run on ubuntu-24.04-arm natively; arm/v7 keeps QEMU but only the older versions (7.3-8.2) still target it. - 8.3-8.5 drop arm/v7 entirely (32-bit ARM has no common modern PHP deployment target and is the slowest QEMU build). - Build phase is now per-(version, platform); a manifest job per version assembles the multi-arch tags from per-arch digests via `docker buildx imagetools create`. - Per-(version, platform) registry cache (`buildcache-VER-SLUG`) speeds up reruns of the compile-heavy 8.3+ images. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Speeds up the GitHub Actions build by (a) splitting the build job per (version, platform) so arm64 slices can run on native ubuntu-24.04-arm runners instead of QEMU, (b) adding a registry-backed buildx cache keyed per (version, platform), and (c) dropping linux/arm/v7 from PHP 8.3+. The original single multi-arch build step is replaced by a digest-only per-arch build followed by a new manifest job that assembles the final tags with docker buildx imagetools create.
Changes:
- Restructured
build.ymlintomatrix→test→build(per arch, digest push) →manifest(per version, tag assembly), with arm64 on native runners and QEMU only for arm/v7. - Added per-
(version, platform)registry cache tagsbuildcache-VER-SLUGfor both main and test images. - Removed
linux/arm/v7from theversions.jsonentries for 8.3, 8.4, and 8.5.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
versions.json |
Drops linux/arm/v7 from the 8.3, 8.4, 8.5 platform lists. |
.github/workflows/build.yml |
Splits build per arch onto native runners, adds registry cache, and adds a manifest job that publishes tags via imagetools create from uploaded digest artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No remaining versions target arm/v7, so QEMU is no longer needed in the build job — every platform now has a native GitHub-hosted runner (amd64 → ubuntu-latest, arm64 → ubuntu-24.04-arm). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot review caught that the debug build's `FROM graze/php-alpine:${V}`
would resolve to whatever `:${V}` was currently published (the previous
master build, or nothing for a first-time version deploy) because the
main image is now pushed by digest only. Override the FROM lookup with
the digest we just built so the debug image is always derived from the
matching commit's main image for the same arch.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Three CI-speed-up changes bundled together, motivated by the post-merge build of #44 spending 30–60 min per PHP 8.3+ job under QEMU emulation:
(version, platform). Thelinux/arm64slices now run onubuntu-24.04-arm(free for public repos) instead of going through QEMU on an amd64 runner. amd64 stays onubuntu-latest. No platform requires QEMU anymore.(version, platform)cache tag (graze/php-alpine:buildcache-VER-SLUG) so subsequent runs reuse layers.linux/arm/v7everywhere. 32-bit ARM has no common modern PHP deployment target and was the worst case under QEMU. Removing it from all versions (not just 8.3+) eliminates QEMU from the workflow entirely and shrinks the build matrix from a hypothetical 31 to 20 jobs.Note on tag continuity: Existing published tags (e.g.
graze/php-alpine:7.4) already include anarm/v7manifest entry. After this PR merges, the next push to master republishes those tags as multi-arch manifests withoutarm/v7. Consumers pulling on alinux/arm/v7host will getno matching manifestuntil they pin to an earlier digest.How the workflow is restructured
matrixjob emits an expanded build matrix: eachversions.jsonentry'splatformsfield is split into per-arch tuples with the right runner attached.testjob is unchanged — single-arch amd64 build + bats, runs on PRs and pushes.buildjob runs per(version, platform), pushes by digest (no tag), uploads digest artifact. No QEMU step.manifestjob runs per version on master push only, downloads digests, and usesdocker buildx imagetools createto publish multi-arch tags including the5/7/8/latest/testaliases.Notes
buildcache-*) appear in Docker Hub alongside real tags; can be moved to a separate cache repo later if too noisy.Test plan
testfor all 12 versions; deploy jobs are skipped on PR.buildmatrix produces 20 jobs; arm64 jobs land onubuntu-24.04-arm.manifestjob assembles correct tags incl.:5/:7/:8/:latest/:testaliases.docker manifest inspect graze/php-alpine:8.5shows amd64 + arm64 only.docker manifest inspect graze/php-alpine:7.4shows amd64 + arm64 only (no arm/v7).🤖 Generated with Claude Code