-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
104 lines (98 loc) · 3.54 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
language: rust
cache: cargo
sudo: false
matrix:
fast_finish: true
include:
# Stable
- os: linux
dist: xenial
rust: stable
addons:
apt:
packages:
# Install libraries for coverage
- binutils-dev
- libcurl4-openssl-dev
- libdw-dev
- libelf-dev
- libiberty-dev
- liblzma-dev
- os: osx
rust: stable
# Beta
- os: linux
dist: xenial
rust: beta
- os: osx
rust: beta
# Nightly
- os: linux
dist: xenial
rust: nightly
- os: osx
rust: nightly
allow_failures:
- rust: nightly
before_script:
- cargo --version --verbose
- rustc --version --verbose
# Fetch the big list of naughty strings
- >
wget -O ./tests/blns/blns.inden.tex
https://raw.githubusercontent.com/minimaxir/big-list-of-naughty-strings/master/blns.txt
# Configure only if we're doing coverage
- >
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
LOCAL="~/.local" && export PATH=$LOCAL/bin:$PATH;
fi
script:
- cargo test --all
- cargo run -- -v .
- cargo run -- -v ./tests/blns/blns.inden.tex # Needs to be tested separately, since this file is gitignore'd
after_success: >
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
wget https://github.com/SimonKagstrom/kcov/archive/v36.tar.gz &&
tar xzf v36.tar.gz &&
mkdir kcov-36/build &&
cd kcov-36/build &&
cmake -DCMAKE_INSTALL_PREFIX:PATH=$LOCAL .. &&
make &&
make install &&
cd ../.. &&
rm -rf kcov-36 &&
cargo clean &&
RUSTFLAGS='-C link-dead-code' cargo test --all --no-run &&
for file in target/debug/indentex-*; do
if [[ "${file: -2}" != ".d" ]]; then
mkdir -p "target/cov/$(basename $file)";
kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file";
fi;
done &&
for file in target/debug/indentexlib-*; do
if [[ "${file: -2}" != ".d" ]]; then
mkdir -p "target/cov/$(basename $file)";
kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file";
fi;
done &&
kcov --coveralls-id=$TRAVIS_JOB_ID --merge target/cov target/cov/*;
fi
# Deploy to GitHub releases on tag builds
before_deploy:
- cargo install cargo-deb
- cargo deb --target=x86_64-unknown-linux-gnu
- >
cd target/x86_64-unknown-linux-gnu/debian &&
DEBFILENAME="$(find . -type f -name 'indentex_*_amd64.deb')" &&
sha512sum $DEBFILENAME > $DEBFILENAME.DIGEST
deploy:
provider: releases
api_key:
secure: WkvmRZgo3hBw5jSB9Nrailp9wcWpcVwxCUY0ZNJyUZmISq4vDD0f8+THfF7OesU5VAfU/2mXdxunME9qVTfjukBi6DO4NfbZqFO75DDkB1v1eFqjJpr8UqkVHNLn3FEUqE15yNbYSXBCwoY6KXDoOVZka23f4+1/gJ9FLJAILJ9Xv4pGJAT/pnKfLJSLSlLEOcmPt5nUpAMSL1N5lh4dsOlvQ0JAgPx7R0nbrrAPtX3puv5e9zOV37dVOHfcVq/p93MooXyVbDhNhCZcbca7Xd4P5GsWtvnOjuSsI8xcMHP1VpvQ0vbMs9oMoJOXosMTRN3Wbj68csMwPvt8R1J5aRtKCmbKEe7jcJEY8NmY47WAKjB/jKUAC1hQpGMWvOe7U6A1unwlNipOMlrGEGKHSSdnOkLXiaYNHgT0dksbA5ZTWKz4S979v+QNDOr9m+GAKZ8cmfVgC00/AUVtDMk/SJIih7lFO4hBa6HayhCIT/pA2DbEQ3UWi4DeHQosVh9DP8rbgDIrSG9Ah1zHChXXXSJ957t6EA6I4jtoF4fTQkle19h4WkFc+A/3jbEAvN0huWvomNEBdphSWFdb9E/TvLtqUaIYhOjomo0nDs9GspvolOKzzkfecMRJb8gvzsAGyrNa2ZxtfINvGltQ+vQRf4uWPsA6e6rIGePkjdcqeJc=
file_glob: true
file: "target/x86_64-unknown-linux-gnu/debian/indentex_*_amd64.deb*"
skip_cleanup: true
on:
condition: "($TRAVIS_RUST_VERSION = stable) && ($TRAVIS_OS_NAME == linux)"
tags: true
repo: mp4096/indentex