Skip to content

Commit 5472fa6

Browse files
committed
Add Windows non-abi3 cross compile test
1 parent c477718 commit 5472fa6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,17 @@ jobs:
277277
env:
278278
XWIN_ARCH: x86_64
279279
run: |
280+
set -ex
280281
sudo apt-get install -y mingw-w64 llvm
281282
rustup target add x86_64-pc-windows-gnu x86_64-pc-windows-msvc
282283
python -m pip install cargo-xwin
284+
# abi3
283285
cargo build --manifest-path examples/maturin-starter/Cargo.toml --features abi3 --target x86_64-pc-windows-gnu
284286
cargo xwin build --manifest-path examples/maturin-starter/Cargo.toml --features abi3 --target x86_64-pc-windows-msvc
287+
# non-abi3
288+
export PYO3_CROSS_PYTHON_VERSION=3.9
289+
cargo build --manifest-path examples/maturin-starter/Cargo.toml --features generate-import-lib --target x86_64-pc-windows-gnu
290+
cargo xwin build --manifest-path examples/maturin-starter/Cargo.toml --features generate-import-lib --target x86_64-pc-windows-msvc
285291
- name: Test cross compile to Windows with maturin
286292
if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.python-version == '3.8' }}
287293
uses: messense/maturin-action@v1

examples/maturin-starter/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ crate-type = ["cdylib"]
1111
pyo3 = { path = "../../", features = ["extension-module"] }
1212

1313
[features]
14-
abi3 = ["pyo3/abi3-py37", "pyo3/generate-import-lib"]
14+
abi3 = ["pyo3/abi3-py37", "generate-import-lib"]
15+
generate-import-lib = ["pyo3/generate-import-lib"]
1516

1617
[workspace]

0 commit comments

Comments
 (0)