From 75ea17192768e532488815c55b81978ee1ce3532 Mon Sep 17 00:00:00 2001 From: messense Date: Mon, 11 Apr 2022 00:19:20 +0800 Subject: [PATCH] Use `cargo-xwin` to test windows msvc cross compilation --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9999c65aa46..bb2ef4353a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -274,12 +274,13 @@ jobs: - name: Test cross compile to Windows if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.python-version == '3.8' }} env: - CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER: rust-lld + XWIN_ARCH: x86_64 run: | sudo apt-get install -y mingw-w64 llvm rustup target add x86_64-pc-windows-gnu x86_64-pc-windows-msvc + which cargo-xwin > /dev/null || cargo install cargo-xwin cargo build --manifest-path examples/maturin-starter/Cargo.toml --features abi3 --target x86_64-pc-windows-gnu - cargo build --manifest-path examples/maturin-starter/Cargo.toml --features abi3 --target x86_64-pc-windows-msvc + cargo xwin build --manifest-path examples/maturin-starter/Cargo.toml --features abi3 --target x86_64-pc-windows-msvc - name: Test cross compile to Windows with maturin if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.python-version == '3.8' }} uses: messense/maturin-action@v1