-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
58 lines (49 loc) · 1.32 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
### Travis file built using https://medium.com/@Razican/continuous-integration-and-code-coverage-report-for-a-rust-project-5dfd4d68fbe5
language: rust
cache: cargo
dist: trusty
os:
- linux
# - osx
# Run builds for all the supported trains
rust:
- stable
- beta
- nightly
sudo: true
env:
global:
- RUSTFLAGS="-C link-dead-code"
before_install:
- sudo apt-get update
addons:
apt:
packages:
- libssl-dev
# Add clippy
before_script:
- |
if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
( ( cargo install clippy --force && export CLIPPY=true ) || export CLIPPY=false );
fi
- export PATH=$PATH:~/.cargo/bin
# The main build
script:
- cargo build
- cargo test
- |
if [[ "$TRAVIS_RUST_VERSION" == "nightly" && $CLIPPY ]]; then
cargo clippy
fi
- make test
# Coverage report
after_success:
- |
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh)
# Uncomment the following line for coveralls.io
# cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
# Uncomment the following two lines create and upload a report for codecov.io
travis_wait 30 cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash)
fi