Skip to content

Commit 59e671a

Browse files
committed
Fixes rust-lang#35: Code coverage fixes
1 parent 782f217 commit 59e671a

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

.travis.yml

+9-17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: rust
22

3-
sudo: false
3+
sudo: required
44
cache:
55
- apt
66
- cargo
@@ -17,15 +17,16 @@ include_base: &BASE
1717
- libdw-dev
1818
- binutils-dev
1919
- libiberty-dev
20+
- libssl-dev
2021
before_install:
2122
- export LLVM_VERSION_DASH=${LLVM_VERSION/./-}
2223
- export LLVM_VERSION_SHORT=${LLVM_VERSION/./}
2324
- export PATH=/usr/lib/llvm-${LLVM_VERSION}/bin/:$HOME/.local/bin:$PATH
2425
- export LLVM_PATH=/usr/share/llvm-${LLVM_VERSION}/cmake/
2526
- sed -i -e 's/llvm-sys = ".*"/llvm-sys = "'${LLVM_VERSION_SHORT}'"/' Cargo.toml
2627
script:
27-
- cargo build --no-default-features --features "llvm${LLVM_VERSION_DASH}" --release
28-
- cargo test --no-default-features --features "llvm${LLVM_VERSION_DASH}" --verbose --release
28+
- cargo build --no-default-features --features "llvm${LLVM_VERSION_DASH}"
29+
- cargo test --no-default-features --features "llvm${LLVM_VERSION_DASH}" --verbose
2930

3031
matrix:
3132
allow_failures:
@@ -77,7 +78,6 @@ matrix:
7778
script:
7879
- cargo doc --no-default-features --features llvm3-8
7980
- echo '<meta http-equiv="refresh" content="1; url=inkwell/index.html">' > target/doc/index.html
80-
after_success:
8181
rust: nightly
8282
addons:
8383
apt:
@@ -97,19 +97,11 @@ env:
9797
- RUSTFLAGS="-C link-dead-code -C target-cpu=native -l ffi"
9898

9999
after_success: |
100-
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
101-
tar xzf master.tar.gz &&
102-
cd kcov-master &&
103-
mkdir build &&
104-
cd build &&
105-
cmake .. &&
106-
make &&
107-
make install DESTDIR=../../kcov-build &&
108-
cd ../.. &&
109-
rm -rf kcov-master &&
110-
for file in $(find . -regextype posix-extended -regex "./target/debug/test(\w|-)+"); do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib,tests --verify "target/cov/$(basename $file)" "$file"; done &&
111-
bash <(curl -s https://codecov.io/bash) &&
112-
echo "Uploaded code coverage"
100+
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
101+
bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh)
102+
cargo tarpaulin --features "llvm${LLVM_VERSION_DASH}" --ignore-tests --out Xml
103+
bash <(curl -s https://codecov.io/bash)
104+
fi
113105
114106
notifications:
115107
email: false

0 commit comments

Comments
 (0)