---
title: "Build each architecture on native runners"
description: "Run architecture-specific builds on matching hardware to avoid the overhead of emulation."
url: https://starsling.dev/ci-playbooks/techniques/native-architecture-builds
canonicalUrl: https://starsling.dev/ci-playbooks/techniques/native-architecture-builds
---

# Build each architecture on native runners

Run architecture-specific builds on matching hardware to avoid the overhead of emulation.

## How to choose an approach

Compare the examples by repository setup, prerequisites, and risks before adopting one. Each company implemented this in its own environment; measure each change against your own baseline.

- **[Spotify](https://starsling.dev/ci-playbooks/spotify#native-arm-runners)**: Use it when A workflow builds arm64 images or binaries on x86 runners through emulation, and native arm64 runners are available to it. Check before adopting: Each architecture gets its own job and pays its own setup, and a final job merges the per-platform digests into one manifest.
- **[Stripe](https://starsling.dev/ci-playbooks/stripe#native-container-builds)**: Use it when Cross-architecture emulation dominates a multi-platform image build. Check before adopting: Publish the multi-platform manifest only after every platform build and check succeeds, and keep every supported platform.

## Apply this technique

````text
Evaluate and apply this CI technique to my repository: Build each architecture on native runners.

Run architecture-specific builds on matching hardware to avoid the overhead of emulation.

Read the technique and its source-backed company examples: https://starsling.dev/ci-playbooks/techniques/native-architecture-builds.md

Inspect this repository’s CI workflows, build and test commands, dependencies, and recent run timings. Identify where this technique applies and explain the expected benefit using this repository’s evidence.
Measure a baseline from recent comparable runs: elapsed time, queue time, runner minutes and failures where available. If data is unavailable, say what cannot be measured.
Compare relevant company approaches, checking prerequisites, platform differences and tradeoffs. Rank applicable options by evidence, fit and measurable opportunity; do not present company results as predictions for this repo.
Recommend the smallest safe change, show what checks and fallback paths remain, and ASK ME WHICH CHANGE TO APPROVE BEFORE EDITING ANY FILES.
Only after approval, work on a new feature branch, make one reversible change, and open a reviewable pull request. Never merge or push to a default or protected branch.
Keep required checks, test coverage, deployment and release behavior intact. Validate the change and compare equivalent runs where possible; report limitations and what should be monitored after merge.
````

## How companies used this technique

Read what each company changed and follow the original sources.

### Spotify: Build arm64 on native arm64 runners

Confidence's release job built its deployer image for amd64 and arm64 on one x86 runner, compiling the arm64 Rust code under QEMU emulation. The change runs one matrix job per platform, amd64 on ubuntu-latest and arm64 on ubuntu-24.04-arm, pushes each image by digest, and adds a job that combines the digests into a single multi-arch manifest. The QEMU setup step is gone.

Evidence: Single-run demonstration

The last release run under emulation took 2 hours 28 minutes; a test workflow mirroring the change finished in about 17 minutes of wall-clock time, which the author reports as a ~8.7x speedup. ([Source](https://github.com/spotify/confidence-resolver/pull/479))

Use it when: A workflow builds arm64 images or binaries on x86 runners through emulation, and native arm64 runners are available to it.

Before applying it: Each architecture gets its own job and pays its own setup, and a final job merges the per-platform digests into one manifest.

[Read more in the Spotify playbook](https://starsling.dev/ci-playbooks/spotify#native-arm-runners)

[Primary source](https://github.com/spotify/confidence-resolver/pull/479)

### Stripe: Build each container architecture natively

Stripe sync-engine split its Docker build into parallel arm64 and amd64 jobs on matching native GitHub runners, replacing an emulated multi-platform build, and a manifest job combines both with docker buildx imagetools.

Evidence: Source PR/commit evidence

Use it when: Cross-architecture emulation dominates a multi-platform image build.

Before applying it: Publish the multi-platform manifest only after every platform build and check succeeds, and keep every supported platform.

[Read more in the Stripe playbook](https://starsling.dev/ci-playbooks/stripe#native-container-builds)

[Primary source](https://github.com/stripe/sync-engine-fork/pull/212)

## CI optimization is continuous work.

Apply this technique yourself, or use StarSling Runners for faster GitHub Actions and optional agent-driven optimization PRs, which teams on eligible paid plans can turn on.

[Get self-improving CI](https://starsling.dev/products/runners)

## Related techniques

### [Match test concurrency to the runner](https://starsling.dev/ci-playbooks/techniques/tune-test-workers)

Measure worker counts against available CPU and memory. More workers help only while the runner has capacity.

4 implementations · 4 companies (Anthropic, Mastra, OpenAI, Stripe)

### [Move bottlenecked jobs to faster runners](https://starsling.dev/ci-playbooks/techniques/faster-runners)

Benchmark the same workload on faster hardware and compare elapsed time and cost before changing runner capacity.

4 implementations · 4 companies (Linear, Mastra, OpenAI, Ramp)

## Company Playbooks

### [Anthropic](https://starsling.dev/ci-playbooks/anthropic)

Run only affected tests

### [DoorDash](https://starsling.dev/ci-playbooks/doordash)

Run build and test in parallel, sharded across CI agents

### [Linear](https://starsling.dev/ci-playbooks/linear)

Benchmark the same job on faster hardware

### [Mastra](https://starsling.dev/ci-playbooks/mastra)

StarSling runners for the slowest test workflow

### [OpenAI](https://starsling.dev/ci-playbooks/openai)

Rank CI fixes by the minutes they save

### [Ramp](https://starsling.dev/ci-playbooks/ramp)

Move a CPU-bound test suite to a faster CPU

### [Shopify](https://starsling.dev/ci-playbooks/shopify)

Let an agent iterate against one CI metric

### [Spotify](https://starsling.dev/ci-playbooks/spotify)

Build arm64 on native arm64 runners

### [Stripe](https://starsling.dev/ci-playbooks/stripe)

Run only the tests a change can reach

### [Uber](https://starsling.dev/ci-playbooks/uber)

Build the merge-queue speculations most likely to be needed

## Related guides

Implementation guides for this technique.

### [Cut CI queue time](https://starsling.dev/best-practices/github-actions/cut-queue-time)

Measure wait-to-start time and examine concurrency groups and available capacity.

### [Right-size GitHub Actions runners](https://starsling.dev/best-practices/github-actions/right-size-runners)

Compare runner sizes on the same workload and account for elapsed time and cost.

### [Diagnose high CI queue time](https://starsling.dev/github-actions/problems/high-queue-time)

Check concurrency, cancellation, runner capacity, and triggers against run history.
