forked from AleoNet/snarkOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.backup.yml
72 lines (63 loc) · 2.43 KB
/
.travis.backup.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
language: rust
services:
- docker
before_install:
- set -e
- export SCCACHE_CACHE_SIZE=200M
- export SCCACHE_DIR="$TRAVIS_HOME/.cache/sccache"
- mkdir "$TRAVIS_HOME/.bin"
- wget https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz
- tar -C "$TRAVIS_HOME/.bin" -xvf sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz
- mv $TRAVIS_HOME/.bin/sccache-0.2.13-x86_64-unknown-linux-musl/sccache $TRAVIS_HOME/.bin/sccache
- export PATH="$PATH:$TRAVIS_HOME/.bin"
- export RUSTC_WRAPPER="sccache"
- docker build -t snarkos:latest .
- docker run -d -p 4130:4130 snarkos:latest
cache:
directories:
- $TRAVIS_HOME/.cache/sccache
- $TRAVIS_HOME/.cargo
# See https://levans.fr/rust_travis_cache.html
before_cache:
- rm -rf "$TRAVIS_HOME/.cargo/registry"
after_script:
- (sccache -s||true)
- set +e
matrix:
fast_finish: true
include:
- rust: stable
env: TEST_COVERAGE=1
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- libiberty-dev
script:
- docker ps -a
- docker run -v "$PWD/target:/usr/src/snarkOS/target" snarkos /bin/sh -c "
cd /usr/src/snarkOS;
RUST_MIN_STACK=8388608 cargo test --all -- --skip dpc --skip dpc_integration_test --skip test_rpc_create_raw_transaction;"
after_success: |
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 ../.. && sudo rm -rf kcov-master && sudo rm -rf master.tar.gz &&
sudo rm -rf target/debug/base_dpc* && sudo rm -rf target/debug/consensus_dpc* &&
for file in target/debug/*-*[^\.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"
- rust: nightly-2020-03-18
script:
- docker run snarkos /bin/sh -c "
cd /usr/src/snarkOS;
rustup component add rustfmt;
cargo fmt -- --check;
RUST_MIN_STACK=8388608 cargo test --all -- --skip dpc --skip dpc_integration_test --skip test_rpc_create_raw_transaction;"
script:
- echo "snarkOS"