Skip to content

Commit 8811fce

Browse files
author
Clement Champetier
committed
Travis: install & use lcov with coveralls
1 parent dd967cc commit 8811fce

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

.travis.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,38 @@ before_script:
1717
- env | sort
1818
- date -u
1919
- uname -a
20-
20+
21+
- cd ${TRAVIS_BUILD_DIR}
22+
# install latest LCOV (1.9 was failing for me) [1]
23+
- wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz
24+
- tar xf lcov_1.11.orig.tar.gz
25+
- sudo make -C lcov-1.11/ install
26+
# install lcov to coveralls conversion + upload tool
27+
- gem install coveralls-lcov
28+
# init coverage to 0 (optional)
29+
- lcov --directory . --zerocounters
30+
31+
# install avtranscoder dependencies
2132
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./tools/travis.linux.install.deps.sh; fi
2233
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./tools/travis.osx.install.deps.sh; fi
2334

2435
script:
36+
- cd ${TRAVIS_BUILD_DIR}
2537
# Build
2638
- mkdir build
2739
- cd build
28-
- cmake .. -DCMAKE_INSTALL_PREFIX=`pwd`/install
40+
- cmake .. -DCMAKE_INSTALL_PREFIX=`pwd`/install -DCMAKE_BUILD_TYPE=Debug
2941
- make install
3042
# Launch tests
3143
- if [ "${TRAVIS_OS_NAME}" = "linux" && "${DEPENDENCY_MODE}" = "ffmpeg" ]; then ./../tools/travis.python.nosetests.sh; fi
44+
45+
after_success:
46+
- cd ${TRAVIS_BUILD_DIR}
47+
# capture coverage info
48+
- lcov --directory . --capture --output-file coverage.info
49+
# filter out system and test code
50+
- lcov --remove coverage.info 'tests/*' '/usr/*' --output-file coverage.info
51+
# debug before upload
52+
- lcov --list coverage.info
53+
# uploads to coveralls
54+
- coveralls-lcov --repo-token e7jYJJrojzWYfmdUgkDvwVNGqJgh6yCH7 coverage.info

0 commit comments

Comments
 (0)