-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (68 loc) · 2.19 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
70
71
72
73
74
75
76
77
78
79
sudo: false
# test on both linux and osx
os:
- linux
- osx
language: rust
# decreases build time (compilation)
cache: cargo
# necessary for `travis-cargo coveralls --no-sudo`
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev # optional: only required for the --verify flag of coveralls
# run builds for all the trains (and more)
rust:
- nightly
- beta
- stable
# load travis-cargo
before_script:
- |
cargo install rustfmt || true # cargo install fails if the package is already installed
export PATH=$HOME/.cargo/bin:$PATH # rustfmt sometimes does not appear on the PATH
- |
export PYTHONUSERBASE=$HOME/.local &&
pip install 'travis-cargo<0.2' --user &&
export PATH=$HOME/.local/bin:$PATH
# the main build
script:
- |
LOG_LEVEL=4 ./rust_build/build.sh &&
travis-cargo test &&
travis-cargo --only stable doc
after_success:
# upload the documentation from the build with stable (automatically only actually
# runs on the master branch, not individual PRs)
- travis-cargo --only stable doc-upload
# measure code coverage and upload to coveralls.io (the verify
# argument mitigates kcov crashes due to malformed debuginfo, at the
# cost of some speed <https://github.com/huonw/travis-cargo/issues/12>)
# manually call kcov
# workaround while travis-cargo doesn't pass correct arguments to kcov
# see https://github.com/huonw/travis-cargo/pull/55
- |
if test $TRAVIS_OS_NAME = linux && ! rustc --version | grep -q 'beta\|nightly' ; then \
# this installs kcov
travis-cargo coveralls --no-sudo --verify
./kcov/build/src/kcov --verify \
--coveralls-id=$TRAVIS_JOB_ID \
--exclude-pattern=/.cargo \
target/kcov \
target/debug/builder_macro-*
fi
env:
global:
# we don't user any nightly features right now
# override the default `--features unstable` used for the nightly branch
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
notifications:
email:
on_success: change
on_failure: change
matrix:
allow_failures:
- rust: nightly