@@ -2,63 +2,64 @@ name: Build Wheels
22
33# Only run on new tags starting with `v`
44on :
5+ pull_request :
56 push :
67 tags :
7- - ' v* '
8+ - " v* "
89
910jobs :
1011 build_wheels :
1112 name : Build wheel on ${{ matrix.os }}
1213 runs-on : ${{ matrix.os }}
1314 strategy :
1415 matrix :
15- os : [ubuntu-latest, windows-latest, macos-latest]
16+ # macos-13 is an intel runner, macos-14 is apple silicon
17+ os :
18+ [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
1619
1720 steps :
18- - uses : actions/checkout@v2
21+ - uses : actions/checkout@v4
1922
20- - name : Build wheels
21- uses : pypa/cibuildwheel@v2.11.2
22- env :
23- # From rio-color here:
24- # https://github.com/mapbox/rio-color/blob/0ab59ad8e2db99ad1d0c8bd8c2e4cf8d0c3114cf/appveyor.yml#L3
25- CIBW_SKIP : " cp2* cp35* pp* *-win32 *-manylinux_i686"
26- CIBW_ARCHS_MACOS : x86_64 arm64
23+ - name : Build wheels
24+ uses : pypa/cibuildwheel@v3.0.0
2725
28- - uses : actions/upload-artifact@v2
29- with :
30- path : ./wheelhouse/*.whl
26+ - uses : actions/upload-artifact@v4
27+ with :
28+ name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
29+ path : ./wheelhouse/*.whl
3130
3231 build_sdist :
3332 name : Build source distribution
3433 runs-on : ubuntu-latest
3534 steps :
36- - uses : actions/checkout@v2
35+ - uses : actions/checkout@v4
3736
3837 - uses : actions/setup-python@v2
3938 name : Install Python
4039 with :
41- python-version : ' 3.8 '
40+ python-version : " 3.12 "
4241
4342 - name : Install dependencies
4443 run : |
45- python -m pip install numpy Cython
44+ python -m pip install numpy Cython build
4645
4746 - name : Build sdist
48- run : python setup.py sdist
47+ run : python -m build -- sdist
4948
50- - uses : actions/upload-artifact@v2
49+ - uses : actions/upload-artifact@v4
5150 with :
51+ name : sdist
5252 path : dist/*.tar.gz
5353
5454 upload_pypi :
5555 needs : [build_wheels, build_sdist]
5656 runs-on : ubuntu-latest
57+ if : startsWith(github.ref, 'refs/tags/')
5758 steps :
58- - uses : actions/download-artifact@v2
59+ - uses : actions/download-artifact@v4
5960 with :
60- name : artifact
6161 path : dist
62+ merge-multiple : true
6263
6364 - uses : pypa/gh-action-pypi-publish@master
6465 with :
0 commit comments