1
1
---
2
2
name : Build CI wheels
3
3
4
- on :
5
- # Save CI by only running this on release branches or tags.
6
- push :
7
- branches :
8
- - main
9
- - v[0-9]+.[0-9]+.x
10
- tags :
11
- - v*
12
- # Also allow running this action on PRs if requested by applying the
13
- # "Run cibuildwheel" label.
14
- pull_request :
15
- types :
16
- - opened
17
- - synchronize
18
- - reopened
19
- - labeled
20
-
21
4
permissions :
22
5
contents : read
23
6
24
7
jobs :
25
8
build_sdist :
26
- if : >-
27
- github.event_name == 'push' ||
28
- github.event_name == 'pull_request' && (
29
- (
30
- github.event.action == 'labeled' &&
31
- github.event.label.name == 'CI: Run cibuildwheel'
32
- ) ||
33
- contains(github.event.pull_request.labels.*.name,
34
- 'CI: Run cibuildwheel')
35
- )
36
9
name : Build sdist
37
10
runs-on : ubuntu-20.04
38
11
outputs :
76
49
if-no-files-found : error
77
50
78
51
build_wheels :
79
- if : >-
80
- github.event_name == 'push' ||
81
- github.event_name == 'pull_request' && (
82
- (
83
- github.event.action == 'labeled' &&
84
- github.event.label.name == 'CI: Run cibuildwheel'
85
- ) ||
86
- contains(github.event.pull_request.labels.*.name,
87
- 'CI: Run cibuildwheel')
88
- )
89
52
needs : build_sdist
90
53
name : Build wheels on ${{ matrix.os }} for ${{ matrix.cibw_archs }}
91
54
runs-on : ${{ matrix.os }}
116
79
MACOSX_DEPLOYMENT_TARGET : " 10.12"
117
80
MPL_DISABLE_FH4 : " yes"
118
81
strategy :
82
+ fail-fast : false
119
83
matrix :
120
84
include :
121
85
- os : ubuntu-20.04
@@ -142,50 +106,6 @@ jobs:
142
106
name : cibw-sdist
143
107
path : dist/
144
108
145
- - name : Build wheels for CPython 3.13
146
- uses : pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
147
- with :
148
- package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
149
- env :
150
- CIBW_BUILD : " cp313-* cp313t-*"
151
- # No free-threading wheels for NumPy; musllinux skipped for main builds also.
152
- CIBW_SKIP : " cp313t-win_amd64 *-musllinux_aarch64"
153
- CIBW_BUILD_FRONTEND :
154
- " pip; args: --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
155
- CIBW_FREE_THREADED_SUPPORT : true
156
- # No free-threading wheels available for aarch64 on Pillow.
157
- CIBW_TEST_SKIP : " cp313t-manylinux_aarch64"
158
- # We need pre-releases to get the nightly wheels.
159
- CIBW_BEFORE_TEST : >-
160
- pip install --pre
161
- --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
162
- contourpy numpy pillow
163
- CIBW_ARCHS : ${{ matrix.cibw_archs }}
164
-
165
- - name : Build wheels for CPython 3.12
166
- uses : pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
167
- with :
168
- package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
169
- env :
170
- CIBW_BUILD : " cp312-*"
171
- CIBW_ARCHS : ${{ matrix.cibw_archs }}
172
-
173
- - name : Build wheels for CPython 3.11
174
- uses : pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
175
- with :
176
- package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
177
- env :
178
- CIBW_BUILD : " cp311-*"
179
- CIBW_ARCHS : ${{ matrix.cibw_archs }}
180
-
181
- - name : Build wheels for CPython 3.10
182
- uses : pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
183
- with :
184
- package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
185
- env :
186
- CIBW_BUILD : " cp310-*"
187
- CIBW_ARCHS : ${{ matrix.cibw_archs }}
188
-
189
109
- name : Build wheels for PyPy
190
110
uses : pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
191
111
with :
@@ -200,32 +120,3 @@ jobs:
200
120
name : cibw-wheels-${{ runner.os }}-${{ matrix.cibw_archs }}
201
121
path : ./wheelhouse/*.whl
202
122
if-no-files-found : error
203
-
204
- publish :
205
- if : github.event_name == 'push' && github.ref_type == 'tag'
206
- name : Upload release to PyPI
207
- needs : [build_sdist, build_wheels]
208
- runs-on : ubuntu-latest
209
- environment : release
210
- permissions :
211
- id-token : write
212
- attestations : write
213
- contents : read
214
- steps :
215
- - name : Download packages
216
- uses : actions/download-artifact@v4
217
- with :
218
- pattern : cibw-*
219
- path : dist
220
- merge-multiple : true
221
-
222
- - name : Print out packages
223
- run : ls dist
224
-
225
- - name : Generate artifact attestation for sdist and wheel
226
- uses : actions/attest-build-provenance@310b0a4a3b0b78ef57ecda988ee04b132db73ef8 # v1.4.1
227
- with :
228
- subject-path : dist/matplotlib-*
229
-
230
- - name : Publish package distributions to PyPI
231
- uses : pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
0 commit comments