Skip to content

Commit 0736863

Browse files
committed
ci: Build manylinux & musllinux wheels in parallel
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
1 parent 890845f commit 0736863

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

.github/workflows/build_wheels.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,27 @@ jobs:
2929
name: sdist
3030
path: dist/*.tar.gz
3131

32-
choose_architectures:
33-
name: Decide which architectures to build wheels for
32+
choose_wheel_types:
33+
name: Decide which wheel types to build
3434
runs-on: ubuntu-latest
3535
steps:
36-
- id: x86_64
37-
run: echo "cibw_arch=x86_64" >> $GITHUB_OUTPUT
38-
- id: aarch64
39-
run: echo "cibw_arch=aarch64" >> $GITHUB_OUTPUT
36+
- id: manylinux_x86_64
37+
run: echo "wheel_types=manylinux_x86_64" >> $GITHUB_OUTPUT
38+
- id: musllinux_x86_64
39+
run: echo "wheel_types=musllinux_x86_64" >> $GITHUB_OUTPUT
40+
- id: manylinux_aarch64
41+
run: echo "wheel_types=manylinux_aarch64" >> $GITHUB_OUTPUT
4042
outputs:
41-
cibw_arches: ${{ toJSON(steps.*.outputs.cibw_arch) }}
43+
wheel_types: ${{ toJSON(steps.*.outputs.wheel_types) }}
4244

4345
build_wheels:
44-
needs: [build_sdist, choose_architectures]
45-
name: Wheel for Linux ${{ matrix.cibw_arch }}
46-
runs-on: ${{ matrix.os }}
46+
needs: [build_sdist, choose_wheel_types]
47+
name: ${{ matrix.wheel_type }} wheels
48+
runs-on: ubuntu-latest
4749
strategy:
4850
fail-fast: false
4951
matrix:
50-
os: [ubuntu-latest]
51-
cibw_arch: ${{ fromJSON(needs.choose_architectures.outputs.cibw_arches) }}
52+
wheel_type: ${{ fromJSON(needs.choose_wheel_types.outputs.wheel_types) }}
5253

5354
steps:
5455
- name: Disable ptrace security restrictions
@@ -66,12 +67,12 @@ jobs:
6667
- name: Build wheels
6768
uses: pypa/cibuildwheel@v2.16.2
6869
env:
69-
CIBW_BUILD: "cp3{7..12}-*"
70-
CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }}
70+
CIBW_BUILD: "cp3{7..12}-${{ matrix.wheel_type }}"
71+
CIBW_ARCHS_LINUX: auto aarch64
7172
CIBW_PRERELEASE_PYTHONS: True
7273
- uses: actions/upload-artifact@v4
7374
with:
74-
name: ${{ matrix.cibw_arch }}-wheels
75+
name: ${{ matrix.wheel_type }}-wheels
7576
path: ./wheelhouse/*.whl
7677

7778
test_attaching_to_old_interpreters:
@@ -85,7 +86,7 @@ jobs:
8586
- uses: actions/checkout@v4
8687
- uses: actions/download-artifact@v4
8788
with:
88-
name: "x86_64-wheels"
89+
name: "manylinux_x86_64-wheels"
8990
path: dist
9091
- name: Set up Python
9192
uses: actions/setup-python@v5
@@ -127,7 +128,7 @@ jobs:
127128
python-version: "${{matrix.python_version}}-dev"
128129
- uses: actions/download-artifact@v4
129130
with:
130-
name: "x86_64-wheels"
131+
name: "manylinux_x86_64-wheels"
131132
path: dist
132133
- name: Set up dependencies
133134
run: |
@@ -168,7 +169,7 @@ jobs:
168169
apk add --update alpine-sdk bash alpine-sdk python3 python3-dev gdb musl-dbg python3-dbg
169170
- uses: actions/download-artifact@v4
170171
with:
171-
name: "x86_64-wheels"
172+
name: "musllinux_x86_64-wheels"
172173
path: dist
173174
- name: Install Python dependencies
174175
run: |
@@ -205,7 +206,7 @@ jobs:
205206
python3
206207
- uses: actions/download-artifact@v4
207208
with:
208-
name: "x86_64-wheels"
209+
name: "manylinux_x86_64-wheels"
209210
path: dist
210211
- name: Install Python dependencies
211212
run: |
@@ -240,7 +241,7 @@ jobs:
240241
python-wheel
241242
- uses: actions/download-artifact@v4
242243
with:
243-
name: "x86_64-wheels"
244+
name: "manylinux_x86_64-wheels"
244245
path: dist
245246
- name: Install Python dependencies
246247
run: |
@@ -278,7 +279,7 @@ jobs:
278279
python3-distutils
279280
- uses: actions/download-artifact@v4
280281
with:
281-
name: "x86_64-wheels"
282+
name: "manylinux_x86_64-wheels"
282283
path: dist
283284
- name: Install Python dependencies
284285
run: |

0 commit comments

Comments
 (0)