-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
49 lines (41 loc) · 1.49 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
language: rust
sudo: false # use container infrastructure
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
rust:
- stable
- beta
- nightly
matrix:
allow_failure:
- rust: nightly
before_script:
- "export PATH=$HOME/.local/bin:$PATH"
after_success:
- |
# doc-building script
## make sure we're allowed to build docs
[ $TRAVIS_BRANCH = master ] && # don't build docs if not on master
[ $TRAVIS_PULL_REQUEST = false ] && # don't build docs if this is a pull request
[ $TRAVIS_RUST_VERSION = stable ] && # only want to build on the stable rust channel
## Construct docs
cargo doc --no-deps &&
echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 2`/index.html>" > target/doc/index.html &&
# (that redirects the index page to the beginning of the docs, because rustdoc is weird)
pip install ghp-import --user `whoami` &&
ghp-import -n target/doc &&
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
- |
# coveralls scripts
## get hold of kcov
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build &&
cmake .. && make && cd ../../ && PATH="./kcov-master/build/src/:$PATH" &&
## build coverage
for f in `find target/debug/ -executable -type f`; do
kcov --coveralls-id=$TRAVIS_JOB_ID --verify target/kcov $f; done;