-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build linux-aarch64 packages on GitHub arm runners instead of using e…
…mulation
- Loading branch information
Showing
1 changed file
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,12 +67,8 @@ jobs: | |
|
||
build-linux: | ||
needs: [get_python_versions] | ||
name: Build ${{ matrix.arch }} 🎡 and source 📦 on Linux | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: [ auto64, aarch64 ] | ||
name: Build x86_64 🎡 and source 📦 on Linux | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -85,12 +81,7 @@ jobs: | |
- name: Build source tarball | ||
run: | | ||
python -m pip install --upgrade pip build | ||
python -m build --sdist --config-setting=--formats=gztar --config-setting=--with-cython --config-setting=--fail-on-error | ||
if: ${{ matrix.arch == 'auto64' }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
python -m build --sdist --config-setting=--formats=gztar --config-setting=--with-cython --config-setting=--fail-on-error | ||
- name: Install platformdirs | ||
run: python -m pip install platformdirs | ||
- name: Display cibuildwheel cache dir | ||
|
@@ -111,8 +102,52 @@ jobs: | |
uses: pypa/[email protected] | ||
env: | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=${{ needs.get_python_versions.outputs.min-python }}" | ||
CIBW_ARCHS_LINUX: ${{ matrix.arch }} | ||
CIBW_ARCHS_LINUX: auto64 | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | ||
CIBW_TEST_COMMAND: python {project}/dev/continuous-integration/run_simple_test.py | ||
CIBW_TEST_REQUIRES: pytest | ||
with: | ||
output-dir: dist | ||
- name: store distribution 📦 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: packages-linux-auto64 | ||
path: dist | ||
|
||
build-linux-arm: | ||
needs: [get_python_versions] | ||
name: Build aarch64 🎡 on Linux | ||
runs-on: ubuntu-24.04-arm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
- name: Install platformdirs | ||
run: python -m pip install platformdirs | ||
- name: Display cibuildwheel cache dir | ||
id: cibuildwheel-cache | ||
run: | | ||
from platformdirs import user_cache_path | ||
import os | ||
with open(os.getenv('GITHUB_OUTPUT'), 'w') as f: | ||
f.write(f"dir={str(user_cache_path(appname='cibuildwheel', appauthor='pypa'))}") | ||
shell: python | ||
- name: Cache cibuildwheel tools | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.cibuildwheel-cache.outputs.dir }} | ||
key: ${{ runner.os }}-${{ matrix.arch }}-cibuildwheel | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=${{ needs.get_python_versions.outputs.min-python }}" | ||
CIBW_ARCHS_LINUX: aarch64 | ||
CIBW_SKIP: 'pp* *-musllinux_aarch64' | ||
CIBW_TEST_COMMAND: python {project}/dev/continuous-integration/run_simple_test.py | ||
CIBW_TEST_REQUIRES: pytest | ||
|
@@ -121,7 +156,7 @@ jobs: | |
- name: store distribution 📦 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: packages-linux-${{ matrix.arch }} | ||
name: packages-linux-aarch64 | ||
path: dist | ||
|
||
deploy_dev: | ||
|