@@ -8,35 +8,39 @@ concurrency:
88
99jobs :
1010 build_wheels :
11- name : Build ${{ matrix.archs }} wheel on ${{ matrix.os }}
11+ name : Build wheels on ${{ matrix.os }}
1212 runs-on : ${{ matrix.os }}
1313 strategy :
1414 fail-fast : false
1515 matrix :
1616 # macos-12 is an intel runner, macos-14 is a arm64 runner
1717 os : [ubuntu-latest, windows-latest, macos-12, macos-14]
18- archs : ["native"]
19- include :
20- - os : ubuntu-latest
21- archs : " aarch64"
18+ build_all :
19+ - ${{ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')) || contains(github.event.pull_request.labels.*.name, 'test all wheels')}}
2220 env :
2321 CIBW_TEST_COMMAND : python -c "import numcodecs"
2422 CIBW_BUILD : " cp310-* cp311-* cp312-*"
25- CIBW_SKIP : " pp* *-musllinux_* *win32 *_i686 *_s390x"
26- CIBW_ARCHS : ${{ matrix.archs }}
23+ CIBW_ARCHS_MACOS : native
24+ CIBW_ARCHS_WINDOWS : native
25+ CIBW_ARCHS_LINUX : " x86_64 aarch64"
2726 # note: CIBW_ENVIRONMENT is now set in pyproject.toml
2827
2928 steps :
3029 - uses : actions/checkout@v4
3130 with :
3231 submodules : true
3332
34- 33+ - name : Restrict number of wheel builds on PRs
34+ if : ${{ !matrix.build_all }}
35+ run : |
36+ echo "CIBW_BUILD=cp310-win_amd64 cp311-manylinux_x86_64 cp312-macosx_x86_64 cp312-macosx_arm64" >> $GITHUB_ENV
3537
3638 - name : Set up QEMU
37- if : ${{ matrix.archs == 'aarch64 ' }}
39+ if : ${{ matrix.os == 'ubuntu-latest ' }}
3840 uses : docker/setup-qemu-action@v3
3941
42+ 43+
4044 - uses : actions/upload-artifact@v4
4145 with :
4246 name : wheels-${{ matrix.os }}
0 commit comments