forked from ericniebler/range-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
234 lines (202 loc) · 7.76 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# Adapted from various sources, including:
# - Louis Dionne's Hana: https://github.com/ldionne/hana
# - Paul Fultz II's FIT: https://github.com/pfultz2/Fit
language: cpp
script: cmake
# Test matrix:
# - Build matrix per compiler: C++11/C++14 + Debug/Release
# - Optionally: AddressSanitizer (ASAN)
# - Valgrind: all release builds are also tested with valgrind
# - clang 3.4, 3.5, 3.6, trunk
# - Note: 3.4 and trunk are tested with/without ASAN,
# the rest is only tested with ASAN=On.
# - gcc 4.9, 5.0
#
matrix:
include:
# Test clang-3.4: C++11, Buidd=Debug/Release, ASAN=On/Off
- env: CLANG_VERSION=3.4 BUILD_TYPE=Debug CPP=11 ASAN=On LIBCXX=On
os: linux
compiler: clang34
addons: &clang34
apt:
packages:
- valgrind
sources:
- ubuntu-toolchain-r-test
- env: CLANG_VERSION=3.4 BUILD_TYPE=Release CPP=11 ASAN=On LIBCXX=On
os: linux
compiler: clang
addons: *clang34
# - env: CLANG_VERSION=3.4 BUILD_TYPE=Debug CPP=11 ASAN=Off LIBCXX=On
# os: linux
# compiler: clang
# addons: *clang34
# - env: CLANG_VERSION=3.4 BUILD_TYPE=Release CPP=11 ASAN=Off LIBCXX=On
# os: linux
# compiler: clang
# addons: *clang34
# Test clang-3.5: C++11/C++14, Buidd=Debug/Release, ASAN=On/Off
# - env: CLANG_VERSION=3.5 BUILD_TYPE=Debug CPP=11 ASAN=On LIBCXX=On
# os: linux
# addons: &clang35
# apt:
# packages:
# - clang-3.5
# - valgrind
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-precise-3.5
# - env: CLANG_VERSION=3.5 BUILD_TYPE=Release CPP=11 ASAN=On LIBCXX=On
# os: linux
# addons: *clang35
# - env: CLANG_VERSION=3.5 BUILD_TYPE=Debug CPP=14 ASAN=On LIBCXX=On
# os: linux
# addons: *clang35
# - env: CLANG_VERSION=3.5 BUILD_TYPE=Release CPP=14 ASAN=On LIBCXX=On
# os: linux
# addons: *clang35
# Uncomment these to test without AddressSanitizer
# - env: CLANG_VERSION=3.5 BUILD_TYPE=Debug CPP=11 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang35
# - env: CLANG_VERSION=3.5 BUILD_TYPE=Release CPP=11 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang35
# - env: CLANG_VERSION=3.5 BUILD_TYPE=Debug CPP=14 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang35
# - env: CLANG_VERSION=3.5 BUILD_TYPE=Release CPP=14 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang35
# Test clang-3.6: C++11/C++14, Buidd=Debug/Release, ASAN=On/Off
# - env: CLANG_VERSION=3.6 BUILD_TYPE=Debug CPP=11 ASAN=On LIBCXX=On
# os: linux
# addons: &clang36
# apt:
# packages:
# - clang-3.6
# - valgrind
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-precise-3.6
# - env: CLANG_VERSION=3.6 BUILD_TYPE=Release CPP=11 ASAN=On LIBCXX=On
# os: linux
# addons: *clang36
# - env: CLANG_VERSION=3.6 BUILD_TYPE=Debug CPP=14 ASAN=On LIBCXX=On
# os: linux
# addons: *clang36
# - env: CLANG_VERSION=3.6 BUILD_TYPE=Release CPP=14 ASAN=On LIBCXX=On
# os: linux
# addons: *clang36
# Uncomment these to test without AddressSanitizer
# - env: CLANG_VERSION=3.6 BUILD_TYPE=Debug CPP=11 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang36
# - env: CLANG_VERSION=3.6 BUILD_TYPE=Release CPP=11 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang36
# - env: CLANG_VERSION=3.6 BUILD_TYPE=Debug CPP=14 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang36
# - env: CLANG_VERSION=3.6 BUILD_TYPE=Release CPP=14 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang36
# Test clang-3.7: C++11/C++14, Buidd=Debug/Release, ASAN=On/Off
- env: CLANG_VERSION=3.7 BUILD_TYPE=Debug CPP=11 ASAN=On LIBCXX=On
os: linux
addons: &clang37
apt:
packages:
- clang-3.7
- valgrind
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise
- env: CLANG_VERSION=3.7 BUILD_TYPE=Release CPP=11 ASAN=On LIBCXX=On
os: linux
addons: *clang37
- env: CLANG_VERSION=3.7 BUILD_TYPE=Debug CPP=14 ASAN=On LIBCXX=On
os: linux
addons: *clang37
- env: CLANG_VERSION=3.7 BUILD_TYPE=Release CPP=14 ASAN=On LIBCXX=On
os: linux
addons: *clang37
# - env: CLANG_VERSION=3.7 BUILD_TYPE=Debug CPP=11 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang37
# - env: CLANG_VERSION=3.7 BUILD_TYPE=Release CPP=11 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang37
# - env: CLANG_VERSION=3.7 BUILD_TYPE=Debug CPP=14 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang37
# - env: CLANG_VERSION=3.7 BUILD_TYPE=Release CPP=14 ASAN=Off LIBCXX=On
# os: linux
# addons: *clang37
# Test gcc-4.9: C++11, Build=Debug/Release, ASAN=Off
- env: GCC_VERSION=4.9 BUILD_TYPE=Debug CPP=11 ASAN=Off LIBCXX=Off
os: linux
addons: &gcc49
apt:
packages:
- g++-4.9
- valgrind
sources:
- ubuntu-toolchain-r-test
- env: GCC_VERSION=4.9 BUILD_TYPE=Release CPP=11 ASAN=Off LIBCXX=Off
os: linux
addons: *gcc49
# Test gcc-5.0: C++11/14, Build=Debug/Release, ASAN=Off
# - env: GCC_VERSION=5 BUILD_TYPE=Debug CPP=11 ASAN=Off LIBCXX=Off
# os: linux
# addons: &gcc5
# apt:
# packages:
# - gcc-5
# - valgrind
# sources:
# - ubuntu-toolchain-r-test
# - env: GCC_VERSION=5 BUILD_TYPE=Release CPP=11 ASAN=Off LIBCXX=Off
# os: linux
# addons: *gcc5
# - env: GCC_VERSION=5 BUILD_TYPE=Debug CPP=14 ASAN=Off LIBCXX=Off
# os: linux
# addons: *gcc5
# - env: GCC_VERSION=5 BUILD_TYPE=Release CPP=14 ASAN=Off LIBCXX=Off
# os: linux
# addons: *gcc5
# Install dependencies
before_install:
- export CHECKOUT_PATH=`pwd`;
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
- if [ -n "$CLANG_VERSION" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
- if [ "$CLANG_VERSION" == "3.4" ]; then export CXX="/usr/local/clang-3.4/bin/clang++" CC="/usr/local/clang-3.4/bin/clang"; fi
- which $CXX
- which $CC
- which valgrind
- if [ -n "$CLANG_VERSION" ]; then sudo CXX=$CXX CC=$CC ./install_libcxx.sh; fi
install:
- cd $CHECKOUT_PATH
# Workaround for valgrind bug: https://bugs.kde.org/show_bug.cgi?id=326469.
# It is fixed in valgrind 3.10 so this won't be necessary if someone
# replaces the current valgrind (3.7) with valgrind-3.10
- sed -i 's/march=native/msse4.2/' CMakeLists.txt
- if [ ! -d build ]; then mkdir build; fi
- cd build
- export CXX_FLAGS=""
- export CXX_LINKER_FLAGS=""
- if [ -z "$BUILD_TYPE" ]; then export BUILD_TYPE=Release; fi
- if [ "$ASAN" == "On"]; then export CXX_FLAGS="${CXX_FLAGS} -fsanitize=address,undefined,integer -fno-omit-frame-pointer -fno-sanitize=unsigned-integer-overflow"; fi
- if [ -n "$CLANG_VERSION" ]; then CXX_FLAGS="${CXX_FLAGS} -D__extern_always_inline=inline"; 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
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CXX_LINKER_FLAGS}" -DRANGES_CXX_STD=$CPP -DMEMORYCHECK_COMMAND:FILEPATH=/usr/bin/valgrind
- make VERBOSE=1
script:
- ctest -VV
# Valgrind runs for clang release builds only,
# it fails when using gcc-4.9 + libstdc++-4.9.
- if [ "$BUILD_TYPE" == "Release" ] && [ ! -n "$GCC_VERSION" ]; then ctest -VV -D ExperimentalMemCheck; fi
notifications:
email: false