diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 8ed80b3..1877bcc 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -2,12 +2,7 @@ name: Python on: push: - branches: - - main - tags: - - "*" pull_request: - workflow_dispatch: permissions: contents: read @@ -24,38 +19,40 @@ jobs: - os: ubuntu-latest platform: linux target: x86_64 + args: --zig - os: ubuntu-latest platform: linux - target: x86 + target: i686 + args: --zig - os: ubuntu-latest platform: linux target: aarch64 + args: --zig - os: ubuntu-latest platform: linux target: armv7 - - os: ubuntu-latest - platform: linux - target: s390x - - os: ubuntu-latest - platform: linux - target: ppc64le + args: --zig # Linux (musl libc) - os: ubuntu-latest platform: musllinux target: x86_64 manylinux: musllinux_1_2 + args: --zig - os: ubuntu-latest platform: musllinux - target: x86 + target: i686 manylinux: musllinux_1_2 + args: --zig - os: ubuntu-latest platform: musllinux target: aarch64 manylinux: musllinux_1_2 + args: --zig - os: ubuntu-latest platform: musllinux target: armv7 manylinux: musllinux_1_2 + args: --zig # macOS - os: macos-latest platform: macos @@ -66,28 +63,34 @@ jobs: # Windows - os: windows-latest platform: windows - target: x64 + target: x86_64 + python_arch: x64 - os: windows-latest platform: windows - target: x86 + target: i686 + python_arch: x86 + - os: windows-11-arm + platform: windows + target: aarch64 + python_arch: arm64 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - if: matrix.platform == 'windows' + if: matrix.python_arch with: - architecture: ${{ matrix.target }} + architecture: ${{ matrix.python_arch }} python-version: 3.x - name: Build wheels uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} - args: --release --out dist + args: --release --out dist ${{ matrix.args }} sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: ${{ matrix.manylinux || 'auto' }} - uses: actions/setup-python@v5 - if: matrix.platform == 'windows' + if: matrix.python_arch with: - architecture: ${{ matrix.target }} + architecture: ${{ matrix.python_arch }} python-version: | 3.13t 3.14t @@ -95,7 +98,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} - args: --release --out dist -i python3.13t -i python3.14t + args: --release --out dist ${{ matrix.args }} -i python3.13t -i python3.14t sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: ${{ matrix.manylinux || 'auto' }} - name: Upload wheels diff --git a/Cargo.toml b/Cargo.toml index 64a65c8..5120a4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,4 +23,4 @@ default = ["compress", "decompress", "std"] [dependencies] zerocopy = { version = "0.8.27", default-features = false, features = ["derive"] } -pyo3 = { version = "0.26.0", features = ["abi3-py310", "extension-module", "generate-import-lib"], optional = true } +pyo3 = { version = "0.26.0", features = ["abi3-py310", "extension-module"], optional = true }