forked from exonum/exonum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
75 lines (66 loc) · 2.61 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
language: rust
rust:
- stable
cache: cargo
sudo: required
group: deprecated-2017Q2
dist: trusty
env:
global:
- NIGHTLY_RUST=nightly-2017-07-05
- CLIPPY_VERS=0.0.142
- RUSTFMT_VERS=0.9.0
- RUSTFLAGS="-C link-dead-code"
- CODECOV_TOKEN=90006bf6-e4b7-4825-b880-8d19c4e21c21
before_install:
- rustfmt -V | grep $RUSTFMT_VERS || cargo install rustfmt --vers $RUSTFMT_VERS --force
- cargo-audit -V || cargo install cargo-audit --force
- rustup toolchain install $NIGHTLY_RUST
- cargo +$NIGHTLY_RUST clippy -V | grep $CLIPPY_VERS || cargo +$NIGHTLY_RUST install clippy --vers $CLIPPY_VERS --force
- sudo add-apt-repository -y ppa:elt/libsodium
- sudo apt-get -qq update
- cargo install --list
install:
- sudo apt-get -qq --yes install gcc g++ make libsodium-dev libleveldb-dev libssl-dev
script:
- cargo fmt -p exonum -- --write-mode=diff
- cargo fmt -p sandbox -- --write-mode=diff
- cd exonum
- cargo +$NIGHTLY_RUST clippy -- -D warnings
- cd ..
- cd sandbox
- cargo +$NIGHTLY_RUST clippy -- -D warnings
- cd ..
- cargo audit
- cargo test --manifest-path exonum/Cargo.toml
- cargo test --manifest-path sandbox/Cargo.toml
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
- libiberty-dev
after_success: |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
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/exonum-*[^\.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"
notifications:
slack:
secure: ufnH5/ilJ/GkfzU28GguFgQzL1Jb7gGGVaBytCi1VW9cvME7wHC/Pf3ZDM9cVv7t8Cq6K423J8pSkT8vErB7GzHLGRJK8EsBkuGxiAJiHJIVNf/a20gjyqtS2wSyoVDDFz1LRtCNvQanSy2psSWyJcWtnAllluwRNHKXZWYFOpU6uqt2XIi1s3vuMyVw177alNyQkUJ6mhnt9ZDGoMXfcwXIvZ1bt3GPwAbuvAiHsShIrtVGJYTbIBDBsFsGgc1313xdz670xa1JrvZpIl0ZF91Z/0rxtQZjYos859ARnP+v5TfMpsOZbhVHtLI81/o/dOu/Dnrv2xo4VgLaHCTPfhO7LE7kGZ1OyEFqzsadL+k97JQnfkyyFRA84FrVNvgn5NStJtNRJu593v0zuI1OpmY5Xcu/XG2X3dpYZJGciKywoI8gFCc18taIqWY8P3uL/KdxX3VLikMkmYX+cXxHwhH/RvNLbfxD+hTepz+sGWBnLg/dFNpy3WdzJrSNKE9OAH3Gy53z32fT7XiGF8+juN3RB7MmoLA+sOKnGnjal+o44Ga7KDxHe9lOjRVWAQFH6lIEVNwpdEp+2zqu2QAyCIbYcyEdxo8oKXMwAOPFeIqFGshAYGSQAYbT9V75J2Hfcpqb+EXhiBluCSjoaacg4Yhsc/tFhqI7B5+tq7Z5KVU=
webhooks:
urls:
- https://webhooks.gitter.im/e/9599da7e3a500810190d