-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (52 loc) · 1.45 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
language: rust
# Recommeneded caching strategy from https://levans.fr/rust_travis_cache.html
# Need to cache the whole `.cargo` directory to keep .crates.toml for
# cargo-update to work
cache:
directories:
- /home/travis/.cargo
# But don't cache the cargo registry
before_cache:
- rm -rf /home/travis/.cargo/registry
env: # required for allow_failures
dist: xenial
rust:
- stable
- beta
- nightly
matrix:
fast_finish: true
allow_failures:
- rust: nightly
include:
- rust: stable
env: NAME='linting'
before_script:
- rustup component add rustfmt-preview
- rustup component add clippy-preview
script:
- cargo fmt --all -- --check
- cargo clippy
- env: NAME='cargo-travis'
sudo: required # travis-ci/travis-ci#9061
before_script:
- cargo install cargo-update || echo "cargo-update already installed"
- cargo install cargo-travis || echo "cargo-travis already installed"
- cargo install-update -a
script:
- cargo build --verbose
- cargo coverage --verbose
- bash <(curl -s https://codecov.io/bash) -s target/kcov
addons: # required for kcov
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
- cmake
script:
- export RUST_BACKTRACE=1
- cargo build --verbose
- cargo test --verbose
- cargo doc --no-deps --verbose