Skip to content

Commit

Permalink
ci: Skip aarch64 builds except for new releases
Browse files Browse the repository at this point in the history
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 <mwozniski@bloomberg.net>
  • Loading branch information
godlygeek committed Jul 10, 2023
1 parent 7f4d56b commit 6b3c44c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ jobs:
with:
path: dist/*.tar.gz

choose_architectures:
# Prepares the 'cibw_arch' axis of the test matrix
runs-on: ubuntu-latest
steps:
- run: echo "cibw_arch=x86_64" >> $GITHUB_OUTPUT
- if: github.event_name == 'release' && github.event.action == 'published'
run: echo "cibw_arch=aarch64" >> $GITHUB_OUTPUT
outputs:
cibw_arches: ${{ toJSON(steps.*.outputs.cibw_arch) }}

build_wheels:
needs: [build_sdist]
name: Wheel for Linux-${{ matrix.cibw_python }}-${{ matrix.cibw_arch }}
Expand All @@ -39,7 +49,7 @@ jobs:
matrix:
os: [ubuntu-latest]
cibw_python: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*"]
cibw_arch: ["x86_64", "aarch64"]
cibw_arch: ${{ fromJSON(needs.choose_architectures.outputs.cibw_arches) }}

steps:
- name: Disable ptrace security restrictions
Expand Down

0 comments on commit 6b3c44c

Please sign in to comment.