From 04127897e39151fe30654b451506800139d28ca4 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 31 Jul 2026 12:39:16 -0400 Subject: [PATCH] Build Linux ARM64 wheels natively Build and test Linux aarch64 wheels on a native ARM64 runner instead of running a QEMU job that accidentally rebuilt Intel wheels. Preserve existing x86_64, i686, and Python 3.8 wheel support. --- .github/workflows/pythonpackage.yaml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pythonpackage.yaml b/.github/workflows/pythonpackage.yaml index cbd6ebd..3e89807 100644 --- a/.github/workflows/pythonpackage.yaml +++ b/.github/workflows/pythonpackage.yaml @@ -42,11 +42,8 @@ jobs: strategy: matrix: - os: [ubuntu-22.04, macos-latest, windows-latest] + os: [ubuntu-22.04, ubuntu-24.04-arm, macos-latest, windows-latest] arch: [auto64] - include: - - os: ubuntu-22.04 - arch: aarch64 name: Build wheels for ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -54,24 +51,22 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up QEMU - if: matrix.arch == 'aarch64' - uses: docker/setup-qemu-action@v3 - - uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.x' - name: Install dependencies run: | - python -m pip install -U pip setuptools wheel cibuildwheel + python -m pip install -U pip setuptools wheel 'cibuildwheel<4' - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse env: + CIBW_ARCHS_LINUX: ${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64' || 'x86_64 i686' }} CIBW_PRERELEASE_PYTHONS: "false" CIBW_SKIP: "pp*" + CIBW_TEST_COMMAND_LINUX: cp {project}/test_pycld2.py . && python test_pycld2.py - uses: actions/upload-artifact@v4 with: @@ -116,4 +111,4 @@ jobs: merge-multiple: true - name: Publish package to PyPI (OIDC) - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file + uses: pypa/gh-action-pypi-publish@release/v1