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 97abf32
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,28 @@ jobs:
with:
path: dist/*.tar.gz

choose_architectures:
name: Decide which architectures to build wheels for
runs-on: ubuntu-latest
steps:
- id: x86_64
run: echo "cibw_arch=x86_64" >> $GITHUB_OUTPUT
- id: aarch64
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]
needs: [build_sdist, choose_architectures]
name: Wheel for Linux-${{ matrix.cibw_python }}-${{ matrix.cibw_arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
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 97abf32

Please sign in to comment.