From 431c263d57dc00286a57c936efc617f6565c6682 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Fri, 24 Jan 2025 12:15:53 +0100 Subject: [PATCH] Build linux-aarch64 packages on GitHub arm runners instead of using emulation --- .github/workflows/publish.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 790ca5d2f..86a732ac0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -67,12 +67,13 @@ jobs: build-linux: needs: [get_python_versions] - name: Build ${{ matrix.arch }} 🎡 and source 📦 on Linux - runs-on: ubuntu-latest + name: Build 🎡 and source 📦 on ${{ matrix.config.image }} + runs-on: ${{ matrix.config.image }} strategy: fail-fast: false matrix: - arch: [ auto64, aarch64 ] + config: [{arch: auto64, image: ubuntu-24.04}, + {arch: aarch64, image: ubuntu-24.04-arm}] steps: - uses: actions/checkout@v4 with: @@ -86,11 +87,7 @@ jobs: 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 + if: matrix.config.arch == 'auto64' - name: Install platformdirs run: python -m pip install platformdirs - name: Display cibuildwheel cache dir @@ -106,12 +103,12 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.cibuildwheel-cache.outputs.dir }} - key: ${{ runner.os }}-${{ matrix.arch }}-cibuildwheel + key: ${{ matrix.config.image }}-${{ matrix.config.arch }}-cibuildwheel - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 env: CIBW_PROJECT_REQUIRES_PYTHON: ">=${{ needs.get_python_versions.outputs.min-python }}" - CIBW_ARCHS_LINUX: ${{ matrix.arch }} + CIBW_ARCHS_LINUX: ${{ matrix.config.arch }} CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_SKIP: 'pp* *-musllinux_aarch64' CIBW_TEST_COMMAND: python {project}/dev/continuous-integration/run_simple_test.py @@ -121,7 +118,7 @@ jobs: - name: store distribution 📦 uses: actions/upload-artifact@v4 with: - name: packages-linux-${{ matrix.arch }} + name: packages-linux-${{ matrix.config.arch }} path: dist deploy_dev: