diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ee74647..8902601 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -15,12 +15,9 @@ jobs: arch: x86_64 - os: ubuntu-latest arch: i686 - - os: ubuntu-latest + # Native ARM runner — no QEMU, drastically faster than emulated aarch64 + - os: ubuntu-24.04-arm arch: aarch64 - - os: ubuntu-latest - arch: ppc64le - - os: ubuntu-latest - arch: s390x - os: macos-15 arch: x86_64 @@ -41,8 +38,38 @@ jobs: steps: - uses: actions/checkout@v5 + - name: Build wheels + uses: pypa/cibuildwheel@v3.4.1 + with: + output-dir: wheelhouse + env: + CIBW_ARCHS: ${{ matrix.arch }} + # Drop EOL CPython 3.8 (also avoids the macOS x86_64-only-installer warning) + CIBW_SKIP: "cp38-*" + CIBW_TEST_REQUIRES: pytest pytest-asyncio + CIBW_TEST_COMMAND: pytest {project} + # Only needed to make the macosx arm64 build work + CMAKE_OSX_ARCHITECTURES: "${{ matrix.arch == 'arm64' && 'arm64' || '' }}" + + - uses: actions/upload-artifact@v6 + with: + name: cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl + + # Exotic arches built via QEMU emulation — very slow (often >1h), so only run + # on release tags rather than every push/PR. + build_wheels_exotic: + name: Build wheels (exotic) ${{ matrix.arch }} + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + arch: [ppc64le, s390x] + steps: + - uses: actions/checkout@v5 + - name: Set up QEMU - if: runner.os == 'Linux' uses: docker/setup-qemu-action@v4 - name: Build wheels @@ -51,17 +78,13 @@ jobs: output-dir: wheelhouse env: CIBW_ARCHS: ${{ matrix.arch }} - CIBW_TEST_REQUIRES: pytest pytest-asyncio - CIBW_TEST_COMMAND: pytest {project} - # cibuildwheel can build cp38 macOS universal2/arm64 wheels but can't test the - # arm64 slice because the cp38 installer is x86_64-only. Silence the warning. - CIBW_TEST_SKIP: "cp38-macosx_*:arm64" - # Only needed to make the macosx arm64 build work - CMAKE_OSX_ARCHITECTURES: "${{ matrix.arch == 'arm64' && 'arm64' || '' }}" + CIBW_SKIP: "cp38-*" + # Tests under QEMU are extremely slow; skip them for these arches. + CIBW_TEST_SKIP: "*" - uses: actions/upload-artifact@v6 with: - name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + name: cibw-wheels-${{ matrix.arch }} path: ./wheelhouse/*.whl build_sdist: