-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
122 lines (121 loc) · 6.06 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
120
121
language: rust
env:
global:
- CRATE_NAME=nmap-analyze
# - RUSTFLAGS="-C link-dead-code"
- secure: MkExTSmTijETmgx6/MTKCSkgPf450Wp8jXkeyNIE9Qw+dgSOVs1yHyfItpZAkO7Y1foEUaTPwLiqQ1X4ATJSehOqikNMblM53WZWk7YFfWI3/JEqc23SifZv3rqmlcVq3vQi0khv0Rn9QPxkOMN4a16lo1yt/w1xQlznYfgBrY+YKKk8JVEjfmqkzk/5oQ+ztKhmoW+Macx2I2nXkzKUK1DGts8UqECubMiypD+YOknLdCeP7vZjq5XBMk34U+urhZ586FjdFqhX5LvkHxoMAOm7gjKQioTqTcbsSAm+aDCpzJNK8Yj+KpRm03RYDV45tJlgJ/zBCRFx9u55ztdzeSs3sI6JhhfROvdpTvwRZDQy+8c1MwU/bPJ0DPCRc/uOrRp0WliDiapYbQZUtDI7drm6IM/mAgqSLHt2SI4ZtAiNWI4AWIa0RGF9gnVdaxMhkx3hrMA0vIyVVCOZhd4RbAUZo6csDxTB4RVS3BOwV3ub7OpQHbrqHOd9wJLjA26Mo5gOSpZUn/7BV4Pz1lSxdsPROYxrHJOfoI65SYP6TICvL3g2PIapt6tJlv/AM2ooG+9V1DgOYOVTbAGILyIm2WsmuU5BvIH2YPXSsqL5BG6BKF/ZsEISRBztG7MBgyxU3rKz0xuTY++KyKD2qzGPs8s+i0i8wtDmDKVKbJlnIHw=
matrix:
fast_finish: true
include:
- env: TARGET=x86_64-unknown-linux-gnu DEPLOY_CRATES_IO=1 DEPLOY_DEB=1 DEPLOY_GITHUB=1 DEPLOY_ARCH=amd64
rust: 1.34.0
- env: TARGET=x86_64-apple-darwin DEPLOY_GITHUB=1
rust: 1.34.0
os: osx
- env: TARGET=x86_64-unknown-linux-gnu CODECOV=1 RUSTFLAGS="-C link-dead-code"
rust: stable
- env: TARGET=x86_64-apple-darwin
rust: stable
os: osx
- env: TARGET=x86_64-unknown-linux-gnu
rust: beta
- env: TARGET=x86_64-apple-darwin
rust: beta
os: osx
- env: TARGET=x86_64-unknown-linux-gnu
rust: nightly
- env: TARGET=x86_64-apple-darwin
rust: nightly
os: osx
allow_failures:
- rust: beta
- rust: nightly
sudo: required
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- libiberty-dev
after_success: |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$CODECOV" ]]; then
echo "Running code coverage" &&
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/nmap_analyze-*[^\.d] target/debug/it_*[^\.d]; do 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."
fi
if [[ "$TRAVIS_TAG" && ( "$DEPLOY_DEB" || "DEPLOY_GITHUB" ) ]]; then
echo "Running release build" &&
cargo build --release &&
cp "target/release/$CRATE_NAME" "target/release/$CRATE_NAME-$TRAVIS_TAG-$TARGET" &&
gzip "target/release/$CRATE_NAME-$TRAVIS_TAG-$TARGET" &&
ls -l target/release/ &&
echo "Built Release Binary."
fi
if [[ "$DEPLOY_DEB" && "$DEPLOY_ARCH" && "$TRAVIS_TAG" ]]; then
echo "Running deb packaging" &&
cd distribution/deb/ &&
SRC_DIR=../../ BIN_DIR=../../target/release ARCH=$DEPLOY_ARCH VERSION=$TRAVIS_TAG TAG=$TRAVIS_TAG DIST=trusty make package &&
cd ../.. &&
echo "Built Debian Package."
fi
before_deploy: |
echo "Running before each single deployment..."
echo "Run before each single deployment."
deploy:
- provider: packagecloud
username: lukaspustina
token:
secure: aXaSc2cA4HSvD5zZcJ4ENJyVc2d3aYnScAoNMSMTHsPUS7o+XlFmG+cg16nrgJ6Ct1/sAqUWHzwnkZbrzEfdqlW85Qc0cOavfSLKnYeOq4dy702moktjZOuGkXHo/0USa0VWQr3P70IBOJM2FGP9HG9Ke5qETT7pDIpvqe+g6eOBSd8ZyAfCPwZZIDnT8cKVGMOWIqxecfoEUVkzdZ6AKBrOBQldAn/rcBWsz2cWCYMMfeczH//Y5Pq+WaEVdGgCEJwm9QobRA84404+CI1bJCgXO0ws9Rbqc0EN7/5q3X4NCrO0qlUT5hm3SB6UiYySyUn1dgIpNZyWnJ3njaqHLLL9Jc07FL4/48gJa+qnrvvotcDNYbNzl38uiHMlfq1QtsP0QgHH/QunCS9GKsjaT7O8OQmFHO98BVOxF24OU22if3XfLe9z9SWHyOelEVezKJ/pFDfP3hnG8ZQ3sMN6rw4UwSgH90hvZfvaJoVNDq986A649cvrVi0OzbeHkjrbXt81SbcpgHRYuFsoF9aMryZSFHSsPKk6hpm/eZnbRdgRsseNlnOy2/nnDeb+LUu5DYeXRmUBPw9qaBQbFUG7OHUcTPIQWtwH4cpy/GjV+yrU1a28LSxtUJgM0cQfY88Ijxrl2GMdBeb0HOghwrTpIIRuWnAvucbVFWzmVbDpNV4=
repository: opensource
dist: ubuntu/trusty
package_glob: "distribution/deb/**/*.deb"
skip_cleanup: true
on:
tags: true
condition:
- "$DEPLOY_DEB"
- "$TRAVIS_TAG"
- provider: packagecloud
username: centerdevice
token:
secure: ITNDHqVvRg8nk2OhvlYr9EGzBvLinJ3Muk0/P982NsRYmB1QCZ+v6Sc74VJlPTeB12bwf2+gsos8XBiy9q8vseH8d0MwCxQEyFolAojLhwKX/gqMReIW3tBlqNl3EO2FYH6Zb2sg9mltUoooI4CLOzVa7cPjj6hvMfF7ivgZAgdyKqUbieZZCBGL1DKqBIjPMjPYO/5DFZ2H0vaXzjJ0+7c4AO5wZNL6qfKkGohoVsnpZjXePxsb7epWU8dVi9fHsbGPWjTubNFy75BHn2zaxhxO5iGyketCcCQiFvfiV9y6X4IzXt0Q/Xl78GDla/YkWBumMc+C9onZLqonCjJ5UcDwOQoi7RJqOI8Y1PttxGXB/+y/DIXsNDHhK6T5mmvRtH3tCUS+o49GBPylw/1cE/7fIBM23CWUpQBtty3oYodYP5W03k7H8LgFRuhu4+VhG+XywZ7Zq1bVk+tVWIesJQ+q1uyqPuSgCVw5om2SKNL3Lkg4D74PJ8ZVjWe/H+whUggFQf8IMSsEYp4LtgHVM5WwvUbzz36A+k8GUDrW+uZRd/5cN9PrRyCiqOg0MtDUQ1QK+ELGj3RvrCia79Ks4Dj66AHpRLfbsJTrYMOYVH1/TOIvC3M6rSly0Z5VVgd5GAF95C6ZbyJKzSVP1VX0cGILv8o+6hhaa/XCXliKUsw=
repository: infrastructure
dist: ubuntu/trusty
package_glob: "distribution/deb/**/*.deb"
skip_cleanup: true
on:
tags: true
condition:
- "$DEPLOY_DEB"
- "$TRAVIS_TAG"
- provider: releases
api_key:
secure: hadvNsv7qyrRD2KzvxlmRQE7v363ZpbdoIurf9JSfydTmwmSKsuUe+jsuv5OBTCUd/eoHBLnHdRcFNM7dXROH/Dhg4MBnNAJJP0+DEjTCUxLpV2xNkYJijaqt6rw8ZAWPGXBttz6+/2ug5xDSjtxIXYmE23F6gabkgNBbZF0X+s0EnoZXEEgWPtvNQ9Qdik/bNZbWs3OB7oYEopO+KGctelz7SHfYTFW6K9UYAaYvrsHZnYdHu2x3EcyLhOag2Af5loyi7ZvFvoeswCvkMhsGVh+IuDuD6FSnw4apG6vQaN3LFCMZqjLJ0WMAEPMeFA/OPl3ltoUP/GFvwvu3ft2j48tyP0t2TvYT0g+WgjuczkMmon18ZWBN1fh0OLvsm7XaCRYRIhDXuidyivT7mI2/W/QfG+HiOij4g303xqNepWbR/IxSb6CLTZbDSYec5SSOttspEom4fsnH4mYhYiu/FKdHwfiWiHdeyw8Lql5y2BLaE/IIneYdG2nN701AR+qlo5AJendHDSQrfhF02LQCO1Q2wIxfwO5H9MGYnKK6RWJCJH2X/dfv2xRCX6lC8tnrpK/knISvsbYVom7eATQ9cpFJn3poomnxisTVwSuHI9JgzhX8pdDe0DbeIdga9BnrFc1e21uZeweJgqO7T2LAlmY8kL0qbQhW5ynvICZzDw=
file_glob: true
file: "target/release/$CRATE_NAME-$TRAVIS_TAG-$TARGET.gz"
skip_cleanup: true
on:
tags: true
condition:
- "$DEPLOY_GITHUB"
- "$TRAVIS_TAG"
after_deploy: |
if [[ "$DEPLOY_CRATES_IO" ]]; then
cd /home/travis/build/lukaspustina/$CRATE_NAME
cargo publish --token ${CRATES_IO_TOKEN} --allow-dirty
fi