From 931646ef97a0446af4d790fa7a063c79e35b0015 Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Tue, 10 Nov 2020 17:14:06 +0000 Subject: [PATCH] set rust target through env --- .github/workflows/ci.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9743d6727e7..dc5f295574c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,9 @@ jobs: platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" } msrv: "MSRV" + env: + CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }} + steps: - uses: actions/checkout@v2 @@ -85,22 +88,22 @@ jobs: run: echo LD_LIBRARY_PATH=${pythonLocation}/lib >> $GITHUB_ENV - name: Build without default features - run: cargo build --no-default-features --verbose --target ${{ matrix.platform.rust-target }} + run: cargo build --no-default-features --verbose - name: Build with default features - run: cargo build --features "num-bigint num-complex" --verbose --target ${{ matrix.platform.rust-target }} + run: cargo build --features "num-bigint num-complex" --verbose # Run tests (except on PyPy, because no embedding API). - if: matrix.python-version != 'pypy3' name: Test - run: cargo test --features "num-bigint num-complex" --target ${{ matrix.platform.rust-target }} + run: cargo test --features "num-bigint num-complex" # Run tests again, but in abi3 mode - if: matrix.python-version != 'pypy3' name: Test (abi3) - run: cargo test --no-default-features --features "abi3,macros" --target ${{ matrix.platform.rust-target }} + run: cargo test --no-default-features --features "abi3,macros" - name: Test proc-macro code - run: cargo test --manifest-path=pyo3-derive-backend/Cargo.toml --target ${{ matrix.platform.rust-target }} + run: cargo test --manifest-path=pyo3-derive-backend/Cargo.toml - name: Install python test dependencies run: |