From 227100f049c50e5967df8919b036fb7851c3a887 Mon Sep 17 00:00:00 2001 From: laggykiller Date: Fri, 2 Feb 2024 17:40:03 +0800 Subject: [PATCH 1/6] Test building arm64 on windows and linux --- .github/workflows/python-packages.yml | 38 ++++++++++++++------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/python-packages.yml b/.github/workflows/python-packages.yml index 36cae1c..1e90f68 100644 --- a/.github/workflows/python-packages.yml +++ b/.github/workflows/python-packages.yml @@ -62,7 +62,9 @@ jobs: - name: "Build wheels" uses: pypa/cibuildwheel@v2.16.4 env: + CIBW_ARCHS_WINDOWS: AMD64 ARM64 x86 CIBW_ARCHS_MACOS: x86_64 arm64 universal2 + CIBW_ARCHS_LINUX: x86_64 i686 aarch64 PIP_USE_PEP517: 1 - name: "Upload artifacts" @@ -72,26 +74,26 @@ jobs: path: ./wheelhouse/*.whl retention-days: 7 - publish_pypi: + # publish_pypi: - name: "Publish packages on PyPI" - runs-on: ubuntu-latest - needs: - - build_sdist - - build_wheels + # name: "Publish packages on PyPI" + # runs-on: ubuntu-latest + # needs: + # - build_sdist + # - build_wheels - steps: + # steps: - - name: "Download artifacts" - uses: actions/download-artifact@v4 + # - name: "Download artifacts" + # uses: actions/download-artifact@v4 - - name: "Move packages to the dist/ folder" - run: | - mkdir dist/ - mv sdist/* dist/ - mv wheels-*/*.whl dist/ + # - name: "Move packages to the dist/ folder" + # run: | + # mkdir dist/ + # mv sdist/* dist/ + # mv wheels-*/*.whl dist/ - - name: "Publish packages on PyPI" - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} + # - name: "Publish packages on PyPI" + # uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # password: ${{ secrets.PYPI_API_TOKEN }} From 262cdf0e93ae3d87ccfc6ec0af226f2b91c02e13 Mon Sep 17 00:00:00 2001 From: laggykiller Date: Fri, 2 Feb 2024 17:45:03 +0800 Subject: [PATCH 2/6] Test building arm64 on windows and linux --- .github/workflows/python-packages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-packages.yml b/.github/workflows/python-packages.yml index 1e90f68..d891d4c 100644 --- a/.github/workflows/python-packages.yml +++ b/.github/workflows/python-packages.yml @@ -62,9 +62,9 @@ jobs: - name: "Build wheels" uses: pypa/cibuildwheel@v2.16.4 env: - CIBW_ARCHS_WINDOWS: AMD64 ARM64 x86 - CIBW_ARCHS_MACOS: x86_64 arm64 universal2 - CIBW_ARCHS_LINUX: x86_64 i686 aarch64 + CIBW_ARCHS_WINDOWS: "AMD64 ARM64 x86" + CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" + CIBW_ARCHS_LINUX: "x86_64 i686 aarch64" PIP_USE_PEP517: 1 - name: "Upload artifacts" From 825589138cbb4888014fa9342e8a1506074fe224 Mon Sep 17 00:00:00 2001 From: laggykiller Date: Fri, 2 Feb 2024 17:56:10 +0800 Subject: [PATCH 3/6] Test building arm64 on windows and linux --- .github/workflows/python-packages.yml | 34 +++++++++++++++++++++------ 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-packages.yml b/.github/workflows/python-packages.yml index d891d4c..aef84c5 100644 --- a/.github/workflows/python-packages.yml +++ b/.github/workflows/python-packages.yml @@ -47,10 +47,25 @@ jobs: strategy: matrix: - os: - - ubuntu-22.04 - - windows-2019 - - macos-11 + include: + - os: windows-2019 + cibw_archs: AMD64 + - os: windows-2019 + cibw_archs: ARM64 + - os: windows-2019 + cibw_archs: x86 + - os: macos-11 + cibw_archs: x86_64 + - os: macos-11 + cibw_archs: arm64 + - os: macos-11 + cibw_archs: universal2 + - os: ubuntu-22.04 + cibw_archs: x86_64 + - os: ubuntu-22.04 + cibw_archs: i686 + - os: ubuntu-22.04 + cibw_archs: aarch64 steps: @@ -58,13 +73,18 @@ jobs: uses: actions/checkout@v4 with: submodules: true + + - name: Set up QEMU + if: runner.os == 'Linux' + uses: docker/setup-qemu-action@v2 + with: + platforms: all - name: "Build wheels" uses: pypa/cibuildwheel@v2.16.4 env: - CIBW_ARCHS_WINDOWS: "AMD64 ARM64 x86" - CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" - CIBW_ARCHS_LINUX: "x86_64 i686 aarch64" + CIBW_ARCHS: ${{ matrix.cibw_archs }} + CIBW_BUILD: "*" PIP_USE_PEP517: 1 - name: "Upload artifacts" From afe573cb28b6e0fcd6097499dfc49d2a2db98660 Mon Sep 17 00:00:00 2001 From: laggykiller Date: Fri, 2 Feb 2024 17:59:19 +0800 Subject: [PATCH 4/6] Test building arm64 on windows and linux --- .github/workflows/python-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-packages.yml b/.github/workflows/python-packages.yml index aef84c5..7baebae 100644 --- a/.github/workflows/python-packages.yml +++ b/.github/workflows/python-packages.yml @@ -42,7 +42,7 @@ jobs: build_wheels: - name: "Build wheels on ${{ matrix.os }}" + name: "Build wheels on ${{ matrix.os }} ${{ matrix.cibw_archs }}" runs-on: ${{ matrix.os }} strategy: @@ -81,7 +81,7 @@ jobs: platforms: all - name: "Build wheels" - uses: pypa/cibuildwheel@v2.16.4 + uses: pypa/cibuildwheel@v2.16.5 env: CIBW_ARCHS: ${{ matrix.cibw_archs }} CIBW_BUILD: "*" From 2ea394ffd5bded3fd773b9257f0e1b27de165eea Mon Sep 17 00:00:00 2001 From: laggykiller Date: Fri, 2 Feb 2024 18:09:44 +0800 Subject: [PATCH 5/6] Building arm64 on windows and linux --- .github/workflows/python-packages.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-packages.yml b/.github/workflows/python-packages.yml index 7baebae..178ca2f 100644 --- a/.github/workflows/python-packages.yml +++ b/.github/workflows/python-packages.yml @@ -84,13 +84,12 @@ jobs: uses: pypa/cibuildwheel@v2.16.5 env: CIBW_ARCHS: ${{ matrix.cibw_archs }} - CIBW_BUILD: "*" PIP_USE_PEP517: 1 - name: "Upload artifacts" uses: actions/upload-artifact@v4 with: - name: wheels-${{ matrix.os }} + name: wheels-${{ matrix.os }}-${{ matrix.cibw_archs }} path: ./wheelhouse/*.whl retention-days: 7 From 97d7b02483d1c9198515722d676948fabeeaf4c6 Mon Sep 17 00:00:00 2001 From: laggykiller Date: Fri, 2 Feb 2024 18:28:52 +0800 Subject: [PATCH 6/6] Re-enable publish_pypi --- .github/workflows/python-packages.yml | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/python-packages.yml b/.github/workflows/python-packages.yml index 178ca2f..c8a01a0 100644 --- a/.github/workflows/python-packages.yml +++ b/.github/workflows/python-packages.yml @@ -93,26 +93,26 @@ jobs: path: ./wheelhouse/*.whl retention-days: 7 - # publish_pypi: + publish_pypi: - # name: "Publish packages on PyPI" - # runs-on: ubuntu-latest - # needs: - # - build_sdist - # - build_wheels + name: "Publish packages on PyPI" + runs-on: ubuntu-latest + needs: + - build_sdist + - build_wheels - # steps: + steps: - # - name: "Download artifacts" - # uses: actions/download-artifact@v4 + - name: "Download artifacts" + uses: actions/download-artifact@v4 - # - name: "Move packages to the dist/ folder" - # run: | - # mkdir dist/ - # mv sdist/* dist/ - # mv wheels-*/*.whl dist/ + - name: "Move packages to the dist/ folder" + run: | + mkdir dist/ + mv sdist/* dist/ + mv wheels-*/*.whl dist/ - # - name: "Publish packages on PyPI" - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # password: ${{ secrets.PYPI_API_TOKEN }} + - name: "Publish packages on PyPI" + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}