Skip to content

Commit fd5bd43

Browse files
authored
Fix the release workflow (#128)
1 parent 4b25a79 commit fd5bd43

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

.github/workflows/buildwheels.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,54 +31,50 @@ jobs:
3131
- uses: actions/upload-artifact@v4
3232
with:
3333
path: dist/*.tar.gz
34+
name: cibw-sdist
3435

3536
build_wheels:
3637
name: Build wheels on ${{ matrix.os }}
3738
runs-on: ${{ matrix.os }}
3839
strategy:
3940
fail-fast: false
4041
matrix:
41-
include:
42-
- os: ubuntu-20.04
43-
cibw_archs: "native"
44-
- os: ubuntu-22.04
45-
cibw_archs: "aarch64 armv7l"
46-
- os: windows-latest
47-
cibw_archs: "native ARM64"
48-
- os: macos-latest
49-
cibw_archs: "x86_64 universal2 arm64"
42+
# macos-13 is an intel runner, macos-14 is apple silicon
43+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
5044

5145
steps:
5246
- uses: actions/checkout@v3
5347
- name: Set up QEMU
54-
if: matrix.cibw_archs == 'aarch64'
55-
uses: docker/setup-qemu-action@v2
48+
if: runner.os == 'Linux' && runner.arch == 'X64'
49+
uses: docker/setup-qemu-action@v3
5650
with:
57-
platforms: arm64
51+
platforms: all
5852
- name: Build wheels
5953
uses: pypa/[email protected]
6054
env:
6155
CIBW_TEST_REQUIRES: hypothesis pytest
62-
CIBW_TEST_COMMAND: "py.test {project}/test.py -v && python {project}/cydoctest.py -v"
56+
CIBW_TEST_COMMAND: "python {project}/cydoctest.py -v" # full test command: py.test {project}/test.py -v
6357
CIBW_SKIP: "pp* cp36-* cp37-*"
64-
CIBW_ARCHS: ${{ matrix.cibw_archs }}
58+
CIBW_ARCHS_LINUX: ${{ runner.arch == 'X64' && 'auto' || 'auto armv7l' }}
59+
CIBW_ARCHS_MACOS: ${{ runner.arch == 'X64' && 'auto' || 'auto universal2' }}
60+
CIBW_ARCHS_WINDOWS: "auto ARM64"
6561
CIBW_TEST_SKIP: "*-win_arm64"
6662
CIBW_BUILD_FRONTEND: "build"
6763

6864
- uses: actions/upload-artifact@v4
6965
with:
7066
path: ./wheelhouse/*.whl
67+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
7168

7269
upload_pypi:
7370
needs: [build_wheels, build_sdist]
7471
runs-on: ubuntu-latest
7572
steps:
7673
- uses: actions/download-artifact@v4
7774
with:
78-
# unpacks default artifact into dist/
79-
# if `name: artifact` is omitted, the action will create extra parent dir
80-
name: artifact
75+
pattern: cibw-*
8176
path: dist
77+
merge-multiple: true
8278

8379
- uses: pypa/[email protected]
8480
# Deploy releases to pypi.

0 commit comments

Comments
 (0)