mirror of
https://github.com/encounter/lzokay-rs.git
synced 2025-10-21 16:35:46 +00:00
ci: Use zigbuild w/ maturin
This commit is contained in:
parent
ba32c59ef3
commit
76864cbaa4
45
.github/workflows/python.yml
vendored
45
.github/workflows/python.yml
vendored
@ -2,12 +2,7 @@ name: Python
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
tags:
|
|
||||||
- "*"
|
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@ -24,38 +19,40 @@ jobs:
|
|||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: linux
|
platform: linux
|
||||||
target: x86_64
|
target: x86_64
|
||||||
|
args: --zig
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: linux
|
platform: linux
|
||||||
target: x86
|
target: i686
|
||||||
|
args: --zig
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: linux
|
platform: linux
|
||||||
target: aarch64
|
target: aarch64
|
||||||
|
args: --zig
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: linux
|
platform: linux
|
||||||
target: armv7
|
target: armv7
|
||||||
- os: ubuntu-latest
|
args: --zig
|
||||||
platform: linux
|
|
||||||
target: s390x
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: linux
|
|
||||||
target: ppc64le
|
|
||||||
# Linux (musl libc)
|
# Linux (musl libc)
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: musllinux
|
platform: musllinux
|
||||||
target: x86_64
|
target: x86_64
|
||||||
manylinux: musllinux_1_2
|
manylinux: musllinux_1_2
|
||||||
|
args: --zig
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: musllinux
|
platform: musllinux
|
||||||
target: x86
|
target: i686
|
||||||
manylinux: musllinux_1_2
|
manylinux: musllinux_1_2
|
||||||
|
args: --zig
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: musllinux
|
platform: musllinux
|
||||||
target: aarch64
|
target: aarch64
|
||||||
manylinux: musllinux_1_2
|
manylinux: musllinux_1_2
|
||||||
|
args: --zig
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: musllinux
|
platform: musllinux
|
||||||
target: armv7
|
target: armv7
|
||||||
manylinux: musllinux_1_2
|
manylinux: musllinux_1_2
|
||||||
|
args: --zig
|
||||||
# macOS
|
# macOS
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
platform: macos
|
platform: macos
|
||||||
@ -66,28 +63,34 @@ jobs:
|
|||||||
# Windows
|
# Windows
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
platform: windows
|
platform: windows
|
||||||
target: x64
|
target: x86_64
|
||||||
|
python_arch: x64
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
platform: windows
|
platform: windows
|
||||||
target: x86
|
target: i686
|
||||||
|
python_arch: x86
|
||||||
|
- os: windows-11-arm
|
||||||
|
platform: windows
|
||||||
|
target: aarch64
|
||||||
|
python_arch: arm64
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
if: matrix.platform == 'windows'
|
if: matrix.python_arch
|
||||||
with:
|
with:
|
||||||
architecture: ${{ matrix.target }}
|
architecture: ${{ matrix.python_arch }}
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
args: --release --out dist
|
args: --release --out dist ${{ matrix.args }}
|
||||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
manylinux: ${{ matrix.manylinux || 'auto' }}
|
manylinux: ${{ matrix.manylinux || 'auto' }}
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
if: matrix.platform == 'windows'
|
if: matrix.python_arch
|
||||||
with:
|
with:
|
||||||
architecture: ${{ matrix.target }}
|
architecture: ${{ matrix.python_arch }}
|
||||||
python-version: |
|
python-version: |
|
||||||
3.13t
|
3.13t
|
||||||
3.14t
|
3.14t
|
||||||
@ -95,7 +98,7 @@ jobs:
|
|||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
target: ${{ matrix.target }}
|
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/') }}
|
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
manylinux: ${{ matrix.manylinux || 'auto' }}
|
manylinux: ${{ matrix.manylinux || 'auto' }}
|
||||||
- name: Upload wheels
|
- name: Upload wheels
|
||||||
|
@ -23,4 +23,4 @@ default = ["compress", "decompress", "std"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
zerocopy = { version = "0.8.27", default-features = false, features = ["derive"] }
|
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 }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user