16
16
with :
17
17
submodules : true
18
18
- run : pipx run build --sdist
19
- - run : pipx run twine check dist/*
19
+ - run : pipx run twine check dist/* || exit 1 # Ensure failure on twine check errors
20
20
- uses : actions/upload-artifact@v4
21
21
with :
22
22
name : dist-sdist
@@ -27,20 +27,21 @@ jobs:
27
27
strategy :
28
28
fail-fast : false
29
29
matrix :
30
- os : [ubuntu-latest , ubuntu-24.04-arm, macos-15 , macos-13, windows-latest]
30
+ os : [ubuntu-24.04 , ubuntu-24.04-arm, macos-14 , macos-13, windows-latest] # Use specific versions for clarity
31
31
arch : [x86_64, arm64]
32
+ pybuilds : [cp38, cp39, cp310, cp311, cp312] # Define pybuilds at the top level
32
33
exclude :
33
- - os : ubuntu-latest
34
- arch : arm64
35
- - os : macos-15
36
- arch : x86_64
37
- - os : macos-15
34
+ - os : ubuntu-24.04-arm # No need to specify arch, it's already implicit
35
+ arch : x86_64 # Exclude x86_64 on ARM
36
+ - os : macos-14 # Exclude macOS 14 (Sonoma)
37
+ arch : x86_64 # Exclude x86_64 explicitly
38
+ - os : macos-14 # Exclude cp38
38
39
pybuilds : cp38
39
- - os : macos-13
40
- arch : arm64
40
+ - os : macos-13 # Exclude macOS 13 (Ventura) - arm64
41
+ arch : arm64 # Exclude arm64 on macOS 13
41
42
- os : macos-13
42
43
pybuilds : cp38
43
- pybuilds : [cp38, cp39, cp310, cp311, cp312]
44
+
44
45
steps :
45
46
- uses : actions/checkout@v4
46
47
- uses : actions/setup-python@v5
@@ -49,13 +50,20 @@ jobs:
49
50
- run : pip install cibuildwheel==2.22.0
50
51
- run : python -m cibuildwheel --output-dir wheelhouse
51
52
env :
52
- CIBW_BUILD : " ${{ matrix.pybuilds }}-* "
53
+ CIBW_BUILD : " ${{ matrix.pybuilds }}-${{ matrix.arch }}-* " # Use matrix.pybuilds and matrix.arch
53
54
CIBW_ARCHS_MACOS : ${{ matrix.arch }}
54
55
CIBW_SKIP : " cp*-manylinux_i686 cp*-musllinux* cp*-win32"
55
- - uses : actions/upload-artifact@v4
56
+ - name : Upload Artifact
57
+ uses : actions/upload-artifact@v4
58
+ continue-on-error : true # Important: Continue if upload fails
56
59
with :
57
- name : wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ github.run_id }}
58
- path : wheelhouse/*
60
+ # Include pybuilds in the artifact name
61
+ name : wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.pybuilds }}-${{ github.run_id }}
62
+ path : ./wheelhouse/*.whl
63
+ if-no-files-found : error # Fail if no wheels are found
64
+ compression-level : 6
65
+ overwrite : false
66
+ include-hidden-files : false
59
67
60
68
release_artifacts :
61
69
if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
0 commit comments