forked from cgreen-devs/cgreen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (39 loc) · 1.15 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
sudo: false
language: c
# Build matrix
compiler:
- gcc
- clang
env:
- CGREEN_WITH_STATIC_LIBRARY="OFF" CGREEN_WITH_CXX="OFF"
- CGREEN_WITH_STATIC_LIBRARY="ON" CGREEN_WITH_CXX="OFF"
- CGREEN_WITH_STATIC_LIBRARY="OFF" CGREEN_WITH_CXX="ON"
- CGREEN_WITH_STATIC_LIBRARY="ON" CGREEN_WITH_CXX="ON"
addons:
apt:
packages:
- cmake
- lcov
- g++
before_install:
- if [[ $CC == gcc ]] ; then export CXX=g++ ; else export CXX=clang++ ; fi
- $CC --version
- $CXX --version
- gem install coveralls-lcov
- if [ "$CC" = "gcc" ]; then export WITH_GCOV=ON; else WITH_GCOV=OFF; fi
script:
- mkdir -p build
- cd build
- cmake -DCGREEN_WITH_CXX:BOOL=$CGREEN_WITH_CXX -DCGREEN_WITH_UNIT_TESTS:BOOL=ON -DCGREEN_WITH_STATIC_LIBRARY:BOOL=$CGREEN_WITH_STATIC_LIBRARY -DCGREEN_INTERNAL_WITH_GCOV:BOOL=$WITH_GCOV ..
- make -j2
- ctest --output-on-failure
after_success:
- if [ "$CC" = "gcc" ];
then
lcov -d tests -d src -base-directory .. -c -o coverage.info;
lcov --remove coverage.info '/usr/*' -o coverage.info;
cd ..;
coveralls-lcov build/coverage.info;
fi
notifications:
slack: cgreen:EC3bZqwnyBsaqyeIndEewwNT