Skip to content

Commit

Permalink
set rust target through env
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Nov 10, 2020
1 parent a169a71 commit 931646e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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: |
Expand Down

0 comments on commit 931646e

Please sign in to comment.