-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
70 lines (59 loc) · 1.72 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
language: rust
# Need to cache the whole `.cargo` directory to keep .crates.toml for
# cargo-update to work
cache:
directories:
- $HOME/protobuf
- $HOME/.cargo
# But don't cache the cargo registry
before_cache:
- rm -rf $HOME/.cargo/registry
rust:
- stable
- beta
matrix:
# Since this item is allowed to fail, don't wait for it's result to mark the
# build complete.
fast_finish: true
allow_failures:
- env: NAME='nightly'
- env: NAME='kcov'
include:
- env: NAME='nightly'
rust: nightly
- env: NAME='clippy'
rust: stable
before_script:
- rustup component add clippy
script:
- cargo clippy --all-targets --all-features -- -D warnings
- env: NAME='kcov'
sudo: required # travis-ci/travis-ci#9061
before_script:
- cargo install cargo-update || echo "cargo-update already installed"
- cargo install cargo-kcov || echo "cargo-kcov already installed"
- cargo install-update -a
script:
- cargo kcov --print-install-kcov-sh | sh
- cargo update # Creates `Cargo.lock` needed by next command
- cargo kcov --verbose --coveralls -- --verify --exclude-pattern=/.cargo,/usr/lib,src/proto
addons:
apt:
packages:
- libcurl4-openssl-dev
- libdw-dev
- binutils-dev
- libiberty-dev
- zlib1g-dev
env:
global:
- RUSTFLAGS="-C link-dead-code"
script:
- cargo update
- cargo build --verbose --all-features
- cargo test --verbose --all-features
- cargo doc --verbose --all-features --no-deps
before_install:
- export PATH=$PATH:$HOME/protobuf/bin
- export PROTOC_VERSION=$(cat PROTOC_VERSION)
- bash ci/install_protobuf.sh