-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
52 lines (52 loc) · 1.3 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
compiler:
- clang
- gcc
cache:
apt: true
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
#- lcov
- ruby
- clang-5.0
- g++-7
- gcc-7
before_install:
- git submodule update --init
- cpanm local::lib --sudo
- cpanm PerlIO::gzip --sudo
- cpanm JSON --sudo
- cpanm Capture::Tiny --sudo
install:
- |
if [ "$CXX" = "g++" ]; then
pwd
git clone https://github.com/linux-test-project/lcov.git ./lcov
cd lcov
sudo make install
cd ..
pwd
gem install lcoveralls;
fi
language: cpp
script:
- pwd
- pushd test
- mkdir -p build
- cd build
- which gcov-7
- |
if [ "$CXX" = "g++" ]; then
cmake -DCMAKE_CXX_COMPILER=g++-7 -DCMAKE_C_COMPILER=gcc-7 -DGCOV_PATH=$(which gcov-7) -DCMAKE_BUILD_TYPE=Debug -DGTF_Test_ENABLE_COVERAGE=1 ..;
fi
- if [ "$CXX" = "clang++" ]; then cmake -DCMAKE_CXX_COMPILER=clang++-5.0 -DCMAKE_C_COMPILER=clang-5.0 -DCMAKE_BUILD_TYPE=Debug ..; fi
- make
- if [ "$CXX" = "g++" ]; then make GTF_Test_coverage; fi
after_success:
# Coverage - lcoveralls require current directory has .git
- popd
- pwd
- if [ "$CXX" = "g++" ]; then lcoveralls --retry-count 3 ./test/build/GTF_Test_coverage.info.cleaned; fi