diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 2a8ed95c6..64c3d961f 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -95,7 +95,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v3 with: - name: wheels + name: wheels-x86_64 path: dist/*.whl if-no-files-found: error @@ -109,11 +109,19 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Install cross-compilation tools run: | + sudo apt-get update + sudo apt-get install -y crossbuild-essential-arm64 python -m pip install --upgrade pip python -m pip install cffi python -m pip install patchelf @@ -124,6 +132,7 @@ jobs: manylinux: "2014" args: --release --out dist --compatibility manylinux2014 target-features: +crt-static + container-options: --platform linux/arm64 sccache: 'true' - name: Upload wheels uses: actions/upload-artifact@v3 @@ -148,7 +157,7 @@ jobs: - name: Upload sdist uses: actions/upload-artifact@v3 with: - name: wheels + name: sdist path: dist/*.tar.gz if-no-files-found: error @@ -156,20 +165,28 @@ jobs: name: Release runs-on: ubuntu-latest needs: [macos, windows, linux-x86, linux-aarch64, sdist] - # Keep existing permissions permissions: id-token: write - contents: read + contents: write steps: + - uses: actions/download-artifact@v3 + with: + name: wheels-x86_64 + path: dist + - uses: actions/download-artifact@v3 + with: + name: wheels-aarch64 + path: dist - uses: actions/download-artifact@v3 with: name: wheels path: dist - - name: Display structure of downloaded files - run: ls -R dist + - uses: actions/download-artifact@v3 + with: + name: sdist + path: dist - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - packages-dir: dist/ - verbose: true - print-hash: true \ No newline at end of file + skip-existing: true + verbose: true \ No newline at end of file