Skip to content

Commit

Permalink
Add rand_pcg to workspace and fix Cargo.toml
Browse files Browse the repository at this point in the history
This includes forcing bincode/i128 to fix *most* test runners
  • Loading branch information
dhardy committed Oct 15, 2018
1 parent 905e255 commit b3e7a01
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Expand Up @@ -60,6 +60,19 @@ matrix:
include:
- rust: 1.22.0
env: DESCRIPTION="pinned stable Rust release"
script:
# Differs from standard script: rand_pcg features
- cargo test --lib --no-default-features
# TODO: add simd_support feature:
- cargo test --features=serde1,log
- cargo test --examples
- cargo test --manifest-path rand_core/Cargo.toml
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
# TODO: cannot test rand_pcg due to explicit dependency on i128
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
- cargo test --manifest-path rand_chacha/Cargo.toml
- cargo test --manifest-path rand_hc128/Cargo.toml

- rust: stable
env: DESCRIPTION="stable Rust release, macOS, iOS (cross-compile only)"
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -28,7 +28,7 @@ simd_support = ["packed_simd"] # enables SIMD support
serde1 = ["rand_core/serde1", "rand_isaac/serde1", "rand_xorshift/serde1"] # enables serialization for PRNGs

[workspace]
members = ["rand_core", "rand_isaac", "rand_chacha", "rand_hc128", "rand_xorshift"]
members = ["rand_core", "rand_isaac", "rand_chacha", "rand_hc128", "rand_pcg", "rand_xorshift"]

[dependencies]
rand_core = { path = "rand_core", version = "0.3", default-features = false }
Expand Down
6 changes: 4 additions & 2 deletions rand_pcg/Cargo.toml
Expand Up @@ -22,14 +22,16 @@ appveyor = { repository = "rust-random/rand" }
serde1 = ["serde", "serde_derive"]

[dependencies]
rand_core = { version = "0.3", default-features=false }
rand_core = { path = "../rand_core", version = "0.3", default-features=false }
serde = { version = "1", optional = true }
serde_derive = { version = "^1.0.38", optional = true }

[dev-dependencies]
# This is for testing serde, unfortunately we can't specify feature-gated dev
# deps yet, see: https://github.com/rust-lang/cargo/issues/1596
bincode = { version = "1" }
# TODO: we shouldn't have to depend on i128 directly; it breaks tests on old
# compilers. `bincode` should automatically support this.
bincode = { version = "1", features = ["i128"] }

[build-dependencies]
rustc_version = "0.2"

0 comments on commit b3e7a01

Please sign in to comment.