Skip to content

ci: native arm64 runners for PR builds (replace QEMU emulation)#868

Merged
nimish-ks merged 1 commit intomainfrom
ci/native-arm64-pr-builds
May 1, 2026
Merged

ci: native arm64 runners for PR builds (replace QEMU emulation)#868
nimish-ks merged 1 commit intomainfrom
ci/native-arm64-pr-builds

Conversation

@nimish-ks
Copy link
Copy Markdown
Member

@nimish-ks nimish-ks commented May 1, 2026

Summary

Splits the staging/PR Docker build off the legacy single-runner buildx flow onto a matrix that uses native runners per architecture, then merges them into a single multi-arch manifest by digest. Release builds (the :version + :latest push to phasehq/backend and phasehq/frontend) are intentionally left on the existing flow — this PR only touches the staging path.

Cherry-picked from #820 (workflow changes only — the URL routing changes from that PR are not included here).

What changed

  • test job is now a separate job that both build paths depend on.
  • New build job (PR/staging only): matrix over ubuntu-latest (amd64) and ubuntu-24.04-arm (arm64), each builds + pushes by digest to DockerHub and GHCR.
  • New merge job (PR/staging only): downloads digest artifacts and assembles a multi-arch manifest with docker buildx imagetools create.
  • Existing build_and_push job kept for release path (is_pr != 'true'), unchanged in substance.
  • Per-arch GHA cache scopes (scope=backend-amd64 / scope=backend-arm64) so the two arches don't fight over a shared cache key.
  • Explicit permissions: blocks on every job to satisfy CodeQL.

Why

ARM64 staging builds were going through QEMU on an AMD64 runner — typically ~10–20 minutes per arch, serialized inside one buildx invocation. Native arm64 runners build in their own architecture and run in parallel with amd64, so wall-clock drops substantially.

Not in scope (follow-up)

Release builds (:version + :latest) still use the old single-runner cross-compile flow. Migrating those should be a follow-up once we've validated the staging matrix in CI.

Test plan

  • PR build kicks off testbuild (amd64) + build (arm64) in parallel → merge
  • phasehq/backend-staging:<sha> and ghcr.io/phasehq/console/backend-staging:<sha> resolve as multi-arch manifests
  • phasehq/frontend-staging:<sha> and ghcr.io/phasehq/console/frontend-staging:<sha> resolve as multi-arch manifests
  • docker manifest inspect on each shows both linux/amd64 and linux/arm64 entries
  • Release build path (is_pr != 'true') still produces multi-arch phasehq/backend:<version> / :latest and the frontend equivalents

…lation

PR builds now use parallel native runners (ubuntu-latest for amd64,
ubuntu-24.04-arm for arm64) with digest-based manifest merging. Release
builds retain the existing buildx cross-compilation flow.

Also adds explicit permissions blocks to satisfy CodeQL.
@nimish-ks nimish-ks requested a review from rohan-chaturvedi May 1, 2026 09:55
@nimish-ks nimish-ks self-assigned this May 1, 2026
@nimish-ks nimish-ks merged commit 316b454 into main May 1, 2026
15 checks passed
@nimish-ks nimish-ks deleted the ci/native-arm64-pr-builds branch May 1, 2026 09:58
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.

2 participants