forked from amethyst/specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
88 lines (79 loc) · 2.35 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
80
81
82
83
84
85
86
87
88
language: rust
rust:
- nightly
- 1.40.0
- stable
cache:
cargo: true
branches:
only:
- staging
- trying
- master
before_script:
- export PATH="$PATH:$HOME/.cargo/bin"
script:
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then
cargo build --all-features --verbose;
cargo test --all-features --verbose --no-run;
cargo bench --verbose --no-run --all-features;
elif [ "$TRAVIS_RUST_VERSION" == "1.40.0" ]; then
cargo check --tests --no-default-features;
cargo check --tests --no-default-features --features "parallel";
cargo check --tests --no-default-features --features "serde";
cargo check --tests --no-default-features --features "serde,parallel";
else
cargo build --verbose --no-default-features;
cargo test --verbose --no-default-features;
cargo test --verbose --features "parallel,serde,uuid_entity";
fi
- cargo build --manifest-path ./specs-derive/Cargo.toml --verbose
- cargo test --manifest-path ./specs-derive/Cargo.toml --verbose
addons:
apt:
packages:
- binutils-dev
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- libiberty-dev
after_success: |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
[ $TRAVIS_RUST_VERSION = stable ] &&
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz &&
cd kcov-master &&
mkdir build &&
cd build &&
cmake .. &&
make &&
make install DESTDIR=../../kcov-build &&
cd ../.. &&
rm -rf kcov-master &&
for file in target/debug/specs-*; do
[ -x "${file}" ] || continue;
mkdir -p "target/cov/$(basename $file)";
./kcov-build/usr/local/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"
# after_success: |
# [ $TRAVIS_BRANCH = master ] &&
# [ $TRAVIS_PULL_REQUEST = false ] &&
# [ $TRAVIS_RUST_VERSION = stable ] &&
# which mdbook || cargo install mdbook &&
# cd book &&
# mdbook build &&
# cd .. &&
# mkdir ../ghp &&
# cp -r book/book/* ../ghp/ &&
# echo "Checking out gh-pages" &&
# git checkout --orphan gh-pages &&
# rm -rf ./* &&
# cp -r ../ghp/* ./ &&
# git add -A &&
# git commit --quiet -m "Update page" &&
# git push -f https://${GH_TOKEN}@github.com/slide-rs/specs.git gh-pages