Skip to content

Commit cf981e8

Browse files
committed
Parallelize linux cibw jobs
1 parent a60f60c commit cf981e8

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,23 +134,46 @@ jobs:
134134
- lint
135135
- mypy
136136

137-
name: Build wheels on ${{ matrix.os }}
137+
name: Build wheels on ${{ matrix.os }} ${{ matrix.name_suffix }}
138138
runs-on: ${{ matrix.os }}
139139
strategy:
140140
matrix:
141141
os:
142-
- ubuntu-latest
143142
- windows-latest
144143
- macos-latest
144+
include:
145+
# Only build CPython 3.x targets
146+
- cibw_build: "cp3*"
147+
cibw_skip: ""
148+
name_suffix: ""
149+
150+
# Parallelize Linux builds because there are many!
151+
- os: ubuntu-latest
152+
name_suffix: "manylinux_x86_64"
153+
cibw_build: "cp3*-manylinux_x86_64"
154+
cibw_skip: ""
155+
- os: ubuntu-latest
156+
name_suffix: "manylinux_i686"
157+
cibw_build: "cp3*-manylinux_i686"
158+
cibw_skip: ""
159+
- os: ubuntu-latest
160+
name_suffix: "musllinux_x86_64"
161+
cibw_build: "cp3*-musllinux_x86_64"
162+
cibw_skip: ""
163+
- os: ubuntu-latest
164+
name_suffix: "others"
165+
cibw_build: "cp3*"
166+
cibw_skip: "cp3*-{manylinux_x86_64,manylinux_i686,musllinux_x86_64}"
167+
145168

146169
steps:
147170
- uses: actions/checkout@v2
148171

149172
- name: Build wheels
150173
uses: pypa/[email protected]
151174
env:
152-
# Only build CPython 3.x targets
153-
CIBW_BUILD: "cp3*"
175+
CIBW_BUILD: ${{ matrix.cibw_build }}
176+
CIBW_SKIP: ${{ matrix.cibw_skip }}
154177
# Ensure full C++17 availability on macOS builds
155178
MACOSX_DEPLOYMENT_TARGET: "10.13"
156179
# Signal setup.py to fail if binary build fails

0 commit comments

Comments
 (0)