From ec6fbdeef2d6f3d43e559670e315be277bf1b536 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 +++++++------ examples/maturin_extension/pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f065e6429ef..05b893c82af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,25 +85,25 @@ jobs: run: echo LD_LIBRARY_PATH=${pythonLocation}/lib >> $GITHUB_ENV - name: Build docs - run: cargo doc --features "num-bigint num-complex" --verbose --target ${{ matrix.platform.rust-target }} + run: cargo doc --features "num-bigint num-complex" --verbose - 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 != 'pypy-3.6' 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 != 'pypy-3.6' 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-macros-backend/Cargo.toml --target ${{ matrix.platform.rust-target }} + run: cargo test --manifest-path=pyo3-macros-backend/Cargo.toml - name: Install python test dependencies run: | @@ -118,6 +118,7 @@ jobs: done env: + CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }} RUST_BACKTRACE: 1 coverage: diff --git a/examples/maturin_extension/pyproject.toml b/examples/maturin_extension/pyproject.toml index a53aa0ec7aa..ef4ed626c1d 100644 --- a/examples/maturin_extension/pyproject.toml +++ b/examples/maturin_extension/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["maturin @ git+https://github.com/davidhewitt/maturin.git@f4dce9879999ea404379e2ebcceb9af661bcd5ec"] +requires = ["maturin @ git+https://github.com/PyO3/maturin.git@9f8cdba7894cc65110d1ba94140adef97b91e1e3"] build-backend = "maturin"