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 committed Feb 21, 2024
1 parent a71bce7 commit 4d5bcd9
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,23 @@ jobs:
pytest --verbose --color=yes ./
popd
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz


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 @@ -48,16 +57,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/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS: auto64 # only 64-bit
CIBW_SKIP: "pp* *-musllinux_*" # no PyPy builds
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 # centos 7
CIBW_BEFORE_ALL_LINUX: yum -y install yum-utils epel-release && yes | yum-builddep libcomps.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 libcomps.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 libcomps.spec
CIBW_BEFORE_BUILD: python -m pip install scikit-build
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: |
Expand All @@ -81,7 +94,7 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.8.10
- uses: pypa/gh-action-pypi-publish@v1.8.11
with:
user: __token__
password: ${{secrets.PYPI_API_TOKEN}}
Expand Down

0 comments on commit 4d5bcd9

Please sign in to comment.