Skip to content

ci: use native ARM runners for multi-arch Docker builds #744

@outofcoffee

Description

@outofcoffee

Summary

Multi-arch Docker builds using QEMU emulation are slow because buildx emulates the CPU rather than cross-compiling. GitHub now offers native ARM runners (ubuntu-24.04-arm) that can build arm64 images natively.

Proposed change

Replace the single QEMU-emulated multi-platform Docker build with:

  1. A matrix strategy with two parallel jobs — one on ubuntu-latest (amd64) and one on ubuntu-24.04-arm (arm64) — each building natively for its platform
  2. Each job pushes by digest and uploads the digest as an artifact
  3. A final manifest job downloads both digests and creates a multi-arch manifest list

Reference

This was implemented successfully in imposter-project/imposter-cli in commits d1addaf and cfbe507. See .github/workflows/ci.yaml in that repo for the working configuration.

This eliminates the QEMU dependency and runs both architecture builds in parallel on native hardware.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions