-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy path.travis.yml
119 lines (111 loc) · 4.83 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
language: rust
before_install:
- set -e
- export SCCACHE_CACHE_SIZE=200M
- export SCCACHE_DIR="$TRAVIS_HOME/.cache/sccache"
- mkdir "$TRAVIS_HOME/.bin"
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then wget https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then wget https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-apple-darwin.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then tar -C "$TRAVIS_HOME/.bin" -xvf sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then tar -C "$TRAVIS_HOME/.bin" -xvf sccache-0.2.13-x86_64-apple-darwin.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then mv $TRAVIS_HOME/.bin/sccache-0.2.13-x86_64-unknown-linux-musl/sccache $TRAVIS_HOME/.bin/sccache; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then mv $TRAVIS_HOME/.bin/sccache-0.2.13-x86_64-apple-darwin/sccache $TRAVIS_HOME/.bin/sccache; fi
- export PATH="$PATH:$TRAVIS_HOME/.bin"
- export RUSTC_WRAPPER="sccache"
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
env:
global:
- CRATE_NAME=wagyu
matrix:
include:
- rust: stable
env: TEST_COVERAGE=1
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- libiberty-dev
- build-essential
- libboost-dev
- libboost-all-dev
- gcc
- g++
- gcc-multilib
script:
- RUST_BACKTRACE=1 cargo test --all --verbose --features "wagyu-monero/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 &&
make install DESTDIR=../../kcov-build &&
cd ../.. &&
rm -rf kcov-master &&
for file in target/debug/*-*; 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"
- rust: nightly
script:
- RUST_BACKTRACE=1 cargo test --all --verbose --features "wagyu-monero/transaction"
- rust: stable
env: DEPLOY=1 TARGET=x86_64-apple-darwin
script:
- cargo build --release --target $TARGET
- RUST_BACKTRACE=1 cargo test --all --verbose --features "wagyu-monero/transaction"
os: osx
- rust: stable
env: DEPLOY=1 TARGET=x86_64-unknown-linux-musl
script:
- rustup target add x86_64-unknown-linux-musl
- cargo build --release --target $TARGET
- RUST_BACKTRACE=1 cargo test --all --verbose --features "wagyu-monero/transaction"
addons:
apt:
packages:
- musl-tools
install:
- |
git submodule init && git submodule update
git submodule update --init --recursive
git submodule foreach --recursive git fetch
git submodule foreach --recursive git checkout master
git submodule foreach --recursive 'git pull --ff-only origin master'
if [ "$TRAVIS_OS_NAME" != "osx" ]; then sudo apt-get update; fi
if [ "$TRAVIS_OS_NAME" != "osx" ]; then sudo apt-get install build-essential libboost-dev libboost-all-dev gcc g++ gcc-multilib; fi
before_deploy:
- |
name="wagyu-$TRAVIS_TAG-$TARGET"
mv target/$TARGET/release/wagyu $name
tar czvf $name.tar.gz $name
echo -n $(shasum -ba 256 "$name.tar.gz" | cut -d " " -f 1) > $name.tar.gz.sha256
deploy:
api_key:
secure: "Wc4CI2DQ8EyfhHKc+nBzewCu2fAK1Fz2XlKBs02haxAnqoxi3uDjCCzlGOJmwMcg0DCvpKlyqtmMFV1i1/3zPTd+SKTMiuJQfuWhSAtDuKXyBKdiHe9mLzZqle5VSliiLLxCWuqgDeMdiU3+0zWIwjM3wwzyzzCnNg3N0H9KyuJE+0HFvgCmpSt1XilRbIl/D8ihXpZZqIz832/1EXtbHcWIpa7+dcjPuGA6GRXWccLgehBC6tR4e2CviFLsXZ1/B1cLcNZmCEj2yxkvbF913sBjXGK1Y5I9pihZ3w58ZBzbjqj5B23+WN6zUNsxE9TqsafJU/XRlcXvRI2NNxKMRHyVb8ZswJo+W21Kzi0AezHfHY+HI0ntcyutWXEFYTVxVwamYPisYkq6hZK6uS/58HXLh59FcHbn3xomRwKRAtuJ5rhosvGXBBfuvgo5azRkSkCdGwXwsdOM6kgP1wGoRm0bKUe1JlAkC51bWIWHhkKFjOmyjbCo05pqhP9UxV/6lNVt2aemY7I/c7EAKHk5VlRdA7AGsmFWivMr1KPc6HjZzl3/pcMWQlaklZNEevzgDdqIeTl5iFDSJfg02+gWoDV90pyk8NhdKK9jxlhIJMihZWrbcaqwOdNaw4DJSH4+tQ2qANp7GChySPYEdZdaA87dzvQMWbhnYkJqD/qKxpQ="
draft: true
file_glob: true
file:
- wagyu-$TRAVIS_TAG-$TARGET.tar.gz
- wagyu-$TRAVIS_TAG-$TARGET.tar.gz.sha256
on:
condition: $DEPLOY = 1
tags: true
repo: AleoHQ/wagyu
provider: releases
skip_cleanup: true