Skip to content

Commit 7ff4342

Browse files
committed
ci: Build py313 wheels, simplify build matrix
1 parent 8a75c9f commit 7ff4342

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

.github/workflows/build.yml

+13-22
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,17 @@ jobs:
4040

4141
build_wheels:
4242
needs: build_sdist
43-
name: Build wheel ${{ matrix.wheel }} on ${{ matrix.os }}
44-
runs-on: ${{ matrix.os }}
43+
name: Build wheel ${{ matrix.py }}-${{ matrix.platform.wheel_tag }} on ${{ matrix.platform.os }}
44+
runs-on: ${{ matrix.platform.os }}
4545
strategy:
4646
matrix:
47-
include:
48-
- { arch: arm64, wheel: cp310-macosx_arm64, os: macos-latest }
49-
- { arch: x86_64, wheel: cp310-macosx_x86_64, os: macos-13 }
50-
- { arch: x86_64, wheel: cp310-manylinux_x86_64, os: ubuntu-latest }
51-
- { arch: aarch64, wheel: cp310-manylinux_aarch64, os: ubuntu-24.04-arm }
52-
- { arch: x86_64, wheel: cp310-win_amd64, os: windows-2019 }
53-
- { arch: arm64, wheel: cp311-macosx_arm64, os: macos-latest }
54-
- { arch: x86_64, wheel: cp311-macosx_x86_64, os: macos-13 }
55-
- { arch: x86_64, wheel: cp311-manylinux_x86_64, os: ubuntu-latest }
56-
- { arch: aarch64, wheel: cp311-manylinux_aarch64, os: ubuntu-24.04-arm }
57-
- { arch: x86_64, wheel: cp311-win_amd64, os: windows-2019 }
58-
- { arch: arm64, wheel: cp312-macosx_arm64, os: macos-latest }
59-
- { arch: x86_64, wheel: cp312-macosx_x86_64, os: macos-13 }
60-
- { arch: x86_64, wheel: cp312-manylinux_x86_64, os: ubuntu-latest }
61-
- { arch: aarch64, wheel: cp312-manylinux_aarch64, os: ubuntu-24.04-arm }
62-
- { arch: x86_64, wheel: cp312-win_amd64, os: windows-2019 }
47+
py: [cp310, cp311, cp312, cp313]
48+
platform:
49+
- { arch: x86_64, os: windows-2019, wheel_tag: win_amd64 }
50+
- { arch: x86_64, os: macos-13, wheel_tag: macosx_x86_64 }
51+
- { arch: arm64, os: macos-latest, wheel_tag: macosx_arm64 }
52+
- { arch: x86_64, os: ubuntu-latest, wheel_tag: manylinux_x86_64 }
53+
- { arch: aarch64, os: ubuntu-24.04-arm, wheel_tag: manylinux_aarch64 }
6354
steps:
6455
- name: Download source distribution
6556
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
@@ -73,14 +64,14 @@ jobs:
7364
with:
7465
output-dir: wheelhouse
7566
env:
76-
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
77-
CIBW_BUILD: ${{ matrix.wheel }}
67+
CIBW_ARCHS_MACOS: ${{ matrix.platform.arch }}
68+
CIBW_BUILD: ${{ matrix.py }}-${{ matrix.platform.wheel_tag }}
7869
CIBW_TEST_COMMAND: python -m unittest discover -v -s {package}/tests
7970
CIBW_BUILD_VERBOSITY: 1
80-
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.arch == 'arm64' && '11' || '10.14' }}
71+
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.platform.arch == 'arm64' && '11' || '10.14' }}
8172
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8273
with:
83-
name: ${{ matrix.wheel }}
74+
name: ${{ matrix.py }}-${{ matrix.platform.wheel_tag }}
8475
path: ./wheelhouse/*.whl
8576

8677
build_docs:

0 commit comments

Comments
 (0)