@@ -34,19 +34,20 @@ jobs:
34
34
'CI: Run cibuildwheel')
35
35
)
36
36
name : Build sdist
37
- runs-on : ubuntu-20.04
37
+ runs-on : ubuntu-latest
38
38
outputs :
39
39
SDIST_NAME : ${{ steps.sdist.outputs.SDIST_NAME }}
40
40
41
41
steps :
42
- - uses : actions/checkout@v4
42
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43
43
with :
44
44
fetch-depth : 0
45
+ persist-credentials : false
45
46
46
- - uses : actions/setup-python@v5
47
+ - uses : actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
47
48
name : Install Python
48
49
with :
49
- python-version : 3.9
50
+ python-version : ' 3.10 '
50
51
51
52
# Something changed somewhere that prevents the downloaded-at-build-time
52
53
# licenses from being included in built wheels, so pre-download them so
69
70
run : twine check dist/*
70
71
71
72
- name : Upload sdist result
72
- uses : actions/upload-artifact@v4
73
+ uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
73
74
with :
74
75
name : cibw-sdist
75
76
path : dist/*.tar.gz
@@ -100,82 +101,87 @@ jobs:
100
101
CIBW_AFTER_BUILD : >-
101
102
twine check {wheel} &&
102
103
python {package}/ci/check_wheel_licenses.py {wheel}
103
- CIBW_CONFIG_SETTINGS : setup-args="--vsenv"
104
+ # On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
105
+ # MinGW on PATH that would be picked otherwise), switch to a static build for
106
+ # runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
107
+ # and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
108
+ # keeping shared state with the rest of the Python process/extensions.
109
+ CIBW_CONFIG_SETTINGS_WINDOWS : >-
110
+ setup-args="--vsenv"
111
+ setup-args="-Db_vscrt=mt"
112
+ setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
104
113
CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
105
114
CIBW_SKIP : " *-musllinux_aarch64"
106
115
CIBW_TEST_COMMAND : >-
107
116
python {package}/ci/check_version_number.py
108
117
MACOSX_DEPLOYMENT_TARGET : " 10.12"
109
- MPL_DISABLE_FH4 : " yes"
110
118
strategy :
111
119
matrix :
112
120
include :
113
- - os : ubuntu-20.04
121
+ - os : ubuntu-latest
114
122
cibw_archs : " x86_64"
115
- - os : ubuntu-20 .04
123
+ - os : ubuntu-24 .04-arm
116
124
cibw_archs : " aarch64"
117
125
- os : windows-latest
118
126
cibw_archs : " auto64"
119
- - os : macos-12
127
+ - os : macos-13
120
128
cibw_archs : " x86_64"
121
129
- os : macos-14
122
130
cibw_archs : " arm64"
123
131
124
132
steps :
125
- - name : Set up QEMU
126
- if : matrix.cibw_archs == 'aarch64'
127
- uses : docker/setup-qemu-action@v3
128
- with :
129
- platforms : arm64
130
-
131
133
- name : Download sdist
132
- uses : actions/download-artifact@v4
134
+ uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
133
135
with :
134
136
name : cibw-sdist
135
137
path : dist/
136
138
139
+ - name : Build wheels for CPython 3.13
140
+ uses : pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
141
+ with :
142
+ package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
143
+ env :
144
+ CIBW_BUILD : " cp313-* cp313t-*"
145
+ CIBW_ENABLE : cpython-freethreading
146
+ # No free-threading wheels available for aarch64 on Pillow.
147
+ CIBW_TEST_SKIP : " cp313t-manylinux_aarch64"
148
+ CIBW_ARCHS : ${{ matrix.cibw_archs }}
149
+
137
150
- name : Build wheels for CPython 3.12
138
- uses : pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
151
+ uses : pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
139
152
with :
140
153
package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
141
154
env :
142
155
CIBW_BUILD : " cp312-*"
143
156
CIBW_ARCHS : ${{ matrix.cibw_archs }}
144
157
145
158
- name : Build wheels for CPython 3.11
146
- uses : pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
159
+ uses : pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
147
160
with :
148
161
package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
149
162
env :
150
163
CIBW_BUILD : " cp311-*"
151
164
CIBW_ARCHS : ${{ matrix.cibw_archs }}
152
165
153
166
- name : Build wheels for CPython 3.10
154
- uses : pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
167
+ uses : pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
155
168
with :
156
169
package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
157
170
env :
158
171
CIBW_BUILD : " cp310-*"
159
172
CIBW_ARCHS : ${{ matrix.cibw_archs }}
160
173
161
- - name : Build wheels for CPython 3.9
162
- uses : pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
163
- with :
164
- package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
165
- env :
166
- CIBW_BUILD : " cp39-*"
167
- CIBW_ARCHS : ${{ matrix.cibw_archs }}
168
-
169
174
- name : Build wheels for PyPy
170
- uses : pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
175
+ uses : pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
171
176
with :
172
177
package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
173
178
env :
174
- CIBW_BUILD : " pp39 -*"
179
+ CIBW_BUILD : " pp310 -*"
175
180
CIBW_ARCHS : ${{ matrix.cibw_archs }}
176
- if : matrix.cibw_archs != 'aarch64'
181
+ CIBW_ENABLE : pypy
182
+ if : matrix.cibw_archs != 'aarch64' && matrix.os != 'windows-latest'
177
183
178
- - uses : actions/upload-artifact@v4
184
+ - uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
179
185
with :
180
186
name : cibw-wheels-${{ runner.os }}-${{ matrix.cibw_archs }}
181
187
path : ./wheelhouse/*.whl
@@ -193,7 +199,7 @@ jobs:
193
199
contents : read
194
200
steps :
195
201
- name : Download packages
196
- uses : actions/download-artifact@v4
202
+ uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
197
203
with :
198
204
pattern : cibw-*
199
205
path : dist
@@ -203,9 +209,9 @@ jobs:
203
209
run : ls dist
204
210
205
211
- name : Generate artifact attestation for sdist and wheel
206
- uses : actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1 .2.0
212
+ uses : actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2 .2.0
207
213
with :
208
214
subject-path : dist/matplotlib-*
209
215
210
216
- name : Publish package distributions to PyPI
211
- uses : pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
217
+ uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
0 commit comments