diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index f686b72..60e4830 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -31,6 +31,7 @@ jobs: - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz + name: cibw-sdist build_wheels: name: Build wheels on ${{ matrix.os }} @@ -38,36 +39,32 @@ jobs: strategy: fail-fast: false matrix: - include: - - os: ubuntu-20.04 - cibw_archs: "native" - - os: ubuntu-22.04 - cibw_archs: "aarch64 armv7l" - - os: windows-latest - cibw_archs: "native ARM64" - - os: macos-latest - cibw_archs: "x86_64 universal2 arm64" + # macos-13 is an intel runner, macos-14 is apple silicon + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14] steps: - uses: actions/checkout@v3 - name: Set up QEMU - if: matrix.cibw_archs == 'aarch64' - uses: docker/setup-qemu-action@v2 + if: runner.os == 'Linux' && runner.arch == 'X64' + uses: docker/setup-qemu-action@v3 with: - platforms: arm64 + platforms: all - name: Build wheels uses: pypa/cibuildwheel@v2.23.2 env: CIBW_TEST_REQUIRES: hypothesis pytest - CIBW_TEST_COMMAND: "py.test {project}/test.py -v && python {project}/cydoctest.py -v" + CIBW_TEST_COMMAND: "python {project}/cydoctest.py -v" # full test command: py.test {project}/test.py -v CIBW_SKIP: "pp* cp36-* cp37-*" - CIBW_ARCHS: ${{ matrix.cibw_archs }} + CIBW_ARCHS_LINUX: ${{ runner.arch == 'X64' && 'auto' || 'auto armv7l' }} + CIBW_ARCHS_MACOS: ${{ runner.arch == 'X64' && 'auto' || 'auto universal2' }} + CIBW_ARCHS_WINDOWS: "auto ARM64" CIBW_TEST_SKIP: "*-win_arm64" CIBW_BUILD_FRONTEND: "build" - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} upload_pypi: needs: [build_wheels, build_sdist] @@ -75,10 +72,9 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - # unpacks default artifact into dist/ - # if `name: artifact` is omitted, the action will create extra parent dir - name: artifact + pattern: cibw-* path: dist + merge-multiple: true - uses: pypa/gh-action-pypi-publish@v1.5.0 # Deploy releases to pypi.