Skip to content

Commit b3e7a01

Browse files
committed
Add rand_pcg to workspace and fix Cargo.toml
This includes forcing bincode/i128 to fix *most* test runners
1 parent 905e255 commit b3e7a01

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@ matrix:
6060
include:
6161
- rust: 1.22.0
6262
env: DESCRIPTION="pinned stable Rust release"
63+
script:
64+
# Differs from standard script: rand_pcg features
65+
- cargo test --lib --no-default-features
66+
# TODO: add simd_support feature:
67+
- cargo test --features=serde1,log
68+
- cargo test --examples
69+
- cargo test --manifest-path rand_core/Cargo.toml
70+
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
71+
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
72+
# TODO: cannot test rand_pcg due to explicit dependency on i128
73+
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
74+
- cargo test --manifest-path rand_chacha/Cargo.toml
75+
- cargo test --manifest-path rand_hc128/Cargo.toml
6376

6477
- rust: stable
6578
env: DESCRIPTION="stable Rust release, macOS, iOS (cross-compile only)"

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ simd_support = ["packed_simd"] # enables SIMD support
2828
serde1 = ["rand_core/serde1", "rand_isaac/serde1", "rand_xorshift/serde1"] # enables serialization for PRNGs
2929

3030
[workspace]
31-
members = ["rand_core", "rand_isaac", "rand_chacha", "rand_hc128", "rand_xorshift"]
31+
members = ["rand_core", "rand_isaac", "rand_chacha", "rand_hc128", "rand_pcg", "rand_xorshift"]
3232

3333
[dependencies]
3434
rand_core = { path = "rand_core", version = "0.3", default-features = false }

rand_pcg/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ appveyor = { repository = "rust-random/rand" }
2222
serde1 = ["serde", "serde_derive"]
2323

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

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

3436
[build-dependencies]
3537
rustc_version = "0.2"

0 commit comments

Comments
 (0)