From eeff5f8cc96d6f7ae3c73aa152721fde1c2a30e0 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Wed, 8 Nov 2023 18:06:13 +0000 Subject: [PATCH] Add build for linux aarch64 (arm64) --- .github/workflows/build.sh | 2 ++ .github/workflows/wheels.yaml | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 1ce1209..5dc61fd 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -11,6 +11,8 @@ if [[ "$MB_PYTHON_VERSION" == pypy3* ]]; then MB_PYTHON_OSX_VER="10.9" if [[ "$PLAT" == "i686" ]]; then DOCKER_TEST_IMAGE="multibuild/xenial_$PLAT" + elif [[ "$PLAT" == "aarch64" ]]; then + DOCKER_TEST_IMAGE="multibuild/focal_arm64v8" else DOCKER_TEST_IMAGE="multibuild/focal_$PLAT" fi diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index a94918f..0fb4c18 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -16,11 +16,13 @@ jobs: matrix: os: [ "ubuntu-20.04", "macos-12" ] python: [ "3.8" , "3.9", "3.10", "3.11", "3.12" ] - platform: [ "x86_64" ] + platform: [ "x86_64", "aarch64" ] macos-target: [ "10.15" ] exclude: - os: "macos-12" platform: "i686" + - os: "macos-12" + platform: "aarch64" include: - os: "macos-12" os-name: "osx" @@ -41,6 +43,15 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.x" + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: tonistiigi/binfmt:master # lastest is recommended but faster qemu v8 is only currently available on master. + platforms: linux/arm64 + if: startsWith(matrix.os, 'ubuntu') + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + if: startsWith(matrix.os, 'ubuntu') - name: Build Wheel run: .github/workflows/build.sh - uses: actions/upload-artifact@v3