-
Notifications
You must be signed in to change notification settings - Fork 63
/
.travis.yml
executable file
·72 lines (63 loc) · 2.25 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
sudo: required
language: rust
os:
- linux
- osx
env:
global:
- CRATE_NAME=kytan
- DEPLOY_VERSION=stable
matrix:
- TARGET=x86_64-apple-darwin
- TARGET=x86_64-unknown-linux-gnu
matrix:
exclude:
- os: linux
env: TARGET=x86_64-apple-darwin
- os: osx
env: TARGET=x86_64-unknown-linux-gnu
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- gcc-multilib
script:
- cargo build --release --verbose
- RUSTFLAGS='-C link-dead-code' cargo test --verbose --no-run
- shopt -s extglob
- for file in target/debug/deps/$CRATE_NAME-!(*.*); do sudo ./$file; done
after_success: |
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
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/deps/$CRATE_NAME-*[^.d]; do mkdir -p "target/cov/$(basename $file)"; sudo kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
sudo chown -R $USER . &&
bash <(curl -s https://codecov.io/bash) &&
echo "Uploaded code coverage"; fi
before_deploy:
- cp target/release/$CRATE_NAME $CRATE_NAME-$TRAVIS_TAG-$TARGET
deploy:
provider: releases
api_key:
secure: Z5U7PCiM58mfD4s7n/Q0QPItHs5epyC7lFC0hoJOhShCWM3NWm0NvALcSYV1IQI+nS9/J0Wl6YnI9V8lzahzDsYyoGYA075F3K/ovijYQUNw/BLuXpvmQ62YBTu6CDksUYPY8VOUxwa8F8IFJBePiyfoBLDTIkhQHnE6VgQOF61ZMyB4WwSzh0Oajr27pufhRG+Ioa6xPwbphgffddwer7ydk1VoW/2CO4Y51K9lD8BbP6Dlt7k1w1GWrNF4iXWUPV087VcTslcT3F9MyWYq3PhuZiXtflia67b7ad/MP66TK9I09y7z43QQOHD6ZyUa6QhK1x2l632A3T9M46aFEPfGk0ADMRMhpszEczRgLW4aclw1Ch8RwBOkSfqwAd1JP7llT9yVoOZQJMQKsX/9Gfnelq0pI8biH+nKJRwTi21qAmqoS64WXYlS9Z3m+yQWQ3c3Z0rvelYbwyNfyOSaYV24yv/p515PCPpTK84FM6NlYFvO/AvN0Y33L161WMUvJBp3m7BZAUYJAxKst1kPAu2D1IEhPZiWCwdR7xcp2WWbErLS0dQ1pYgf9rYxsGfL1iBYnPlK9wZ7DrpSWOAt16NQx6vuULC4IFj0KoDMJpcH4lZeRzSmXrZsczl7c0asIoLyV2+7cEteC/GEf2k71vwTTxOafE4E3530J4CtXG4=
file: $CRATE_NAME-$TRAVIS_TAG-$TARGET
on:
condition: $TRAVIS_RUST_VERSION = $DEPLOY_VERSION
tags: true
skip_cleanup: true
notifications:
email:
on_success: never