CI: more accurate no-default-feature and nightly test targets

Also more accurate flags in examples
This commit is contained in:
Diggory Hardy 2021-01-23 16:25:02 +00:00
parent 6a6b9fd06d
commit 22dec87aac
3 changed files with 6 additions and 5 deletions

View File

@ -73,14 +73,15 @@ jobs:
- name: Maybe nightly
if: ${{ matrix.toolchain == 'nightly' }}
run: |
cargo test --target ${{ matrix.target }} --tests --features=nightly
cargo test --target ${{ matrix.target }} --features=nightly
cargo test --target ${{ matrix.target }} --all-features
cargo test --target ${{ matrix.target }} --benches --features=nightly
cargo test --target ${{ matrix.target }} --manifest-path rand_distr/Cargo.toml --benches
- name: Test rand
run: |
cargo test --target ${{ matrix.target }} --tests --no-default-features
cargo test --target ${{ matrix.target }} --tests --no-default-features --features=alloc,getrandom,small_rng
cargo test --target ${{ matrix.target }} --lib --tests --no-default-features
cargo build --target ${{ matrix.target }} --no-default-features --features alloc,getrandom,small_rng
cargo test --target ${{ matrix.target }} --lib --tests --no-default-features --features=alloc,getrandom,small_rng
# all stable features:
cargo test --target ${{ matrix.target }} --features=serde1,log,small_rng
cargo test --target ${{ matrix.target }} --examples

View File

@ -24,7 +24,7 @@
//! the square at random, calculate the fraction that fall within the circle,
//! and multiply this fraction by 4.
#![cfg(feature = "std")]
#![cfg(all(feature = "std", feature = "std_rng"))]
use rand::distributions::{Distribution, Uniform};

View File

@ -26,7 +26,7 @@
//!
//! [Monty Hall Problem]: https://en.wikipedia.org/wiki/Monty_Hall_problem
#![cfg(feature = "std")]
#![cfg(all(feature = "std", feature = "std_rng"))]
use rand::distributions::{Distribution, Uniform};
use rand::Rng;