[PLAT-5019] Split multi-arch php-laravel builds across native runners#134
Merged
Conversation
Build amd64 and arm64 on ubuntu-latest and ubuntu-24.04-arm in parallel, use per-arch registry cache keys, and merge manifests with buildx imagetools. Keeps single-platform builds unchanged for repos on linux/amd64 only. PLAT-5019 Co-authored-by: Cursor <cursoragent@cursor.com>
smichels082625
approved these changes
Jun 18, 2026
pdodgen-revparts
approved these changes
Jun 22, 2026
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.
Jira
https://revolutionparts.atlassian.net/browse/PLAT-5019
Summary
platformsincludes bothlinux/amd64andlinux/arm64, build each architecture on a native GitHub Actions runner in parallel instead of QEMU on a single amd64 runnercli-v0.24.0-amd64,cli-v0.24.0-arm64) with per-arch registry cache keys (buildcache-cli-amd64,buildcache-cli-arm64)docker buildx imagetools create(cli-TAG,cli-latest, etc.)linux/amd64default) unchangedMotivation
Listings merge-main multi-arch CLI builds took ~62 minutes because arm64 PHP extension compilation ran under QEMU on
ubuntu-latest. Native arm64 runners should cut that to roughly the slowest single-arch build.Pipeline (after this change)
Example: Listings merge-main (CLI-only multi-arch).
flowchart TB subgraph listings["listings — Merge Main Workflow"] tag["Calculate Build Tag<br/>ubuntu-latest · ~9s"] tag --> build["build-and-push-images<br/>calls encodium/.github<br/>php-laravel-build-push.yaml"] build --> prerelease["Prerelease + GH release"] build --> deploy["Deploy to staging EKS"] end subgraph shared["encodium/.github — php-laravel-build-push.yaml"] direction TB subgraph cli_amd64["Build + Push CLI Image (amd64)"] direction TB a1["ubuntu-latest"] a2["composer install + artisan cache"] a3["docker buildx push<br/>platform: linux/amd64"] a4["tag: cli-vX.Y.Z-amd64<br/>cache: buildcache-cli-amd64"] a1 --> a2 --> a3 --> a4 end subgraph cli_arm64["Build + Push CLI Image (arm64)"] direction TB b1["ubuntu-24.04-arm<br/>native Graviton runner"] b2["composer install + artisan cache"] b3["docker buildx push<br/>platform: linux/arm64"] b4["tag: cli-vX.Y.Z-arm64<br/>cache: buildcache-cli-arm64"] b1 --> b2 --> b3 --> b4 end merge["Merge CLI Image Manifest<br/>ubuntu-latest"] merge_step["docker buildx imagetools create<br/>→ cli-vX.Y.Z + cli-latest<br/>multi-arch manifest"] build --> cli_amd64 build --> cli_arm64 cli_amd64 --> merge cli_arm64 --> merge merge --> merge_step end merge_step --> ghcr["GHCR<br/>ghcr.io/encodium/listings:cli-TAG"]Before vs after (CLI image build)
flowchart LR subgraph before["Before PLAT-5019"] direction TB old["ubuntu-latest only"] qemu["Single buildx job<br/>platforms: amd64 + arm64"] qemu_arm["arm64 layers via QEMU<br/>~59 min PHP ext compile"] old --> qemu --> qemu_arm end subgraph after["After PLAT-5019"] direction TB par["Parallel native builds"] amd["amd64 · ubuntu-latest · ~36s"] arm["arm64 · ubuntu-24.04-arm · native"] m["imagetools merge · ~30s"] par --> amd par --> arm amd --> m arm --> m endWhen all three image types are enabled (app + webserver + CLI), each image type follows the same pattern: 2 parallel arch jobs + 1 merge job → final tags (
TAG/latest,webserver-TAG/webserver-latest,cli-TAG/cli-latest). Those three families still run in parallel with each other.Test plan
cli-TAGmanifest lists both architectures