Skip to content

Commit c146d11

Browse files
godlygeekpablogsal
authored andcommitted
ci: Skip aarch64 builds except for new releases
These builds are extremely slow due to needing to rely on emulation, and we can't adequately test them due to the emulation not providing all syscalls that we require. There's little point to wasting time building something that we can't test for every push to a PR branch, so we'll defer building these until the time a release is cut. Signed-off-by: Matt Wozniski <[email protected]>
1 parent 7f4d56b commit c146d11

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/build_wheels.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,28 @@ jobs:
3030
with:
3131
path: dist/*.tar.gz
3232

33+
choose_architectures:
34+
name: Decide which architectures to build wheels for
35+
runs-on: ubuntu-latest
36+
steps:
37+
- id: x86_64
38+
run: echo "cibw_arch=x86_64" >> $GITHUB_OUTPUT
39+
- id: aarch64
40+
if: github.event_name == 'release' && github.event.action == 'published'
41+
run: echo "cibw_arch=aarch64" >> $GITHUB_OUTPUT
42+
outputs:
43+
cibw_arches: ${{ toJSON(steps.*.outputs.cibw_arch) }}
44+
3345
build_wheels:
34-
needs: [build_sdist]
46+
needs: [build_sdist, choose_architectures]
3547
name: Wheel for Linux-${{ matrix.cibw_python }}-${{ matrix.cibw_arch }}
3648
runs-on: ${{ matrix.os }}
3749
strategy:
3850
fail-fast: false
3951
matrix:
4052
os: [ubuntu-latest]
4153
cibw_python: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*"]
42-
cibw_arch: ["x86_64", "aarch64"]
54+
cibw_arch: ${{ fromJSON(needs.choose_architectures.outputs.cibw_arches) }}
4355

4456
steps:
4557
- name: Disable ptrace security restrictions

0 commit comments

Comments
 (0)