Skip to content

Commit b1da49e

Browse files
committed
Build: Reverse build setup to increase the parallelism.
1 parent a0f2972 commit b1da49e

File tree

1 file changed

+29
-22
lines changed

1 file changed

+29
-22
lines changed

.github/workflows/wheels.yml

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,25 @@ jobs:
166166
github.event_name == 'release' ||
167167
(github.event_name == 'schedule' && github.repository == 'cython/cython') ||
168168
github.event_name == 'workflow_dispatch'
169-
runs-on: ${{ matrix.os }}
170169
171170
strategy:
172171
fail-fast: false
173172
matrix:
174-
os:
175-
- 'ubuntu-latest'
176-
- 'ubuntu-24.04'
177-
- 'ubuntu-24.04-arm'
178-
- 'windows-latest'
179-
- 'windows-11-arm'
180-
- 'macos-latest'
173+
target:
174+
# Smaller set of platforms that we only provide Stable ABI wheels for:
175+
- 'musllinux_x86_64'
176+
- 'musllinux_aarch64'
177+
- 'manylinux_i686'
178+
- 'musllinux_i686'
179+
- 'manylinux_ppc64le'
180+
- 'musllinux_ppc64le'
181+
- 'manylinux_riscv64'
182+
- 'musllinux_riscv64'
183+
- 'manylinux_armv7l'
184+
- 'musllinux_armv7l'
185+
- 'macosx_x86_64'
186+
- 'win32'
187+
- 'win_arm64'
181188
lapiversion:
182189
- "3.9"
183190
- "3.12"
@@ -194,6 +201,15 @@ jobs:
194201
- os: 'windows-11-arm'
195202
lapiversion: '3.10'
196203

204+
runs-on: ${{
205+
contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' ||
206+
contains(matrix.target, 'armv7l') && 'ubuntu-24.04-arm' ||
207+
contains(matrix.target, 'win_arm64') && 'windows-11-arm' ||
208+
contains(matrix.target, 'win32') && 'windows-latest' ||
209+
contains(matrix.target, 'macosx') && 'macos-latest' ||
210+
'ubuntu-latest'
211+
}}
212+
197213
steps:
198214
- name: Check out project
199215
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -219,30 +235,21 @@ jobs:
219235
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
220236
221237
- name: Setup Visual Studio on Windows
222-
if: contains(matrix.os, 'windows')
238+
if: startsWith(matrix.target, 'win')
223239
uses: TheMrMilchmann/setup-msvc-dev@79dac248aac9d0059f86eae9d8b5bfab4e95e97c # v4.0.0
224240
with:
225-
arch: ${{ matrix.os == 'windows-latest' && 'x86' || matrix.os == 'windows-11-arm' && 'arm64' || '' }}
241+
arch: ${{ matrix.target == 'win32' && 'x86' || matrix.target == 'win_arm64' && 'arm64' || matrix.target == 'win_amd64' && 'amd64' || '' }}
226242

227243
- name: Fix link in Windows
228-
if: contains(matrix.os, 'windows')
244+
if: startsWith(matrix.target, 'win')
229245
# Prevent 'link' from being found before 'link.exe'
230246
shell: bash
231247
run: rm -f /usr/bin/link
232248

233249
- name: Build wheels
234250
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
235251
env:
236-
# Smaller set of platforms that we only provide Stable ABI wheels for
237-
CIBW_BUILD: |
238-
${{
239-
matrix.os == 'ubuntu-24.04-arm' && '*armv7l *musllinux_aarch64' ||
240-
matrix.os == 'ubuntu-24.04' && '*linux_i686 *linux_ppc64le' ||
241-
matrix.os == 'ubuntu-latest' && '*musllinux_x86_64 *linux_riscv64' ||
242-
matrix.os == 'windows-latest' && '*win32' ||
243-
matrix.os == 'windows-11-arm' && '*win_arm64' ||
244-
matrix.os == 'macos-latest' && '*macosx_x86_64' ||
245-
'' }}
252+
CIBW_BUILD: "*${{ matrix.target }}"
246253
CIBW_SKIP: "cp31*t-*"
247254
CIBW_PROJECT_REQUIRES_PYTHON: ">=${{ matrix.lapiversion }}"
248255
LUPA_LIMITED_API: "${{ matrix.lapiversion }}"
@@ -255,7 +262,7 @@ jobs:
255262
- name: Upload wheels
256263
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
257264
with:
258-
name: Stable-ABI-${{ matrix.os }}-${{ matrix.lapiversion }}
265+
name: Stable-ABI-${{ matrix.target }}-${{ matrix.lapiversion }}
259266
path: ./wheelhouse/*.whl
260267

261268
upload_release_assets:

0 commit comments

Comments
 (0)