From a67434208dbb11d4a2b81c0a9349eac5c39bc3de Mon Sep 17 00:00:00 2001 From: Mimoja Date: Wed, 26 Jun 2024 05:12:26 +0200 Subject: [PATCH] feat(ci): build wheels for aarch64 As github runners can be used with qemu we simply emulate the aarch64 cpu needed to build for it. This allows faster installations on tradionally weaker embedded hardware. Signed-off-by: Mimoja --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b90a942..ac8356ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,11 +104,14 @@ jobs: build_wheels: needs: [release] - name: Build wheels on ${{ matrix.os }} + name: Build wheels on ${{ matrix.os }} with arch ${{ matrix.arch }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-20.04] + arch: + - "x86_64" + - "aarch64" steps: - uses: actions/checkout@v3 @@ -116,6 +119,12 @@ jobs: fetch-depth: 0 ref: "main" + - name: Set up QEMU + if: matrix.arch == 'aarch64' + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + with: + platforms: arm64 + # Used to host cibuildwheel - name: Set up Python uses: actions/setup-python@v4 @@ -145,6 +154,7 @@ jobs: 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 with: