Skip to content

Commit 2fd2fef

Browse files
authored
Merge pull request #363 from TheBlueMatt/2019-07-codecov
Generate codecov.io reports
2 parents 4d0993f + e14b9f0 commit 2fd2fef

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.travis.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,25 @@ cache: cargo
88

99
before_install:
1010
- sudo apt-get -qq update
11-
- sudo apt-get install -y binutils-dev libunwind8-dev
11+
- sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
1212

1313
script:
14-
- cargo build --verbose
15-
- cargo test --verbose
14+
- RUSTFLAGS="-C link-dead-code" cargo build --verbose
15+
- rm target/debug/lightning-* # Make sure we drop old test binaries
16+
- RUSTFLAGS="-C link-dead-code" cargo test --verbose
1617
- if [ "$(rustup show | grep default | grep 1.34.2)" != "" ]; then cd fuzz && cargo test --verbose && ./travis-fuzz.sh; fi
17-
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd net-tokio && cargo build --verbose; fi
18+
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd net-tokio && cargo build --verbose && cd ..; fi
19+
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then
20+
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
21+
tar xzf master.tar.gz &&
22+
cd kcov-master &&
23+
mkdir build &&
24+
cd build &&
25+
cmake .. &&
26+
make &&
27+
make install DESTDIR=../../kcov-build &&
28+
cd ../.. &&
29+
rm -rf kcov-master &&
30+
for file in target/debug/lightning-*; do [ -x "${file}" ] || continue; mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
31+
bash <(curl -s https://codecov.io/bash) &&
32+
echo "Uploaded code coverage"; fi

0 commit comments

Comments
 (0)