From cae2a1585b3ac4e75088f8cde54a6f5c051e9996 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Thu, 29 Dec 2022 19:34:34 +0000 Subject: [PATCH 1/5] Use cibuildwheel to generate arm64 and aarch64 wheels --- .github/workflows/build_dist.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_dist.yml b/.github/workflows/build_dist.yml index 6adb192..5a06b30 100644 --- a/.github/workflows/build_dist.yml +++ b/.github/workflows/build_dist.yml @@ -36,8 +36,6 @@ jobs: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] cibw_build: [cp37-*, cp38-*, cp39-*, cp310-*, cp311-*] - cibw_archs_linux: [auto, ] # aarch64] - cibw_skip: ["cp*-musllinux*", ] steps: - name: Check out repository uses: actions/checkout@v2 @@ -53,12 +51,15 @@ jobs: with: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.11.2 + uses: pypa/cibuildwheel@v2.11.4 env: - CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }} + CIBW_ARCHS_LINUX: "x86_64 i686 aarch64" + CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" + CIBW_ARCHS_WINDOWS: "AMD64 x86" CIBW_BUILD: ${{ matrix.cibw_build }} - CIBW_SKIP: ${{ matrix.cibw_skip }} + CIBW_SKIP: "cp*-musllinux*" CIBW_TEST_COMMAND: "tox -c {project}" + CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64 *-*linux_{aarch64,ppc64le,s390x}" CIBW_BEFORE_BUILD: "python -m pip install -U pip && python -m pip install tox" - name: Save wheels uses: actions/upload-artifact@v2 From c8b526ba4d2ecbaa99e99eea11ad151cebe9210c Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Thu, 29 Dec 2022 19:40:16 +0000 Subject: [PATCH 2/5] Clean up github actions job name --- .github/workflows/build_dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_dist.yml b/.github/workflows/build_dist.yml index 5a06b30..95d8173 100644 --- a/.github/workflows/build_dist.yml +++ b/.github/workflows/build_dist.yml @@ -30,7 +30,7 @@ jobs: path: dist/*.tar.gz wheels: - name: Build wheels on ${{ matrix.os }} CIBW_BUILD=${{ matrix.cibw_build }} CIBW_ARCHS_LINUX=${{ matrix.cibw_archs_linux }} + name: Build wheels on ${{ matrix.os }} CIBW_BUILD=${{ matrix.cibw_build }} runs-on: ${{ matrix.os }} strategy: matrix: From ecc325562e2fa3f25174602bc9561008207c5748 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Thu, 29 Dec 2022 19:53:39 +0000 Subject: [PATCH 3/5] Disable universal2 wheel building on MacOS This fails at present. See: https://github.com/pypa/cibuildwheel/issues/1385 --- .github/workflows/build_dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_dist.yml b/.github/workflows/build_dist.yml index 95d8173..31f6c3d 100644 --- a/.github/workflows/build_dist.yml +++ b/.github/workflows/build_dist.yml @@ -54,7 +54,7 @@ jobs: uses: pypa/cibuildwheel@v2.11.4 env: CIBW_ARCHS_LINUX: "x86_64 i686 aarch64" - CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" + CIBW_ARCHS_MACOS: "x86_64 arm64" # universal2" CIBW_ARCHS_WINDOWS: "AMD64 x86" CIBW_BUILD: ${{ matrix.cibw_build }} CIBW_SKIP: "cp*-musllinux*" From 0906b2058238b9c3909b34861ed661595a5f58b2 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Thu, 29 Dec 2022 20:32:52 +0000 Subject: [PATCH 4/5] Fix QEMU installation on github actions --- .github/workflows/build_dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_dist.yml b/.github/workflows/build_dist.yml index 31f6c3d..b8b349e 100644 --- a/.github/workflows/build_dist.yml +++ b/.github/workflows/build_dist.yml @@ -46,7 +46,7 @@ jobs: with: python-version: 3.x - name: Set up QEMU # Needed to build aarch64 wheels - if: runner.os == 'Linux' && matrix.cibw_archs_linux == 'aarch64' + if: runner.os == 'Linux' uses: docker/setup-qemu-action@v1 with: platforms: all From db26ca10d5e173bb96d512705631f328abe749e1 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Thu, 29 Dec 2022 20:54:28 +0000 Subject: [PATCH 5/5] Update versions of github actions to most recent stable --- .github/workflows/build_dist.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_dist.yml b/.github/workflows/build_dist.yml index b8b349e..6f8838a 100644 --- a/.github/workflows/build_dist.yml +++ b/.github/workflows/build_dist.yml @@ -38,16 +38,16 @@ jobs: cibw_build: [cp37-*, cp38-*, cp39-*, cp310-*, cp311-*] steps: - name: Check out repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 # To ensure tags are retrieved to enabe setuptools_scm to work - name: Install Python 3.x - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.x - name: Set up QEMU # Needed to build aarch64 wheels if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: platforms: all - name: Build wheels @@ -72,11 +72,11 @@ jobs: runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@master + - uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} skip_existing: true