4444 contents : write
4545
4646 steps :
47- - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.1.1
47+ - name : Check out project
48+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4849
4950 - name : Set up Python
5051 uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
@@ -72,26 +73,31 @@ jobs:
7273 outputs :
7374 include : ${{ steps.set-matrix.outputs.include }}
7475 steps :
75- - uses : actions/checkout@v6.0.1
76+ - name : Check out project
77+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7678 - name : Install cibuildwheel
7779 # Nb. keep cibuildwheel version pin consistent with job below
78- run : pipx install cibuildwheel==3.3.0
80+ run : pipx install cibuildwheel==3.4.1
7981 - id : set-matrix
8082 run : |
8183 MATRIX=$(
8284 {
83- cibuildwheel --print-build-identifiers --platform linux \
85+ cibuildwheel --print-build-identifiers --platform linux --archs x86_64 \
8486 | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
8587 | sed -e '/aarch64\|armv7l/s|ubuntu-latest|ubuntu-24.04-arm|' \
8688 && cibuildwheel --print-build-identifiers --platform macos \
8789 | jq -nRc '{"only": inputs, "os": "macos-latest"}' \
88- && cibuildwheel --print-build-identifiers --platform windows \
90+ && cibuildwheel --print-build-identifiers --platform windows --archs x86,AMD64 \
8991 | jq -nRc '{"only": inputs, "os": "windows-2022"}' \
9092 && cibuildwheel --print-build-identifiers --platform windows --archs ARM64 \
9193 | jq -nRc '{"only": inputs, "os": "windows-11-arm"}'
9294 } | jq -sc
9395 )
96+ echo "include=$MATRIX"
9497 echo "include=$MATRIX" >> $GITHUB_OUTPUT
98+ env :
99+ # Skip abi3 targets here:
100+ CIBW_SKIP : " cp3{9,1?}-win_arm64 cp3{9,1?}-win32 cp3{9,1?}-macosx_x86_64 pp* *musllinux*"
95101
96102 build_wheels :
97103 name : Build ${{ matrix.only }}
@@ -104,8 +110,8 @@ jobs:
104110 include : ${{ fromJson(needs.generate-wheels-matrix.outputs.include) }}
105111
106112 steps :
107- - name : Check out the repo
108- uses : actions/checkout@v6.0.1
113+ - name : Check out project
114+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
109115
110116 - name : Set up QEMU
111117 if : runner.os == 'Linux'
@@ -114,14 +120,14 @@ jobs:
114120 platforms : all
115121
116122 - name : Build wheels
117- uses : pypa/cibuildwheel@v3.3.0
123+ uses : pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
118124 with :
119125 only : ${{ matrix.only }}
120126
121127 - name : Build faster Linux wheels
122128 # also build wheels with the most recent manylinux images and gcc
123129 if : runner.os == 'Linux' && !contains(matrix.only, 'i686')
124- uses : pypa/cibuildwheel@v3.3.0
130+ uses : pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
125131 env :
126132 CIBW_MANYLINUX_X86_64_IMAGE : manylinux_2_34
127133 CIBW_MANYLINUX_AARCH64_IMAGE : manylinux_2_34 # manylinux_2_39 ?
@@ -143,9 +149,88 @@ jobs:
143149 path : ./wheelhouse/*.whl
144150 name : wheels-${{ matrix.only }}
145151
152+ build_limited_api_wheels :
153+ name : Build ${{ matrix.target }} Stable ABI ${{ matrix.lapiversion }} wheels
154+ if : >-
155+ github.event_name == 'push' ||
156+ github.event_name == 'release' ||
157+ (github.event_name == 'schedule' && github.repository == 'cython/cython') ||
158+ github.event_name == 'workflow_dispatch'
159+
160+ strategy :
161+ fail-fast : false
162+ matrix :
163+ target :
164+ # Smaller set of platforms that we only provide Stable ABI wheels for:
165+ - ' musllinux_x86_64'
166+ - ' musllinux_aarch64'
167+ - ' manylinux_i686'
168+ - ' musllinux_i686'
169+ - ' manylinux_ppc64le'
170+ - ' musllinux_ppc64le'
171+ - ' manylinux_riscv64'
172+ - ' musllinux_riscv64'
173+ - ' manylinux_armv7l'
174+ - ' musllinux_armv7l'
175+ - ' macosx_x86_64'
176+ - ' win32'
177+ - ' win_arm64'
178+ lapiversion :
179+ - " 3.9"
180+ - " 3.12"
181+
182+ runs-on : ${{
183+ contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' ||
184+ contains(matrix.target, 'armv7l') && 'ubuntu-24.04-arm' ||
185+ contains(matrix.target, 'win_arm64') && 'windows-11-arm' ||
186+ contains(matrix.target, 'win32') && 'windows-latest' ||
187+ contains(matrix.target, 'macosx') && 'macos-latest' ||
188+ ' ubuntu-latest'
189+ }}
190+
191+ steps :
192+ - name : Check out project
193+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
194+
195+ - name : Set up Python
196+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
197+ with :
198+ python-version : ' 3.x'
199+
200+ - name : Set up QEMU
201+ if : runner.os == 'Linux'
202+ uses : docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
203+ with :
204+ platforms : all
205+
206+ - name : Setup Visual Studio on Windows
207+ if : startsWith(matrix.target, 'win')
208+ uses : TheMrMilchmann/setup-msvc-dev@79dac248aac9d0059f86eae9d8b5bfab4e95e97c # v4.0.0
209+ with :
210+ arch : ${{ matrix.target == 'win32' && 'x86' || matrix.target == 'win_arm64' && 'arm64' || matrix.target == 'win_amd64' && 'amd64' || '' }}
211+
212+ - name : Build wheels
213+ uses : pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
214+ env :
215+ CIBW_BUILD : " *${{ matrix.target }}"
216+ CIBW_SKIP : " cp31*t-* pp3*"
217+ CIBW_PROJECT_REQUIRES_PYTHON : " >=${{ matrix.lapiversion }}"
218+ QUICKTIONS_LIMITED_API : " ${{ matrix.lapiversion }}"
219+
220+ - name : Check wheel
221+ run : |
222+ python -m pip install twine
223+ python -m twine check ./wheelhouse/*.whl
224+
225+ - name : Upload wheels
226+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
227+ with :
228+ name : Stable-ABI-${{ matrix.target }}-${{ matrix.lapiversion }}
229+ path : ./wheelhouse/*.whl
230+
146231 merge_wheels :
147232 name : Merge wheel archives
148- needs : build_wheels
233+ needs : [ build_wheels, build_limited_api_wheels]
149234 runs-on : ubuntu-latest
150235
151236 steps :
@@ -167,8 +252,8 @@ jobs:
167252 contents : write
168253
169254 steps :
170- - name : Check out the repo
171- uses : actions/checkout@v6.0.1
255+ - name : Check out project
256+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
172257
173258 - name : Download files
174259 uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
0 commit comments