From b240a3e2d823ad01c6d9c47de09c533bd93f3695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Perceval=20Wajsb=C3=BCrt?= Date: Wed, 30 Aug 2023 18:01:03 +0200 Subject: [PATCH] ci: enable arm64 builds --- .github/workflows/release.yml | 34 ++++++++++++++++---------------- .github/workflows/test-build.yml | 26 +++++++++++++++++++++--- changelog.md | 1 + 3 files changed, 41 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f856eb..257b7af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,3 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Upload Python Package on: @@ -15,19 +7,30 @@ on: jobs: build_wheels: - name: Build wheels on ${{ matrix.os }} + name: Build wheels on ${{ matrix.os }}/${{ matrix.arch || '*' }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-latest] + include: + - os: macos-latest + arch: x86_64 + - os: macos-latest + arch: arm64 + - os: ubuntu-latest + arch: '*' # unused + - os: windows-latest + arch: '*' # unused steps: - uses: actions/checkout@v2 - name: Build wheels - uses: pypa/cibuildwheel@v2.4.0 + uses: pypa/cibuildwheel@v2.13.1 + env: + CIBW_ARCHS_MACOS: ${{ matrix.arch }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl @@ -40,7 +43,7 @@ jobs: - name: Build sdist run: pipx run build --sdist - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: dist/*.tar.gz @@ -53,12 +56,9 @@ jobs: id-token: write steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: artifact path: dist - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index a24e293..e7f5449 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -5,6 +5,7 @@ name: Test Build on: + workflow_dispatch: push: branches: - v*.*.* @@ -12,17 +13,32 @@ on: jobs: build_wheels: - name: Build wheels on ${{ matrix.os }} + name: Build wheels on ${{ matrix.os }}/${{ matrix.arch || '*' }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-latest] + include: + - os: macos-latest + arch: x86_64 + - os: macos-latest + arch: arm64 + - os: ubuntu-latest + arch: '*' # unused + - os: windows-latest + arch: '*' # unused steps: - uses: actions/checkout@v2 - name: Build wheels - uses: pypa/cibuildwheel@v2.4.0 + uses: pypa/cibuildwheel@v2.13.1 + env: + CIBW_ARCHS_MACOS: ${{ matrix.arch }} + + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl build_sdist: name: Build source distribution @@ -32,3 +48,7 @@ jobs: - name: Build sdist run: pipx run build --sdist + + - uses: actions/upload-artifact@v3 + with: + path: dist/*.tar.gz diff --git a/changelog.md b/changelog.md index ba7b66b..663e7c7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ # v0.3.1 - Enable sharing FoldedTensor instances in a multiprocessing + cuda context by autocloning the indexer before fork-pickling an instance +- Distribute arm64 wheels for macOS # v0.3.0