@@ -29,24 +29,33 @@ jobs:
29
29
path : dist/*.tar.gz
30
30
31
31
build_wheels :
32
- name : Build ${{ matrix.cpversion }} wheels on ${{ matrix.os }}
32
+ name : Build wheels on ${{ matrix.os }}- ${{ matrix.arch }}
33
33
runs-on : ${{ matrix.os }}
34
34
strategy :
35
35
fail-fast : false
36
36
matrix :
37
- os : [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
38
- # cp313 seemed to produce the same wheel name as cp312. Skip unless
39
- # necessary.
40
- cpversion : [cp38, cp39, cp310, cp311, cp312]
41
- # github actions cp38 on macos-14 runners are cross compiling or
42
- # something and confusing the stub generation. Just skip it for now.
43
- # Maybe it'd be friendlier to disable the stub generation for this
44
- # combination.
45
- exclude :
46
- - os : macos-14
47
- cpversion : cp38
48
-
49
-
37
+ include :
38
+ - os : ubuntu-latest
39
+ pybuilds : cp3{9,10,11,12}-manylinux_x86_64
40
+ arch : x86_64
41
+ id : linux_x86_64
42
+ - os : ubuntu-24.04-arm
43
+ pybuilds : cp3{9,10,11,12}-manylinux_aarch64
44
+ arch : aarch64
45
+ id : linux_arm64
46
+ - os : macos-13
47
+ pybuilds : cp3{9,10,11,12}-macosx_x86_64
48
+ arch : x86_64
49
+ id : macos_x86
50
+ - os : macos-15
51
+ pybuilds : cp3{9,10,11,12}-macosx_arm64
52
+ arch : arm64
53
+ id : macos_arm64
54
+ - os : windows-latest
55
+ pybuilds : cp3{9,10,11,12}-win_amd64
56
+ arch : x86_64
57
+ id : windows_amd64
58
+
50
59
steps :
51
60
- uses : actions/checkout@v4
52
61
@@ -60,13 +69,57 @@ jobs:
60
69
- name : Build wheels
61
70
# why do I need to specify this cpversion here?
62
71
env :
63
- CIBW_ARCHS : " auto64"
64
- CIBW_BUILD : " ${{ matrix.cpversion }}-*"
65
- # why isn't auto64 working?
72
+ CIBW_BUILD : ${{ matrix.pybuilds }}
66
73
CIBW_SKIP : " cp*-manylinux_i686 cp*-musllinux* cp*-win32"
67
74
run : python -m cibuildwheel --output-dir wheelhouse
68
75
69
76
- uses : actions/upload-artifact@v4
77
+ name : Upload repaired wheels as artifact
70
78
with :
71
- name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
72
- path : ./wheelhouse/*.whl
79
+ name : ${{ matrix.os }}-${{ strategy.job-index }}}-${{ matrix.arch }}
80
+ path : |
81
+ ${{ steps.attest.outputs.bundle-path }}
82
+ ./wheelhouse/*.whl
83
+ ./wheelhouse/*.so
84
+ ./wheelhouse/*.dylib
85
+ ./wheelhouse/*.lib
86
+ ./wheelhouse/*.dll
87
+
88
+ release_artifacts :
89
+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
90
+ name : Release repaired and tested wheels
91
+ needs : build_wheels
92
+ runs-on : ubuntu-latest
93
+ environment : release
94
+ permissions :
95
+ # IMPORTANT: this permission is mandatory for trusted publishing
96
+ id-token : write
97
+ contents : write
98
+
99
+ steps :
100
+ - uses : actions/checkout@v4
101
+ with :
102
+ fetch-depth : 0 # Optional, use if you use setuptools_scm
103
+ submodules : true # Optional, use if you have submodules
104
+
105
+ - name : Download compressed artifacts
106
+ id : download
107
+ uses : actions/download-artifact@v4
108
+ with :
109
+ path : ./artifacts
110
+ merge-multiple : true
111
+
112
+ - name : Display structure of downloaded files
113
+ run : ls -R ./artifacts
114
+
115
+ - name : Create release and upload wheels
116
+ uses : ncipollo/release-action@v1
117
+ with :
118
+ allowUpdates : true
119
+ artifacts : " ${{ steps.download.outputs.download-path }}/*.whl,${{ steps.download.outputs.download-path }}/*.gz,${{ steps.download.outputs.download-path }}/*.so,${{ steps.download.outputs.download-path }}/*.dylib,${{ steps.download.outputs.download-path }}/*.lib,${{ steps.download.outputs.download-path }}/*.dll"
120
+ token : ${{ secrets.GITHUB_TOKEN }}
121
+
122
+ - name : PyPI Publish
123
+
124
+ with :
125
+ packages-dir : ${{ steps.download.outputs.download-path }}
0 commit comments