Skip to content

Commit

Permalink
feat: migrate to using native arm runners for wheel builds (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jan 17, 2025
1 parent 6e203e3 commit bdf08d2
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-24.04-arm, ubuntu-latest]
musl: ["", "musllinux"]
arch:
- "x86_64"
- "aarch64"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "main"

- name: Set up QEMU
if: matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

# Used to host cibuildwheel
- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -170,27 +160,15 @@ jobs:
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.22.0

- name: Build wheels (manylinux)
run: python -m cibuildwheel --output-dir wheelhouse
if: matrix.musl == ''
# to supply options, put them in 'env', like:
env:
CIBW_SKIP: "*p36-* *p37-* *p38-* *musllinux*"
CIBW_BEFORE_ALL_LINUX: apt-get install -y gcc || yum install -y gcc || apk add gcc
CIBW_BUILD_VERBOSITY: 3
REQUIRE_CYTHON: 1
CIBW_ARCHS: ${{ matrix.arch }}

- name: Build wheels (musl)
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
if: matrix.musl == 'musllinux'
# to supply options, put them in 'env', like:
env:
CIBW_SKIP: "*p36-* *p37-* *p38-* *manylinux*"
CIBW_SKIP: "*p36-* *p37-* *p38-* ${{ matrix.musl == 'musllinux' && '*manylinux*' || '*musllinux*' }}"
CIBW_BEFORE_ALL_LINUX: apt-get install -y gcc || yum install -y gcc || apk add gcc
CIBW_BUILD_VERBOSITY: 3
REQUIRE_CYTHON: 1
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_ARCHS_LINUX: ${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64' || 'auto' }}

- uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit bdf08d2

Please sign in to comment.