From 462d57752df4ab6daf9e6ef031bb6414d1ecfa54 Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Thu, 30 Apr 2026 17:58:21 +0000 Subject: [PATCH] ci(python): build aarch64 wheels on native ubuntu-24.04-arm The auto manylinux container's cross-compile toolchain has had two distinct breakages in a row when building the linux/aarch64 wheel: - v0.2.0: aws-lc-sys 0.39.1 required AT_HWCAP2, but the cross sysroot ships glibc 2.17 (manylinux2014) which is missing it. - v0.2.1: after switching rustls to ring (#1493) to drop aws-lc-sys, ring's aarch64 .S assembler fails with `ARM assembler must define __ARM_ARCH` because the cross gcc doesn't predefine it. Both are cross-compile-toolchain gaps, not bugs in our code or the crypto crates. Building the aarch64 wheels on a native arm64 runner sidesteps the entire class -- maturin sees host==target and never involves the cross gcc. publish-js.yml already uses ubuntu-24.04-arm for its aarch64 NAPI binding (see specs/release-process.md JS native binding matrix). Apply the same fix to both linux/aarch64 wheel rows -- manylinux auto and musllinux_1_1. --- .github/workflows/publish-python.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-python.yml b/.github/workflows/publish-python.yml index e4c5e671..f9e944e8 100644 --- a/.github/workflows/publish-python.yml +++ b/.github/workflows/publish-python.yml @@ -56,9 +56,14 @@ jobs: - os: linux target: x86_64 runs-on: ubuntu-latest + # aarch64 wheel builds natively on ubuntu-24.04-arm. Cross-compiling + # from x86_64 inside the manylinux container fails with toolchain + # gaps in C-built crypto deps (e.g. ring's asm needs `__ARM_ARCH`, + # aws-lc-sys's cpu_aarch64_linux.c needs `AT_HWCAP2`). Native arm64 + # avoids both. Same pattern as publish-js.yml. - os: linux target: aarch64 - runs-on: ubuntu-latest + runs-on: ubuntu-24.04-arm # Linux musl - os: linux @@ -68,7 +73,7 @@ jobs: - os: linux target: aarch64 manylinux: musllinux_1_1 - runs-on: ubuntu-latest + runs-on: ubuntu-24.04-arm # macOS - os: macos