Repository navigation
ci(testing): build the minimal image natively per architecture (draft) - #181
Merged
Merged
Conversation
The minimal job built 3 PHP variants x {amd64, arm64} sequentially in one job with arm64
emulated by QEMU: about 27 min per variant, 88 min total. Per-step timings from the 10-27 run show
why: the PHP extension compile (docker-php-ext-configure/install) took 24.3 min on emulated arm64
and 1.6 min on native amd64; the whole variant summed to 27.5 min emulated vs 2.4 min native.
build-minimal is now a matrix of {php83, php84, php85} x {amd64 on ubuntu-latest, arm64 on
ubuntu-24.04-arm}; each leg builds only its own architecture and pushes by digest (no tag).
merge-minimal turns each variant's two digests into the published tags with
'docker buildx imagetools create' and fails unless every tag carries linux/amd64 and
linux/arm64. scan-minimal (one leg per variant) keeps the Grype gate and report labels;
promote needs all three scans and does the same single SSM write as before.
Unchanged: triggers, concurrency, the tag set (<VERSION>-php83/-php84/-php85, bare <VERSION> and
:testing on php85), the full-stack job, and the shape of the published image (amd64 + arm64 +
attestations). New: a workflow_dispatch dry_run input that publishes only
<VERSION>-nativetest-php8x tags, never the bare tag or :testing, and skips the promote. It must be
dispatched from testing (the testing environment admits only that branch).
Verified: actionlint clean; the merge-and-verify commands run against a local registry produce one
index digest for all tags, both platforms, and 2 attestation manifests, matching the shape of
20261020-001-php85. Not run here: a real build on ubuntu-24.04-arm.
Co-Authored-By: Claude Sonnet 5.5 <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.
Why
The minimal publish takes about 88 minutes: 3 PHP variants x {amd64, arm64} built one after another in a single job, with arm64 emulated by QEMU. Per-step timings from the 2026-10-27 run (
publish-testing, run 40561303824) show where it goes. For one variant:docker-php-ext-configure/install (PHP extension compile)apt-getupdate/installA native arm64 leg should take about the amd64 time (~2.5 min of build work plus export and runner setup). Estimate: ~10-15 min total instead of 88; not measured on a real arm runner yet.
What changes (
publish-testing.ymlonly)build-minimal: matrix {php83, php84, php85} x {amd64 onubuntu-latest, arm64 onubuntu-24.04-arm}. Each leg builds only its own architecture, no QEMU, and pushes by digest (no tag), uploading the digest as an artifact.merge-minimal: per variant,docker buildx imagetools createpoints the real tags at one multi-arch index, then fails unless every tag carries both linux/amd64 and linux/arm64.scan-minimal: one Grype leg per variant (same action, samepublished-minimal-php8xlabels;fail-fast: falseso all three reports upload).promote: needs all three scans, then the same single SSM write as before. A critical finding still blocks the promote.grype_reportnow depends onscan-minimalandpublish-full.workflow_dispatchinputdry_run: builds, merges and scans under<VERSION>-nativetest-php8xonly. It never moves the bare<VERSION>tag or:testingand skips the promote.Unchanged
Triggers, concurrency group, the tag set (
<VERSION>-php83/-php84/-php85, bare<VERSION>and:testingon php85), the bundle fetch + sha256 verification, the context assembly, the full-stack job, and the published image shape (amd64 + arm64 + 2 attestation manifests). It is still one tag per image: the per-arch images exist only as untagged digests referenced by the index, and GA still promotes the index digest.Verification
actionlint: clean.simplerisk/simplerisk-minimal:20261020-001-php85on Docker Hub.ubuntu-24.04-arm, the Grype matrix, or the dry-run path. Nothing here has executed in Actions yet.Open questions / risks
ubuntu-24.04-armavailable to this repo? The repo is public, so GitHub's free arm runners should apply, but org runner settings were not readable to confirm.testingenvironment only admits thetestingbranch, so the first run cannot happen from this branch. Plan: merge, then dispatch fromtestingwithdry_run=trueand check the-nativetest-tags (both architectures, scans green), then let the next normal push be the first live run. This PR stays a draft until that is agreed.Follow-up (not in this PR)
An arm64 smoke test after the merge (for example, exercising
set_db_ssl_flagsagainst the arm64 image's ownmysql) would have caught the MariaDB-client flag problem fixed in #180.🤖 Generated with Claude Code