-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
58 lines (53 loc) · 2.22 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
language: rust
cache: cargo
rust:
- stable
allow_failures:
- nightly
os:
- linux
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
- libiberty-dev
notifications:
email:
on_success: never
before_install:
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get -qq update; else brew update; fi
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get install -y libusb-1.0-0-dev; else brew install libusb; fi
before_script:
- export PATH="$PATH":~/.cargo/bin
script:
- export RUST_BACKTRACE=1
- cargo test --all --verbose
- cargo build --all --verbose --release
after_success: |
[ $TRAVIS_RUST_VERSION = stable ] &&
LOCAL="~/.local" && export PATH=$LOCAL/bin:$PATH &&
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build &&
cmake -DCMAKE_INSTALL_PREFIX:PATH=$LOCAL .. && make && make install && cd ../.. &&
ls target/debug &&
RUSTFLAGS="-C link-dead-code" cargo test --no-run &&
for file in target/debug/*; do
if [[ -x $file ]] && [[ -f $file ]]; then
mkdir -p "target/cov/$(basename $file)";
kcov --exclude-pattern=/.cargo,/usr/lib,/usr/include --verify "target/cov/$(basename $file)" "$file";
fi;
done &&
kcov --coveralls-id=$TRAVIS_JOB_ID --merge target/cov target/cov/*
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: qXqFCva/yJfwdJzLUazv3AUqvnbUWWEvCOoZHMkByK7/OP1yGdB/q7R24IRAf5SvfEk9TR8a81i+tiy/3iLfgrrBPLc077cLB4q6q1O1yBIrRTg61ggUDyiKaZDZqHtuvI2ocTnFM5jXTuEXVVGt0HA1IO3ezogmcVi9UrQp5rDDCWqPcNviTVweTICLb9PAWKmhbGrGmR3BVuNjmBCDJr25qnW6wors93xfCrpePepnl92gvPrp30WmQ2E+bgV+Hoeu9gJjCIjRU8bTmDWEdkBa3Qe8xIMU+SAw7CBUWRALh5q1HX0M7RYpg3zOEdVdWZ+OwDTO0mc40UdaV5rkx029ird4mC96bkHHemYITJJrDrwjoni9wSbnhZaNefZeKf8pAGLUO/+NwtcYbj8ogYdnsweAMRiZUvA15/tzk6kMQqBILjL605YayPWt9XvdU06gLjWtEd8qlOqt+xBPat3dKw15Xkb8XPM8bc6+YBHDvJC9tF4vozOsj9Sh4b/RV9+tB0xrjniY/ZRMtGe6JJO+7+7naszekz+F9lZJocmAhbX7XUsgyvjhmVn/1+IKnJQ/iqIn7FNQa+7y9ONmQxke4aibKdM3vTicgwwPD4IY2i9MGLCBDUFIiu70k8pJ2Gy4xa8E0LupcHui4uysG2ukqJhPU/4rN9v7HZznE3Y=
file: target/release/emerald
on:
repo: ethereumproject/emerald-rs
branch: master
tags: true