-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (38 loc) · 1015 Bytes
/
.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
sudo: false
language: rust
cache: cargo
# run builds if:
# - the commit is a push to master (maintainers only)
# - the commit is a PR on master
if: type = push AND branch = master OR type = pull_request AND branch = master
addons:
apt:
packages:
- libssl-dev
rust:
- stable
- 1.31.0 # bump as minimum supported Rust version changes
- beta
- nightly
before_script:
- export PATH=$HOME/.cargo/bin:$PATH # for cargo subcommands
- rustup component add rustfmt-preview
script:
- cargo fmt -- --check
- cargo build
- cargo test
# - cargo bench
- cargo doc
before_cache: |
if [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
rustup toolchain install nightly
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo +nightly install cargo-tarpaulin || true
fi
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
cargo +nightly tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
fi
matrix:
allow_failures:
- rust: nightly
fast_finish: true