-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
58 lines (54 loc) · 1.43 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
os:
- linux
- osx
- windows
rust:
- stable
- beta
- nightly
# Recommended 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
matrix:
include:
- name: linting
rust: stable
before_script:
- rustup component add rustfmt-preview
- rustup component add clippy-preview
script:
- cargo fmt --all -- --check
- cargo clippy
- name: coverage
rust: stable
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:
- |
export RUST_BACKTRACE=1 &&
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