forked from pfultz2/Tick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
141 lines (139 loc) · 5.38 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
language: cpp
os:
- linux
matrix:
include:
# Debug
- compiler: gcc
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- GCC_VERSION="4.9"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: gcc
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- GCC_VERSION="4.8"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: gcc
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- GCC_VERSION="4.7"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: gcc
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- GCC_VERSION="4.6"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: clang
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- CLANG_VERSION="3.4"
- LIBCXX="on"
- ASAN="off"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: clang
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- CLANG_VERSION="3.4"
- LIBCXX="off"
- ASAN="off"
- GCC_VERSION="4.9"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: clang
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- CLANG_VERSION="3.6"
- LIBCXX="on"
- ASAN="off"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: clang
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- CLANG_VERSION="3.6"
- LIBCXX="off"
- ASAN="off"
- GCC_VERSION="4.9"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: clang
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- CLANG_VERSION="3.4"
- LIBCXX="on"
- ASAN="on"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: clang
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- CLANG_VERSION="3.4"
- LIBCXX="off"
- ASAN="on"
- GCC_VERSION="4.9"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: clang
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- CLANG_VERSION="3.6"
- LIBCXX="on"
- ASAN="on"
- CXX_FLAGS="-Wall -Wextra -Werror"
- compiler: clang
env:
- ENABLE_BUILD="on"
- BUILD_TYPE="Debug"
- CLANG_VERSION="3.6"
- LIBCXX="off"
- ASAN="on"
- GCC_VERSION="4.9"
- CXX_FLAGS="-Wall -Wextra -Werror"
before_install:
- export CHECKOUT_PATH=`pwd`;
# Install cmake
- wget http://www.cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.sh
- sudo sh cmake-3.1.3-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir
# Setup sources
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
- if [ -n "$CLANG_VERSION" ]; then sudo apt-add-repository -y "deb http://llvm.org/apt/precise/ llvm-toolchain-precise-$CLANG_VERSION main"; fi
- sudo apt-get update -qq
# Install valgrind
- sudo apt-get install -qq valgrind
# Install gcc
- if [ -n "$GCC_VERSION" ]; then sudo apt-get install -qq g++-${GCC_VERSION}; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
# Install clang
- if [ -n "$CLANG_VERSION" ]; then sudo apt-get install -qq clang-${CLANG_VERSION}; fi
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
# Show compiler info
- if [ "$ENABLE_BUILD" = "on" ]; then $CXX --version; fi
- if [ "$ENABLE_BUILD" = "on" ]; then which $CXX; fi
- if [ "$ENABLE_BUILD" = "on" ]; then $CC --version; fi
- if [ "$ENABLE_BUILD" = "on" ]; then which $CC; fi
# Install libc++
- if [ "$LIBCXX" = "on" ]; then svn co --quiet http://llvm.org/svn/llvm-project/libcxx/trunk libcxx; fi
- if [ "$LIBCXX" = "on" ]; then cd libcxx/lib && bash buildit; fi
- if [ "$LIBCXX" = "on" ]; then sudo cp ./libc++.so.1.0 /usr/lib/; fi
- if [ "$LIBCXX" = "on" ]; then sudo mkdir /usr/include/c++/v1; fi
- if [ "$LIBCXX" = "on" ]; then cd .. && sudo cp -r include/* /usr/include/c++/v1/; fi
- if [ "$LIBCXX" = "on" ]; then cd /usr/lib && sudo ln -sf libc++.so.1.0 libc++.so; fi
- if [ "$LIBCXX" = "on" ]; then sudo ln -sf libc++.so.1.0 libc++.so.1 && cd $cwd; fi
script:
- cd $CHECKOUT_PATH
- if [ ! -d build ]; then mkdir build; fi
- cd build
- if [ "$ASAN" == "on"]; then export CXX_FLAGS="${CXX_FLAGS} -fsanitize=address,undefined,integer -fno-omit-frame-pointer -fno-sanitize=unsigned-integer-overflow"; fi
- if [ "$LIBCXX" = "on" ]; then CXX_FLAGS="${CXX_FLAGS} -stdlib=libc++ -I/usr/include/c++/v1/"; fi
- if [ "$LIBCXX" = "on" ]; then CXX_LINKER_FLAGS="${CXX_FLAGS} -L/usr/lib/ -lc++"; fi
- if [ "$ENABLE_BUILD" = "on" ]; then cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CXX_LINKER_FLAGS}" ..; fi
- if [ "$ENABLE_BUILD" = "on" ]; then CTEST_OUTPUT_ON_FAILURE=1 make -j4 check VERBOSE=1; fi
- cd .. && rm -rf build/