Skip to content

Commit

Permalink
Build aarch64 python packages during releases
Browse files Browse the repository at this point in the history
  • Loading branch information
dralley authored and inknos committed Feb 27, 2024
1 parent 8dd406f commit 6ba5a7c
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ jobs:
build_bdist:
name: Build binary wheels
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: auto64 # native 64-bit
skip: "pp* *-musllinux_* cp36* cp37* cp38*" # no PyPy or musl builds, no older Python versions
- arch: aarch64
skip: "pp* *-musllinux_* cp36* cp37* cp38* cp310* cp312*" # qemu builds are incredibly slow, so only do 3.9 and 3.11
# TODO: when github actions gets native aarch64 runners, we can ditch qemu and not worry about the emulation performance

steps:
- uses: actions/checkout@v4

Expand All @@ -45,16 +54,20 @@ jobs:
with:
python-version: '3.x'

# for other architectures, see: https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation
- name: Set up QEMU
if: runner.os == 'Linux' && ${{ matrix.arch }} == "aarch64"
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Build wheels for CPython
uses: pypa/[email protected].2
uses: pypa/[email protected].5
env:
CIBW_ARCHS: auto64 # only 64-bit
CIBW_SKIP: "pp* *-musllinux_* cp36* cp37* cp38*" # no PyPy or musl builds, no older Python versions
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 # centos 7
CIBW_BEFORE_ALL_LINUX: yum -y install yum-utils epel-release && yes | yum-builddep createrepo_c.spec
# CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 # centos 8, but not supported widely yet
# CIBW_BEFORE_ALL_LINUX: dnf -y install epel-release && yes | dnf -y builddep createrepo_c.spec
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_SKIP: ${{ matrix.skip }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 # alma 8
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
CIBW_BEFORE_ALL_LINUX: dnf -y install epel-release && yes | dnf -y builddep createrepo_c.spec
CIBW_BEFORE_BUILD: python -m pip install scikit-build
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: |
Expand All @@ -76,7 +89,7 @@ jobs:
name: artifact
path: dist

- uses: pypa/[email protected].10
- uses: pypa/[email protected].11
with:
user: __token__
password: ${{secrets.PYPI_API_TOKEN}}
Expand Down

0 comments on commit 6ba5a7c

Please sign in to comment.