feat: migrate to using native arm runners for wheel builds (#366)

This commit is contained in:
J. Nick Koston
2025-01-17 09:29:43 -10:00
committed by GitHub
parent 6e203e3bda
commit bdf08d253b

View File

@@ -131,24 +131,14 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest] os: [ubuntu-24.04-arm, ubuntu-latest]
musl: ["", "musllinux"] musl: ["", "musllinux"]
arch:
- "x86_64"
- "aarch64"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
ref: "main" ref: "main"
- name: Set up QEMU
if: matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
# Used to host cibuildwheel # Used to host cibuildwheel
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
@@ -170,27 +160,15 @@ jobs:
- name: Install cibuildwheel - name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.22.0 run: python -m pip install cibuildwheel==2.22.0
- name: Build wheels (manylinux) - name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse run: python -m cibuildwheel --output-dir wheelhouse
if: matrix.musl == ''
# to supply options, put them in 'env', like: # to supply options, put them in 'env', like:
env: env:
CIBW_SKIP: "*p36-* *p37-* *p38-* *musllinux*" 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_BEFORE_ALL_LINUX: apt-get install -y gcc || yum install -y gcc || apk add gcc
CIBW_BUILD_VERBOSITY: 3 CIBW_BUILD_VERBOSITY: 3
REQUIRE_CYTHON: 1 REQUIRE_CYTHON: 1
CIBW_ARCHS: ${{ matrix.arch }} CIBW_ARCHS_LINUX: ${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64' || 'auto' }}
- name: Build wheels (musl)
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_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 }}
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with: