forked from uncrustify/uncrustify
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
83 lines (74 loc) · 2 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
81
82
83
language: cpp
sudo: false
matrix:
include:
- env: BUILD_TYPE=debug
- env: BUILD_TYPE=release
# GCC 6
- env: C_COMPILER=gcc-6 CXX_COMPILER=g++-6
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
# Clang 3.8 address sanitizer
- env: BUILD_TYPE=asan C_COMPILER=clang-3.8 CXX_COMPILER=clang++-3.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
# mingw-w64 Win64 cross-compile
- env: BUILD_TYPE=cross C_COMPILER=x86_64-w64-mingw32-gcc CXX_COMPILER=x86_64-w64-mingw32-g++
addons:
apt:
packages:
- mingw-w64
- binutils-mingw-w64
- binutils-mingw-w64-i686
- binutils-mingw-w64-x86-64
- gcc-mingw-w64
- gcc-mingw-w64-i686
- gcc-mingw-w64-x86-64
- g++-mingw-w64
- g++-mingw-w64-i686
- g++-mingw-w64-x86-64
branches:
only:
- master
before_install:
- if [ -n "${C_COMPILER}" ]; then export CC="${C_COMPILER}"; fi
- if [ -n "${CXX_COMPILER}" ]; then export CXX="${CXX_COMPILER}"; fi
- ${CXX} --version
- cmake --version
- mkdir build
- cd build
before_script:
- |-
case "${BUILD_TYPE}" in
"coverage")
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_COVERAGE=ON ..
;;
"asan")
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER=address ..
;;
"ubsan")
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER=undefined ..
;;
"cross")
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake -DCMAKE_EXE_LINKER_FLAGS="-static -s" ..
;;
"release")
cmake -DCMAKE_BUILD_TYPE=Release ..
;;
*)
cmake ..
;;
esac
script:
- make VERBOSE=1
- if [ "x${BUILD_TYPE}" != "xcross" ]; then ctest -V; fi