diff --git a/.travis.yml b/.travis.yml index 7d3633b9a6d..7e92264d57b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,26 +6,27 @@ sudo: false # - pinned stable, latest stable, beta and nightly Rust releases # - Linux, OS X, Android, iOS, bare metal (i.e. no_std) # - x86_64, ARMv7, a Big-Endian arch (MIPS) +# HACK: use --tests to disable doc-tests for rand_core 0.2 (see #619) matrix: include: - rust: 1.22.0 install: script: - cargo test --tests --no-default-features - - cargo test --package rand_core --no-default-features + - cargo test --package rand_core:0.2.2 --no-default-features --tests - cargo test --features serde1,log - rust: stable os: osx install: script: - cargo test --tests --no-default-features - - cargo test --package rand_core --no-default-features + - cargo test --package rand_core:0.2.2 --no-default-features --tests - cargo test --features serde1,log - rust: beta install: script: - cargo test --tests --no-default-features - - cargo test --package rand_core --no-default-features + - cargo test --package rand_core:0.2.2 --no-default-features --tests - cargo test --features serde1,log - rust: nightly install: @@ -34,7 +35,7 @@ matrix: - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH script: - cargo test --tests --no-default-features --features=alloc - - cargo test --package rand_core --no-default-features --features=alloc,serde1 + - cargo test --package rand_core:0.2.2 --no-default-features --features=alloc,serde1 --tests - cargo test --features serde1,log,nightly,alloc - cargo test --all --benches # remove cached documentation, otherwise files from previous PRs can get included diff --git a/appveyor.yml b/appveyor.yml index 97d3ce6fda1..a2bf7f98917 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,8 +32,8 @@ install: build: false test_script: - - cargo test --all # cannot use --all and --features together + - cargo test --all --tests # cannot use --all and --features together - cargo test --all --benches - cargo test --features serde1,log,nightly - cargo test --tests --no-default-features --features=alloc,serde1 - - cargo test --package rand_core --no-default-features --features=alloc,serde1 + - cargo test --package rand_core:0.2.2 --no-default-features --features=alloc,serde1 --tests diff --git a/rand_core/Cargo.toml b/rand_core/Cargo.toml index d5fad697393..d74b5cfd565 100644 --- a/rand_core/Cargo.toml +++ b/rand_core/Cargo.toml @@ -20,9 +20,7 @@ appveyor = { repository = "rust-random/rand" } [features] std = ["rand_core/std"] # use std library; should be default but for above bug alloc = ["rand_core/alloc"] # enables Vec and Box support without std -serde1 = ["rand_core/serde", "rand_core/serde_derive"] # enables serde for BlockRng wrapper +serde1 = ["rand_core/serde1"] # enables serde for BlockRng wrapper [dependencies] -rand_core = "0.3" -serde = { version = "1", optional = true } -serde_derive = { version = "^1.0.38", optional = true } +rand_core = { version = "0.3", default-features = false } diff --git a/utils/ci/script.sh b/utils/ci/script.sh index 21188f38d29..d0fec19a6a6 100644 --- a/utils/ci/script.sh +++ b/utils/ci/script.sh @@ -13,12 +13,12 @@ main() { if [ ! -z $NIGHTLY ]; then # have nightly Rust cross test --tests --no-default-features --features alloc --target $TARGET - cross test --package rand_core --no-default-features --features alloc --target $TARGET + cross test --package rand_core:0.2.2 --no-default-features --features alloc --target $TARGET --tests cross test --features serde1,log,nightly,alloc --target $TARGET cross test --all --benches --target $TARGET else # have stable Rust cross test --tests --no-default-features --target $TARGET - cross test --package rand_core --no-default-features --target $TARGET + cross test --package rand_core:0.2.2 --no-default-features --target $TARGET --tests cross test --features serde1,log --target $TARGET fi }