forked from sunjay/turtle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
41 lines (39 loc) · 1.71 KB
/
.travis.yml
File metadata and controls
41 lines (39 loc) · 1.71 KB
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
language: rust
os:
- linux
- osx
rust:
- stable
- beta
- nightly
before_install:
# Remove rust-toolchain or we will always use the version specified there
# regardless of what version is installed
- rm rust-toolchain
script:
- rustc --version --verbose
# -D warnings denies all warnings so that we always know when some code
# introduces new ones
- RUSTFLAGS="-D warnings" cargo build --verbose --all
# Make sure we can run on osx
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cargo run --verbose --example runtest; fi
# -D warnings denies all warnings so that we always know when some code
# introduces new ones
# We use --no-run because if we kept it as part of the next command it would run twice when it fails
- RUSTFLAGS="-D warnings" cargo test --verbose --features "test" --all --no-run
# Retry with fewer cores if the initial `cargo test` fails to work around possible OOM errors
# for more details see https://github.com/rust-lang/cargo/issues/4415
# Source: https://github.com/ipetkov/conch-runtime/commit/3e6afc5f45791e7793b968712c1ed8ddbe0758fb
# We need to keep `RUSTFLAGS="-D warnings"` so that this doesn't need to recompile if the above finishes
- RUSTFLAGS="-D warnings" cargo test --verbose --features "test" --all || (
echo "$(tput setaf 3)$(tput bold)Initial 'cargo test' failed, retrying with fewer cores to work around Travis CI OOM issues$(tput sgr 0)" &&
RUSTFLAGS="-D warnings" cargo test --verbose --features "test" --all --jobs 1 -- --test-threads=1
)
- cargo doc --no-deps --verbose --all
matrix:
# Mark the build as finished even if the allow_failures builds
# are still running
fast_finish: true
allow_failures:
- rust: beta
- rust: nightly