From 63b016ccb911b5eb484e6dcbbc216368aae83155 Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Mon, 15 Oct 2018 11:29:20 +0100 Subject: [PATCH] Add rand_pcg to workspace and fix Cargo.toml This includes forcing bincode/i128 to fix *most* test runners --- .travis.yml | 14 ++++++++++++++ Cargo.toml | 2 +- rand_pcg/Cargo.toml | 6 ++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b863e6c26d..8b14608d780 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,6 +60,20 @@ 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 serde1 feature due to explicit dependency on i128: + - cargo test --manifest-path rand_pcg/Cargo.toml + - 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)" diff --git a/Cargo.toml b/Cargo.toml index db23831b40a..5390fd9d970 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 } diff --git a/rand_pcg/Cargo.toml b/rand_pcg/Cargo.toml index c1f9795425c..ee35d8fdd82 100644 --- a/rand_pcg/Cargo.toml +++ b/rand_pcg/Cargo.toml @@ -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"