summaryrefslogtreecommitdiff
path: root/rand/.travis.yml
diff options
context:
space:
mode:
Diffstat (limited to 'rand/.travis.yml')
-rw-r--r--rand/.travis.yml115
1 files changed, 100 insertions, 15 deletions
diff --git a/rand/.travis.yml b/rand/.travis.yml
index b41e681..f3790dc 100644
--- a/rand/.travis.yml
+++ b/rand/.travis.yml
@@ -34,11 +34,11 @@ sudo: false
# CRATE FEATURES, TESTS, AND SUB-CRATES
# Goal: Run unit tests, doctests, examples, and test benchmarks for all crates,
# in configurations that cover all interesting combinations of features.
-# (`--lib` only runs unit tests just like `--tests`, but the latter is not
-# available in Rust 1.22.0)
# Tests run on rand:
# - test no_std support, but only the unit tests:
-# `cargo test --lib --no-default-features`
+# `cargo test --tests --no-default-features`
+# - test no_std support, including the alloc feature:
+# cargo test --tests --no-default-features --features=alloc
# - run unit tests and doctests with all features which are available on stable:
# `cargo test --features=serde1,log`
# - test examples:
@@ -46,8 +46,6 @@ sudo: false
# Additional tests on nightly:
# - run unit tests and doctests with all features which are available on nightly:
# `cargo test --all-features`
-# - test no_std support, including the nightly alloc feature:
-# cargo test --lib --no-default-features --features=alloc
# - run benchmarks as tests:
# `cargo test --benches --features=nightly`
# Tests on subcrates:
@@ -56,72 +54,106 @@ sudo: false
#
# TODO: SIMD support on stable releases
# NOTE: SIMD support is unreliable on nightly; we track the latest release
+# NOTE: Test for alloc feature in no_std is not included here because it depends
+# on the alloc crate stabilized in Rust 1.36.
matrix:
include:
- - rust: 1.22.0
- env: DESCRIPTION="pinned stable Rust release"
+ - rust: 1.32.0
+ env: DESCRIPTION="Linux, 1.32.0"
+ os: linux
script:
# Differs from standard script: rand_pcg features
- - cargo test --lib --no-default-features
+ - cargo test --tests --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_distr/Cargo.toml
- 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_xoshiro/Cargo.toml
- cargo test --manifest-path rand_chacha/Cargo.toml
- cargo test --manifest-path rand_hc/Cargo.toml
+ - cargo test --manifest-path rand_jitter/Cargo.toml
- cargo test --manifest-path rand_os/Cargo.toml
+ - rust: 1.32.0
+ env: DESCRIPTION="OSX, 1.32.0"
+ os: osx
+ script:
+ # Differs from standard script: rand_pcg features
+ - cargo test --tests --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_distr/Cargo.toml
+ - 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_xoshiro/Cargo.toml
+ - cargo test --manifest-path rand_chacha/Cargo.toml
+ - cargo test --manifest-path rand_hc/Cargo.toml
+ - cargo test --manifest-path rand_jitter/Cargo.toml
+ - cargo test --manifest-path rand_os/Cargo.toml
+
+ - rust: stable
+ env: DESCRIPTION="Linux, stable"
+
- rust: stable
- env: DESCRIPTION="stable Rust release, macOS, iOS (cross-compile only)"
+ env: DESCRIPTION="OSX+iOS, stable"
os: osx
install:
- rustup target add aarch64-apple-ios
script:
# Differs from standard script: includes aarch64-apple-ios cross-build
- - cargo test --lib --no-default-features
+ - cargo test --tests --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_distr/Cargo.toml
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
- cargo test --manifest-path rand_xoshiro/Cargo.toml
- cargo test --manifest-path rand_chacha/Cargo.toml
- cargo test --manifest-path rand_hc/Cargo.toml
+ - cargo test --manifest-path rand_jitter/Cargo.toml
- cargo test --manifest-path rand_os/Cargo.toml
- cargo build --target=aarch64-apple-ios
- rust: beta
- env: DESCRIPTION="beta Rust release"
+ env: DESCRIPTION="Linux, beta"
- rust: nightly
- env: DESCRIPTION="nightly features, benchmarks, documentation"
+ os: linux
+ env: DESCRIPTION="Linux, nightly, docs"
install:
- cargo --list | egrep "^\s*deadlinks$" -q || cargo install cargo-deadlinks
- cargo deadlinks -V
before_script:
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
script:
- # Differs from standard script: alloc feature, all features, doc build
- - cargo test --lib --no-default-features --features=alloc
+ # Differs from standard script: all features, doc build
+ - cargo test --tests --no-default-features --features=alloc
- cargo test --all-features
- cargo test --benches --features=nightly
- cargo test --examples
- cargo test --manifest-path rand_core/Cargo.toml
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc
+ - cargo test --manifest-path rand_distr/Cargo.toml
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
- cargo test --manifest-path rand_xoshiro/Cargo.toml
- cargo test --manifest-path rand_chacha/Cargo.toml
- cargo test --manifest-path rand_hc/Cargo.toml
+ - cargo test --manifest-path rand_jitter/Cargo.toml
- cargo test --manifest-path rand_os/Cargo.toml
# remove cached documentation, otherwise files from previous PRs can get included
- rm -rf target/doc
@@ -131,6 +163,34 @@ matrix:
- travis-cargo --only nightly doc-upload
- rust: nightly
+ os: osx
+ env: DESCRIPTION="OSX, nightly, docs"
+ install:
+ - cargo --list | egrep "^\s*deadlinks$" -q || cargo install cargo-deadlinks
+ - cargo deadlinks -V
+ script:
+ # Differs from standard script: all features, doc build
+ - cargo test --tests --no-default-features --features=alloc
+ - cargo test --all-features
+ - cargo test --benches --features=nightly
+ - cargo test --examples
+ - cargo test --manifest-path rand_core/Cargo.toml
+ - cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc
+ - cargo test --manifest-path rand_distr/Cargo.toml
+ - cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
+ - cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
+ - cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
+ - cargo test --manifest-path rand_xoshiro/Cargo.toml
+ - cargo test --manifest-path rand_chacha/Cargo.toml
+ - cargo test --manifest-path rand_hc/Cargo.toml
+ - cargo test --manifest-path rand_jitter/Cargo.toml
+ - cargo test --manifest-path rand_os/Cargo.toml
+ # remove cached documentation, otherwise files from previous PRs can get included
+ - rm -rf target/doc
+ - cargo doc --no-deps --all --all-features
+ - cargo deadlinks --dir target/doc
+
+ - rust: nightly
env: DESCRIPTION="WASM via emscripten, stdweb and wasm-bindgen"
install:
- rustup target add wasm32-unknown-unknown
@@ -139,6 +199,8 @@ matrix:
- ./utils/ci/install_cargo_web.sh
- cargo web prepare-emscripten
- cargo web -V
+ - cargo list | grep install-update || cargo install -f cargo-update
+ - cargo install-update -i cargo-update wasm-bindgen-cli wasm-pack
addons:
chrome: stable
script:
@@ -151,6 +213,10 @@ matrix:
#- cargo build --target wasm32-unknown-unknown # without any features
- cargo build --target wasm32-unknown-unknown --features=wasm-bindgen
- cargo web test --target wasm32-unknown-unknown --features=stdweb
+ - cargo build --manifest-path tests/wasm_bindgen/Cargo.toml --target wasm32-unknown-unknown
+ - wasm-bindgen --nodejs target/wasm32-unknown-unknown/debug/rand_wasm_bindgen_test.wasm --out-dir tests/wasm_bindgen/js
+ - node tests/wasm_bindgen/js/index.js
+ - wasm-pack test --node tests/wasm_bindgen
- rust: nightly
env: DESCRIPTION="cross-platform builder (doesn't run tests)"
@@ -162,6 +228,7 @@ matrix:
- rustup target add x86_64-unknown-netbsd
- rustup target add x86_64-unknown-redox
script:
+ # Test the top-level crate with all features:
- cargo build --target=x86_64-sun-solaris --all-features
- cargo build --target=x86_64-unknown-cloudabi --all-features
- cargo build --target=x86_64-unknown-freebsd --all-features
@@ -190,24 +257,42 @@ matrix:
- source ~/.cargo/env || true
script:
- bash utils/ci/script.sh
+ - rust: nightly
+ env: DESCRIPTION="no_std platform test"
+ install:
+ - rustup target add thumbv6m-none-eabi
+ script:
+ # Test the top-level crate with all features:
+ - cargo build --target=thumbv6m-none-eabi --no-default-features
+
+ - rust: nightly
+ os: linux
+ env: DESCRIPTION="Miri, nightly"
+ script:
+ - sh utils/ci/miri.sh
before_install:
- set -e
- rustup self update
script:
- - cargo test --lib --no-default-features
+ - cargo test --tests --no-default-features
+ - cargo test --tests --no-default-features --features getrandom
+ - cargo test --tests --no-default-features --features=alloc
# 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_core/Cargo.toml --no-default-features --features=alloc
+ - cargo test --manifest-path rand_distr/Cargo.toml
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
- cargo test --manifest-path rand_xoshiro/Cargo.toml
- cargo test --manifest-path rand_chacha/Cargo.toml
- cargo test --manifest-path rand_hc/Cargo.toml
+ - cargo test --manifest-path rand_jitter/Cargo.toml
- cargo test --manifest-path rand_os/Cargo.toml
after_script: set +e