forked from uncrustify/uncrustify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (61 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
language: cpp
env:
matrix:
# - COMPILER=clang
# - COMPILER=clang-3.8
- COMPILER=gcc-6
- COMPILER=gcc-6 BUILD_TYPE=release
- COMPILER=gcc-6 BUILD_TYPE=asan
# - COMPILER=gcc-6 BUILD_TYPE=ubsan
# - BUILD_TYPE=coverage
branches:
only:
- master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
before_install:
- |-
case "${COMPILER}" in
"clang")
export CC=clang
export CXX=clang++
;;
"clang-"*)
export CC=clang-${COMPILER#*-}
export CXX=clang++-${COMPILER#*-}
;;
"gcc-"*)
export CC=gcc-${COMPILER#*-}
export CXX=g++-${COMPILER#*-}
;;
esac
- ${CXX} --version
before_script:
- mkdir build
- cd build
- |-
case "${BUILD_TYPE}" in
"coverage")
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_COVERAGE=ON ..
;;
"asan")
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER=address -DCMAKE_CXX_FLAGS="-fuse-ld=gold" ..
;;
"ubsan")
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER=undefined -DCMAKE_CXX_FLAGS="-fuse-ld=gold" ..
;;
"release")
cmake -DCMAKE_BUILD_TYPE=Release ..
;;
*)
cmake ..
;;
esac
script:
- make VERBOSE=1
- ctest -V