diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index a877584..0372414 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -45,19 +45,11 @@ jobs: path: dist/*.tar.gz build-wheels: - name: Build Wheels for ${{ matrix.os }}-${{ matrix.arch }} + name: Build Wheels for ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ macos-latest, windows-latest, ubuntu-latest ] - arch: [ x86_64 ] - include: - - arch: arm64 - os: macos-latest - - arch: aarch64 - os: ubuntu-latest - qemu: true - steps: - uses: actions/checkout@v3 with: @@ -73,18 +65,19 @@ jobs: - name: Install QEMU # install QEMU if building for arm linux uses: docker/setup-qemu-action@v1 - if: matrix.qemu + if: runner.os == 'Linux' with: platforms: arm64 - name: Build wheels uses: pypa/cibuildwheel@v2.3.1 env: + # these options are all specific to running in the CI. other options are in pyproject.toml MACOSX_DEPLOYMENT_TARGET: "10.15" -# CIBW_ARCHS_MACOS: ${{ matrix.arch }} -# CIBW_ARCHS_LINUX: ${{ matrix.arch }} -# CIBW_ARCHS_WINDOWS: "auto64" - CIBW_TEST_SKIP: "*-macosx_arm64" + CIBW_ARCHS_MACOS: "x86_64 universal2" + CIBW_ARCHS_LINUX: "x86_64 aarch64" + CIBW_ARCHS_WINDOWS: "auto64" + CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64" - name: Upload Wheels uses: actions/upload-artifact@v2 diff --git a/pyproject.toml b/pyproject.toml index 7d1b8d9..e6de53a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,9 +55,9 @@ package-data = { '*' = ['py.typed', '*.pyi'] } # include stubs package-dir = { '' = '.' } # without this line, C++ source files get included in the bdist [tool.cibuildwheel] -build = "cp{37,38,39,310}-*" -skip = ["*cp37-musllinux*", "*musllinux_aarch64*"] -test-command = "python -m unittest --verbose" +build = "cp{37,38,39,31*}-*" +skip = ["*cp37-musllinux*", "*musllinux_aarch64*", "cp{38,39,31*}-macosx_x86_64"] +test-command = 'python -m unittest discover "{project}/tests/" --verbose' test-extras = ["tests"] manylinux-x86_64-image = "manylinux2014" manylinux-aarch64-image = "manylinux2014"