-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
80 lines (69 loc) · 1.85 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
language: cpp
compiler:
- gcc
- clang
os:
- linux
- osx
git:
depth: 1
dist: trusty
sudo: required
env:
matrix:
- CANDY_MODE=REGULAR
- CANDY_MODE=COVERAGE
- CANDY_MODE=SANITIZERS
matrix:
global:
- ASAN_OPTIONS="detect_leaks=1"
# Coverage only on Linux/gcc
exclude:
- os: osx
env: CANDY_MODE=COVERAGE
- os: osx
env: CANDY_MODE=SANITIZERS
- os: linux
compiler: clang
env: CANDY_MODE=COVERAGE
- os: linux
compiler: clang
env: CANDY_MODE=SANITIZERS
allow_failures:
# Travis' clang on Linux is too old: doesn't support the required builtins
- os: linux
compiler: clang
before_script:
- if [ `uname` = "Linux" ]; then
sudo add-apt-repository -y ppa:ubuntu-sdk-team/ppa ;
sudo add-apt-repository -y ppa:josh-bialkowski/cmake ;
sudo apt-get update ;
sudo apt-get install -y --force-yes cmake zlib1g-dev ;
fi
- if [ "$CANDY_MODE" = "COVERAGE" ]; then
gem install coveralls-lcov ;
sudo apt-get install lcov ;
fi
script:
- mkdir -p ../build
- cd ../build
- if [ "$CANDY_MODE" = "REGULAR" ]; then
cmake -DCMAKE_BUILD_TYPE=Release $TRAVIS_BUILD_DIR ;
fi
- if [ "$CANDY_MODE" = "COVERAGE" ]; then
cmake -DCMAKE_BUILD_TYPE=Debug -DCANDY_ENABLE_COVERAGE=ON $TRAVIS_BUILD_DIR ;
fi
- if [ "$CANDY_MODE" = "SANITIZERS" ]; then
cmake -DCMAKE_BUILD_TYPE=Debug -DCANDY_ENABLE_ADDRESS_SANITIZER=ON $TRAVIS_BUILD_DIR ;
fi
- cmake --build . --config Release -- -j2
- ctest -V
after_success:
- if [ "$CANDY_MODE" = "COVERAGE" ]; then
cd $TRAVIS_BUILD_DIR/../build ;
lcov --directory . --capture --output-file coverage.info ;
lcov --remove coverage.info 'lib/*' 'testsrc/*' '/usr/*' --output-file coverage.info ;
lcov --list coverage.info ;
cd $TRAVIS_BUILD_DIR ;
coveralls-lcov ../build/coverage.info ;
fi