forked from hyperium/hyper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
66 lines (59 loc) · 2.39 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
language: rust
sudo: true # Required for functional IPv6 (forces VM instead of Docker).
dist: trusty
matrix:
fast_finish: true
include:
- rust: nightly
env: FEATURES="--no-default-features --features runtime,nightly" HYPER_DOCS="1"
- rust: beta
env: FEATURES="--no-default-features --features runtime"
- rust: stable
env: FEATURES="--no-default-features --features runtime"
- rust: stable
env: FEATURES="--no-default-features"
- rust: 1.21.0
env: FEATURES="--no-default-features --features runtime" BUILD_ONLY="1"
cache:
apt: true
before_script:
# Add an IPv6 config - see the corresponding Travis issue
# https://github.com/travis-ci/travis-ci/issues/8361
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
fi
script:
- ./.travis/readme.py
- cargo build $FEATURES
- 'if [ "$BUILD_ONLY" != "1" ]; then cargo test $FEATURES -- --test-threads=1; fi'
- 'if [ $TRAVIS_RUST_VERSION = nightly ]; then for f in ./benches/*.rs; do cargo test --bench $(basename $f .rs) $FEATURES; done; fi'
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
- libiberty-dev
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 ]]; 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/*'
- '[ $TRAVIS_PULL_REQUEST = false ] && [ "$HYPER_DOCS" = "1" ] &&
{ [ "$TRAVIS_TAG" != "" ] || [ "$TRAVIS_BRANCH" == "master" ]; } &&
./.travis/docs.sh'
env:
global:
- RUST_BACKTRACE=1
- secure: KipdEhZsGIrb2W0HsDbC95x8FJ1RKEWPq8uSK8wSZwGw6MtvoZDX0edfrtf4o3/skA0h84yn35ZWF/rpo1ZEesgFY1g+l+me+jtyGvMwEsXTGjNP4oNR2MrDizjO8eYDm4hRUCLEmJVvsq4j7oNVdLGHfdrcnwqk8/NxJsRzqXM=