Skip to content

Commit 46ad882

Browse files
authored
Speedup wheels build (#631)
1 parent 5ea0e62 commit 46ad882

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

.github/workflows/ci.yml

+21-10
Original file line numberDiff line numberDiff line change
@@ -144,30 +144,41 @@ jobs:
144144
path: dist
145145

146146
build-wheels:
147-
name: Build wheels on ${{ matrix.os }}
148-
runs-on: ${{ matrix.os }}
147+
name: Build wheels on ${{ matrix.os }} ${{ matrix.qemu }}
148+
runs-on: ${{ matrix.os }}-latest
149149
needs: pre-deploy
150150
strategy:
151151
matrix:
152-
os: [ubuntu-20.04, windows-2019, macos-10.15]
152+
os: [ubuntu, windows, macos]
153+
qemu: ['']
154+
include:
155+
# Split ubuntu job for the sake of speed-up
156+
- os: ubuntu
157+
qemu: aarch64
158+
- os: ubuntu
159+
qemu: ppc64le
160+
- os: ubuntu
161+
qemu: s390x
153162
steps:
154163
- name: Checkout
155164
uses: actions/checkout@v2.3.4
156165
- name: Set up QEMU
157-
if: runner.os == 'Linux'
166+
if: ${{ matrix.qemu }}
158167
uses: docker/setup-qemu-action@v1
159168
with:
160169
platforms: all
161170
id: qemu
162-
- name: Available platforms
163-
if: runner.os == 'Linux'
164-
run: echo "${{ steps.qemu.outputs.platforms }}"
171+
- name: Prepare emulation
172+
run: |
173+
if [[ -n "${{ matrix.qemu }}" ]]; then
174+
# Build emulated architectures only if QEMU is set,
175+
# use default "auto" otherwise
176+
echo "CIBW_ARCHS_LINUX=${{ matrix.qemu }}" >> $GITHUB_ENV
177+
fi
178+
shell: bash
165179
- name: Build wheels
166180
uses: pypa/cibuildwheel@v2.2.0a1
167181
env:
168-
# configure cibuildwheel to build native archs ('auto'), and some
169-
# emulated ones
170-
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
171182
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
172183
- uses: actions/upload-artifact@v2
173184
with:

0 commit comments

Comments
 (0)