parent
97205bd11a
commit
10c3e5b094
|
@ -118,6 +118,16 @@ jobs:
|
|||
}
|
||||
msrv: "MSRV"
|
||||
|
||||
# Test the `nightly` feature
|
||||
- rust: nightly
|
||||
python-version: "3.10"
|
||||
platform:
|
||||
{
|
||||
os: "ubuntu-latest",
|
||||
python-architecture: "x64",
|
||||
rust-target: "x86_64-unknown-linux-gnu",
|
||||
}
|
||||
extra_features: "nightly"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
@ -153,7 +163,7 @@ jobs:
|
|||
cargo update -p hashbrown:0.11.2 --precise 0.9.1
|
||||
|
||||
- name: Build docs
|
||||
run: cargo doc --no-deps --no-default-features --features full
|
||||
run: cargo doc --no-deps --no-default-features --features "full ${{ matrix.extra_features }}"
|
||||
|
||||
- name: Build (no features)
|
||||
run: cargo build --lib --tests --no-default-features
|
||||
|
@ -176,26 +186,26 @@ jobs:
|
|||
cargo test --no-default-features
|
||||
|
||||
- name: Build (all additive features)
|
||||
run: cargo build --lib --tests --no-default-features --features full
|
||||
run: cargo build --lib --tests --no-default-features --features "full ${{ matrix.extra_features }}"
|
||||
|
||||
- if: ${{ startsWith(matrix.python-version, 'pypy') }}
|
||||
name: Build PyPy (abi3-py37)
|
||||
run: cargo build --lib --tests --no-default-features --features "abi3-py37 full"
|
||||
run: cargo build --lib --tests --no-default-features --features "abi3-py37 full ${{ matrix.extra_features }}"
|
||||
|
||||
# Run tests (except on PyPy, because no embedding API).
|
||||
- if: ${{ !startsWith(matrix.python-version, 'pypy') }}
|
||||
name: Test
|
||||
run: cargo test --no-default-features --features full
|
||||
run: cargo test --no-default-features --features "full ${{ matrix.extra_features }}"
|
||||
|
||||
# Run tests again, but in abi3 mode
|
||||
- if: ${{ !startsWith(matrix.python-version, 'pypy') }}
|
||||
name: Test (abi3)
|
||||
run: cargo test --no-default-features --features "abi3 full"
|
||||
run: cargo test --no-default-features --features "abi3 full ${{ matrix.extra_features }}"
|
||||
|
||||
# Run tests again, for abi3-py37 (the minimal Python version)
|
||||
- if: ${{ (!startsWith(matrix.python-version, 'pypy')) && (matrix.python-version != '3.7') }}
|
||||
name: Test (abi3-py37)
|
||||
run: cargo test --no-default-features --features "abi3-py37 full"
|
||||
run: cargo test --no-default-features --features "abi3-py37 full ${{ matrix.extra_features }}"
|
||||
|
||||
- name: Test proc-macro code
|
||||
run: cargo test --manifest-path=pyo3-macros-backend/Cargo.toml
|
||||
|
|
|
@ -7,6 +7,7 @@ fn test_compile_errors() {
|
|||
_test_compile_errors()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "nightly"))]
|
||||
#[rustversion::nightly]
|
||||
#[test]
|
||||
fn test_compile_errors() {
|
||||
|
@ -15,6 +16,15 @@ fn test_compile_errors() {
|
|||
let _ = std::panic::catch_unwind(_test_compile_errors);
|
||||
}
|
||||
|
||||
#[cfg(feature = "nightly")]
|
||||
#[rustversion::nightly]
|
||||
#[test]
|
||||
fn test_compile_errors() {
|
||||
// nightly - don't care if test output is potentially wrong, to avoid churn in PyO3's CI thanks
|
||||
// to diagnostics changing on nightly.
|
||||
_test_compile_errors()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "nightly"))]
|
||||
fn _test_compile_errors() {
|
||||
let t = trybuild::TestCases::new();
|
||||
|
|
Loading…
Reference in New Issue