This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
69 lines (69 loc) · 1.98 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
cache: cargo
rust:
- stable
- beta
- nightly
- nightly-2017-11-18
os:
- linux
- osx
env:
global:
- NIGHTLY_VERSION=nightly-2017-11-18
- CLIPPY_VERSION=0.0.172
- RUST_BACKTRACE=1
- PROJECT_NAME=mief
cache: cargo
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
before_script:
- bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "$NIGHTLY_VERSION" ]]; then
cargo install clippy --vers $CLIPPY_VERSION --force;
fi'
script:
- bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "$NIGHTLY_VERSION" ]]; then
cargo clippy -- -D warnings;
fi'
- cargo doc --no-deps
- cargo check --all
- cargo check --all --features display-fps
- cargo test --all
- cargo test --all --release
after_success: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz &&
cd kcov-master &&
mkdir build &&
cd build &&
cmake .. &&
make &&
sudo make install &&
cd ../.. &&
rm -rf kcov-master &&
for file in target/debug/$PROJECT_NAME-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
bash <(curl -s https://codecov.io/bash) &&
echo "Uploaded code coverage";
if [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
cargo rustdoc --all-features -- --no-defaults --passes collapse-docs --passes unindent-comments --passes strip-priv-imports\
&& echo "<meta http-equiv=refresh content=0;url=${PROJECT_NAME}/index.html>" > target/doc/index.html && \
sudo pip install ghp-import && \
ghp-import -n target/doc && \
git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages;
echo "Uploaded documentation";
fi;
fi
matrix:
allow_failures:
- rust: nightly
- rust: nightly-2017-11-18