@@ -34,19 +34,20 @@ jobs:
3434 'CI: Run cibuildwheel')
3535 )
3636 name : Build sdist
37- runs-on : ubuntu-20.04
37+ runs-on : ubuntu-latest
3838 outputs :
3939 SDIST_NAME : ${{ steps.sdist.outputs.SDIST_NAME }}
4040
4141 steps :
42- - uses : actions/checkout@v4
42+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4343 with :
4444 fetch-depth : 0
45+ persist-credentials : false
4546
46- - uses : actions/setup-python@v5
47+ - uses : actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
4748 name : Install Python
4849 with :
49- python-version : 3.9
50+ python-version : ' 3.10 '
5051
5152 # Something changed somewhere that prevents the downloaded-at-build-time
5253 # licenses from being included in built wheels, so pre-download them so
6970 run : twine check dist/*
7071
7172 - name : Upload sdist result
72- uses : actions/upload-artifact@v4
73+ uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
7374 with :
7475 name : cibw-sdist
7576 path : dist/*.tar.gz
@@ -100,82 +101,87 @@ jobs:
100101 CIBW_AFTER_BUILD : >-
101102 twine check {wheel} &&
102103 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']"
104113 CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
105114 CIBW_SKIP : " *-musllinux_aarch64"
106115 CIBW_TEST_COMMAND : >-
107116 python {package}/ci/check_version_number.py
108117 MACOSX_DEPLOYMENT_TARGET : " 10.12"
109- MPL_DISABLE_FH4 : " yes"
110118 strategy :
111119 matrix :
112120 include :
113- - os : ubuntu-20.04
121+ - os : ubuntu-latest
114122 cibw_archs : " x86_64"
115- - os : ubuntu-20 .04
123+ - os : ubuntu-24 .04-arm
116124 cibw_archs : " aarch64"
117125 - os : windows-latest
118126 cibw_archs : " auto64"
119- - os : macos-12
127+ - os : macos-13
120128 cibw_archs : " x86_64"
121129 - os : macos-14
122130 cibw_archs : " arm64"
123131
124132 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-
131133 - name : Download sdist
132- uses : actions/download-artifact@v4
134+ uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
133135 with :
134136 name : cibw-sdist
135137 path : dist/
136138
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+
137150 - name : Build wheels for CPython 3.12
138- uses : pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
151+ uses : pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
139152 with :
140153 package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
141154 env :
142155 CIBW_BUILD : " cp312-*"
143156 CIBW_ARCHS : ${{ matrix.cibw_archs }}
144157
145158 - name : Build wheels for CPython 3.11
146- uses : pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
159+ uses : pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
147160 with :
148161 package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
149162 env :
150163 CIBW_BUILD : " cp311-*"
151164 CIBW_ARCHS : ${{ matrix.cibw_archs }}
152165
153166 - name : Build wheels for CPython 3.10
154- uses : pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
167+ uses : pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
155168 with :
156169 package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
157170 env :
158171 CIBW_BUILD : " cp310-*"
159172 CIBW_ARCHS : ${{ matrix.cibw_archs }}
160173
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-
169174 - name : Build wheels for PyPy
170- uses : pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
175+ uses : pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
171176 with :
172177 package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
173178 env :
174- CIBW_BUILD : " pp39 -*"
179+ CIBW_BUILD : " pp310 -*"
175180 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'
177183
178- - uses : actions/upload-artifact@v4
184+ - uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
179185 with :
180186 name : cibw-wheels-${{ runner.os }}-${{ matrix.cibw_archs }}
181187 path : ./wheelhouse/*.whl
@@ -193,7 +199,7 @@ jobs:
193199 contents : read
194200 steps :
195201 - name : Download packages
196- uses : actions/download-artifact@v4
202+ uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
197203 with :
198204 pattern : cibw-*
199205 path : dist
@@ -203,9 +209,9 @@ jobs:
203209 run : ls dist
204210
205211 - 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
207213 with :
208214 subject-path : dist/matplotlib-*
209215
210216 - 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