diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index aa608ef2d..2a8ed95c6 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -67,16 +67,14 @@ jobs: path: dist/*.whl if-no-files-found: error - linux: + linux-x86: runs-on: ubuntu-latest - # Add permissions to job permissions: id-token: write contents: read strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - target: [x86_64] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 @@ -84,14 +82,15 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --user cffi - python -m pip install --user patchelf + python -m pip install --upgrade pip + python -m pip install cffi + python -m pip install patchelf - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} - manylinux: auto - args: --release --out dist + target: x86_64 + manylinux: "2014" + args: --release --out dist --compatibility manylinux2014 sccache: 'true' - name: Upload wheels uses: actions/upload-artifact@v3 @@ -100,6 +99,39 @@ jobs: path: dist/*.whl if-no-files-found: error + linux-aarch64: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install cffi + python -m pip install patchelf + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: aarch64 + manylinux: "2014" + args: --release --out dist --compatibility manylinux2014 + target-features: +crt-static + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels-aarch64 + path: dist/*.whl + if-no-files-found: error + sdist: runs-on: ubuntu-latest # Add permissions to job @@ -123,7 +155,7 @@ jobs: release: name: Release runs-on: ubuntu-latest - needs: [macos, windows, linux, sdist] + needs: [macos, windows, linux-x86, linux-aarch64, sdist] # Keep existing permissions permissions: id-token: write diff --git a/pyproject.toml b/pyproject.toml index 28a8778db..8111fe7f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,6 @@ bindings = "pyo3" develop = true strip = true compatibility = "manylinux2014" -platform-tags = ["manylinux2014_x86_64", "manylinux2014_aarch64"] [tool.pytest.ini_options] testpaths = ["tests"]