-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
42 lines (31 loc) · 1.11 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
#travis configuration for coverage testing
language: c++
#sudo: false # only for faster builds
install:
- cd ${TRAVIS_BUILD_DIR}
# install latest LCOV
- wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz
- tar xf lcov_1.11.orig.tar.gz
- sudo make -C lcov-1.11/ install
# install lcov to coveralls conversion + upload tool
- gem install coveralls-lcov
before_script:
#- cd ${TRAVIS_BUILD_DIR}
- lcov --directory . --zerocounters
# Compiler selection
compiler:
# - clang
- g++
# Build steps
script:
# - cd ${TRAVIS_BUILD_DIR}
- cd BinarySearchTree
- make && ./test-library.out
after_success:
- cd ${TRAVIS_BUILD_DIR}
- lcov --directory . --capture --output-file coverage.info # capture coverage info
- lcov --remove coverage.info 'tests/*' '/usr/*' 'test-library*' --output-file coverage.info # filter out system and test code
- lcov --list coverage.info # debug before upload
#- coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info # uploads to coveralls.. for a private repo using a token
- coveralls-lcov coverage.info #for open source
- bash <(curl -s https://codecov.io/bash)