-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
69 lines (61 loc) · 1.8 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
# TemplateCIConfig { bench: BenchEntry { run: false, version: "nightly", allow_failure: false, install_commandline: None, commandline: "cargo bench" }, clippy: ClippyEntry { run: true, version: "nightly", allow_failure: false, install_commandline: None, commandline: "cargo clippy -- -D warnings" }, rustfmt: RustfmtEntry { run: true, version: "stable", allow_failure: false, install_commandline: None, commandline: "cargo fmt" }, additional_matrix_entries: {}, cache: "false", os: "linux", dist: "xenial", versions: ["stable", "beta", "nightly"], test_commandline: "cargo test --all --features \"compiletest_rs $TRAVIS_RUST_VERSION\"" }
os:
- "linux"
dist: "xenial"
language: rust
sudo: required
cache: false
rust:
- stable
- beta
- nightly
env:
global:
- RUN_TEST=true
- RUN_CLIPPY=false
- RUN_BENCH=false
matrix:
fast_finish: true
include:
- &rustfmt_build
rust: "stable"
env:
- RUN_RUSTFMT=true
- RUN_TEST=false
- &clippy_build
rust: "nightly"
env:
- RUN_CLIPPY=true
- RUN_TEST=false
allow_failures: []
before_script:
- bash -c 'if [[ "$RUN_RUSTFMT" == "true" ]]; then
rustup component add rustfmt-preview
;
fi'
- bash -c 'if [[ "$RUN_CLIPPY" == "true" ]]; then
rm -f ~/.cargo/bin/clippy;
rustup component add clippy-preview
;
fi'
script:
- bash -c 'if [[ "$RUN_TEST" == "true" ]]; then
cargo test --all --features "compiletest_rs $TRAVIS_RUST_VERSION"
;
fi'
- bash -c 'if [[ "$RUN_RUSTFMT" == "true" ]]; then
cargo fmt -v -- --check
;
fi'
- bash -c 'if [[ "$RUN_CLIPPY" == "true" ]]; then
cargo clippy -- -D warnings
;
fi'
branches:
only:
# release tags
- /^v\d+\.\d+\.\d+.*$/
- master
notifications:
email:
on_success: never