forked from dhardy/rand
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
126 lines (115 loc) · 4.29 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
language: rust
sudo: false
# We aim to test all the following in any combination:
# - standard tests, benches, documentation, all available features
# - 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)
matrix:
include:
- rust: 1.22.0
install:
script:
# TODO: use --tests instead of --lib on more recent compiler
- cargo test --lib --no-default-features
- cargo test --package rand_core --no-default-features
- cargo test --package rand_isaac --features serde1
- cargo test --package rand_xorshift --features serde1
- 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_isaac --features serde1
- cargo test --package rand_xorshift --features serde1
- 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_isaac --features serde1
- cargo test --package rand_xorshift --features serde1
- cargo test --features serde1,log
- rust: nightly
install:
- cargo --list | egrep "^\s*deadlinks$" -q || cargo install cargo-deadlinks
before_script:
- 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 --features serde1,log,nightly,alloc
- cargo test --all --benches
# 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
after_success:
- travis-cargo --only nightly doc-upload
- rust: nightly
install:
- rustup target add wasm32-unknown-unknown
# Use cargo-update since we need a real update-or-install command
# Only install if not already installed:
#- cargo --list | egrep "\binstall-update$" -q || cargo install cargo-update
#- cargo install-update -i cargo-web
# Cargo has errors with sub-commands so ignore updating for now:
- cargo --list | egrep "^\s*web$" -q || cargo install cargo-web
script:
- cargo web test --target wasm32-unknown-unknown --nodejs --features=stdweb
- rust: nightly
install:
- rustup target add wasm32-unknown-unknown
script:
- cargo build --target wasm32-unknown-unknown --features wasm-bindgen
- rust: nightly
install:
- rustup target add thumbv6m-none-eabi
script:
# Bare metal target; no std; only works on nightly
- cargo build --no-default-features --target thumbv6m-none-eabi --release
# Trust cross-built/emulated targets. We must repeat all non-default values.
- rust: stable
sudo: required
dist: trusty
services: docker
env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1
- rust: stable
sudo: required
dist: trusty
services: docker
env: TARGET=mips-unknown-linux-gnu
- rust: stable
sudo: required
dist: trusty
services: docker
env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1
- rust: stable
os: osx
sudo: required
dist: trusty
services: docker
env: TARGET=armv7-apple-ios DISABLE_TESTS=1
before_install:
- set -e
- rustup self update
# Used by all Trust targets; others must override:
install:
- sh utils/ci/install.sh
- source ~/.cargo/env || true
script:
- bash utils/ci/script.sh
after_script: set +e
cache: cargo
before_cache:
# Travis can't cache files that are not readable by "others"
- chmod -R a+r $HOME/.cargo
env:
global:
secure: "BdDntVHSompN+Qxz5Rz45VI4ZqhD72r6aPl166FADlnkIwS6N6FLWdqs51O7G5CpoMXEDvyYrjmRMZe/GYLIG9cmqmn/wUrWPO+PauGiIuG/D2dmfuUNvSTRcIe7UQLXrfP3yyfZPgqsH6pSnNEVopquQKy3KjzqepgriOJtbyY="
notifications:
email:
on_success: never