Skip to content

Commit ca3f391

Browse files
authored
Update wheels.yml
1 parent de10dd1 commit ca3f391

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

.github/workflows/wheels.yml

+22-14
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
submodules: true
1818
- 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
2020
- uses: actions/upload-artifact@v4
2121
with:
2222
name: dist-sdist
@@ -27,20 +27,21 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
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
3131
arch: [x86_64, arm64]
32+
pybuilds: [cp38, cp39, cp310, cp311, cp312] # Define pybuilds at the top level
3233
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
3839
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
4142
- os: macos-13
4243
pybuilds: cp38
43-
pybuilds: [cp38, cp39, cp310, cp311, cp312]
44+
4445
steps:
4546
- uses: actions/checkout@v4
4647
- uses: actions/setup-python@v5
@@ -49,13 +50,20 @@ jobs:
4950
- run: pip install cibuildwheel==2.22.0
5051
- run: python -m cibuildwheel --output-dir wheelhouse
5152
env:
52-
CIBW_BUILD: "${{ matrix.pybuilds }}-*"
53+
CIBW_BUILD: "${{ matrix.pybuilds }}-${{ matrix.arch }}-*" # Use matrix.pybuilds and matrix.arch
5354
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
5455
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
5659
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
5967

6068
release_artifacts:
6169
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)