Skip to content

ci: build aarch64 and armv7l wheels on native ARM runners - #248

Merged
bdraco merged 1 commit into
masterfrom
ci-native-arm-wheels
May 19, 2026
Merged

bdraco merged 1 commit into
masterfrom
ci-native-arm-wheels

Conversation

@bdraco

@bdraco bdraco commented May 19, 2026

Copy link
Copy Markdown
Member

What do these changes do?

Move the aarch64 and armv7l legs of the release wheel matrix off the
x86_64 QEMU path and onto GitHub's public ubuntu-24.04-arm hosted
runner. aarch64 now builds natively with no emulation. armv7l still
gets docker/setup-qemu-action so binfmt registers a 32-bit ARM
handler whether or not the host kernel ships CONFIG_COMPAT; even
under emulation, running on an aarch64 host is far cheaper than the
previous aarch64-on-x86_64 layout.

ppc64le, s390x, and riscv64 keep the ubuntu-latest + QEMU setup
since there are no native GH-hosted runners for those.

The matrix gains an include: block that overrides runner-vm-os
and a native-arch flag per arch; each (qemu, tag) combo is
listed explicitly so the include unambiguously augments the existing
matrix cell rather than relying on the partial-key merge behaviour of
matrix.include. The reusable reusable-build-wheel.yml gains a
native-arch boolean input that gates the Set up QEMU step
while keeping the cross-arch environment step (CIBW_ARCHS_LINUX
and CIBW_BUILD_FRONTEND=build) running on native ARM runs too,
because the manylinux/musllinux odd-arch container images are the
same regardless of host.

Ports aio-libs/yarl#1724 to propcache.

Are there changes in behavior for the user?

No. Wheels are still built for the same architectures and tags; only
the host that builds them changes. Release CI time on the aarch64
leg should drop from roughly 40 minutes to a few minutes.

Related issue number

N/A; ports aio-libs/yarl#1724.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist N/A (CI-only change)
  • Documentation reflects the changes N/A (no user-facing docs)
  • Add a new news fragment into the CHANGES/ folder
Agent run details (optional, for reviewers)

Drafted with Claude Code (claude-opus-4-7); reviewed by @bdraco.

Local validation:

  • pre-commit hooks (yamllint, actionlint, GH workflow validation, codespell, end-of-file, trailing whitespace, file-contents-sorter on the wordlist) all passed on commit.
  • python -c "yaml.safe_load(...)" confirms both workflow files parse cleanly, including the matrix include: shape and the ${{ matrix.runner-vm-os || 'ubuntu-latest' }} / ${{ matrix.native-arch && true || false }} expressions.
  • make doc-spelling reports only the 2 pre-existing misspellings on master (subdirectory in CHANGES/207.contrib.rst and postfix in CHANGES.rst:168). The new fragment introduces aarch and armv, both added to docs/spelling_wordlist.txt.

Not validated locally: actual native-ARM cibuildwheel run. The runner label and matrix wiring look correct, but the real proof is the first CI run on this branch.

GitHub now provides public hosted Linux ARM64 runners
(`ubuntu-24.04-arm`), so the aarch64 wheel build no longer needs to
run under QEMU emulation on x86_64. The armv7l build also moves to
the same aarch64 host; QEMU stays registered so binfmt picks up the
32-bit ARM userspace handler whether or not the host kernel has
CONFIG_COMPAT enabled, and even with emulation aarch64-on-aarch64
is far cheaper than the previous aarch64-on-x86_64 path.

The ppc64le, s390x, and riscv64 builds keep their ubuntu-latest +
QEMU setup since there are no native GH-hosted runners for those.

The matrix gains an `include:` block that overrides `runner-vm-os`
and a `native-arch` flag per arch; each (qemu, tag) combo is listed
explicitly so the include unambiguously augments the existing matrix
cell rather than relying on the partial-key merge behaviour of
`matrix.include`. The reusable build-wheel workflow gains a
`native-arch` boolean input that gates the QEMU setup step while
still letting the cross-arch environment step set
`CIBW_ARCHS_LINUX` and `CIBW_BUILD_FRONTEND=build` (the latter is
needed on native aarch64 too because the manylinux/musllinux odd-arch
container images are the same image regardless of host).
@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label May 19, 2026
@codspeed

codspeed Bot commented May 19, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing ci-native-arm-wheels (4d45056) with master (157d62f)

Open in CodSpeed

@codecov

codecov Bot commented May 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.54%. Comparing base (157d62f) to head (4d45056).
⚠️ Report is 32 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #248   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files          10       10           
  Lines         439      439           
  Branches       17       17           
=======================================
  Hits          437      437           
  Misses          2        2           
Flag Coverage Δ
CI-GHA 97.49% <ø> (ø)
OS-Linux 97.49% <ø> (ø)
OS-Windows 94.53% <ø> (ø)
OS-macOS 94.53% <ø> (ø)
Py-3.10 94.53% <ø> (ø)
Py-3.11 96.12% <ø> (ø)
Py-3.12 96.12% <ø> (ø)
Py-3.13 96.12% <ø> (ø)
Py-3.14 96.10% <ø> (ø)
Py-3.14t 96.10% <ø> (ø)
Py-pypy-3.10 78.13% <ø> (ø)
VM-macos-latest 94.53% <ø> (ø)
VM-ubuntu-latest 97.49% <ø> (ø)
VM-windows-11-arm 94.30% <ø> (ø)
VM-windows-latest 94.53% <ø> (ø)
pytest 97.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bdraco
bdraco marked this pull request as ready for review May 19, 2026 21:27
@bdraco
bdraco merged commit ebe0e4d into master May 19, 2026
55 of 56 checks passed
@bdraco
bdraco deleted the ci-native-arm-wheels branch May 19, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant