Add Windows abi3 wheel cross comiplation test

This commit is contained in:
messense 2022-04-10 22:05:30 +08:00
parent c84cecc1f7
commit c5ca6d040b
No known key found for this signature in database
GPG Key ID: BB41A8A2C716CCA9
2 changed files with 16 additions and 0 deletions

View File

@ -271,6 +271,19 @@ jobs:
target: aarch64-apple-darwin target: aarch64-apple-darwin
args: --release -i python3.9 --no-sdist -m examples/maturin-starter/Cargo.toml args: --release -i python3.9 --no-sdist -m examples/maturin-starter/Cargo.toml
- name: Test cross compile to Windows
if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.python-version == '3.10' }}
run: |
sudo apt-get install -y mingw-w64
rustup target add x86_64-pc-windows-gnu
cargo build --manifest-path examples/maturin-starter/Cargo.toml --features abi3 --target x86_64-pc-windows-gnu
- name: Test cross compile to Windows with maturin
if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.python-version == '3.10' }}
uses: messense/maturin-action@v1
with:
target: x86_64-pc-windows-gnu
args: --no-sdist -m examples/maturin-starter/Cargo.toml --cargo-extra-args="--features abi3"
env: env:
CARGO_TERM_VERBOSE: true CARGO_TERM_VERBOSE: true
CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }} CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }}

View File

@ -10,4 +10,7 @@ crate-type = ["cdylib"]
[dependencies] [dependencies]
pyo3 = { path = "../../", features = ["extension-module"] } pyo3 = { path = "../../", features = ["extension-module"] }
[features]
abi3 = ["pyo3/abi3-py37"]
[workspace] [workspace]