-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
76 lines (68 loc) · 1.58 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
sudo: false
language: rust
cache:
cargo: true
directories:
- "$HOME/kcov"
branches:
only:
- staging
- trying
- develop
- master
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
os:
- linux
- osx
- windows
rust:
- stable
- beta
- nightly
stages:
- check formatting
- lint
- test
- coverage
jobs:
include:
- stage: check formatting
rust: stable
install:
- rustup component add rustfmt
script:
- cargo fmt --all -- --check
- stage: lint
rust: stable
install:
- rustup component add clippy
script:
- cargo clippy --all-targets --all-features --verbose -- -D clippy::pedantic -D warnings
- stage: coverage
rust: stable
script: |
if [ ! -d "{HOME}/kcov" ]; then
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz &&
cd kcov-master &&
mkdir build &&
cd build &&
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/kcov .. &&
make &&
make install
cd ../.. &&
rm -rf kcov-master
fi
for file in target/debug/{amethyst-*,amethyst_cli-*}; do [ -x "${file}" ] || continue; mkdir -p "target/cov/$(basename $file)"; ${HOME}/kcov/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
bash <(curl -s https://codecov.io/bash) &&
echo "Uploaded code coverage"
script:
- cargo test --all