-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
45 lines (42 loc) · 1.26 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
language: rust
rust:
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
fast_finish: true
notifications:
email:
on_success: never
on_failure: always
before_script:
- rustup toolchain install nightly
- rustup component add clippy
- rustup component add rustfmt
script:
- cargo clean
- cargo build
- cargo clippy -- -D warnings
- cargo fmt --all -- --check
- RUST_BACKTRACE=1 cargo test
env:
global:
- CODECOV_TOKEN=2072cbf1-2dcf-4982-b698-178d4b4047e4
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
sudo apt-get update &&
sudo apt-get install libcurl4-openssl-dev libelf-dev libdw-dev &&
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 &&
sudo make install && cd ../.. &&
for file in $(find target/debug/ -regextype posix-extended -iregex '^target/debug/(padd|concept|scope)-[^\.]+$'); do
mkdir -p "target/cov/$(basename $file)";
kcov --include-path=src \
--exclude-region='//#ccstart://#ccstop','#[cfg(test)]://#ccstop' \
--exclude-line='panic!' \
"target/cov/$(basename $file)" "$file";
done &&
bash <(curl -s https://codecov.io/bash)
fi