-
Notifications
You must be signed in to change notification settings - Fork 57
/
.travis.yml
236 lines (212 loc) · 5.59 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
235
236
language: cpp
_packages:
- &clang clang-3.8
- &gcc g++-5
_apt: &apt-common
sources:
- llvm-toolchain-trusty-3.8
- ubuntu-toolchain-r-test
cache:
ccache: true
directories:
- build
- .mtime_cache
matrix:
include:
# Linux clang
- os: linux
sudo: required
env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Unix Makefiles"
addons:
apt:
<<: *apt-common
packages:
- *clang
- *gcc
- valgrind
compiler: clang
- os: linux
sudo: required
env: BUILD_TYPE=Debug SANITIZE=undefined CMAKE_GENERATOR="Unix Makefiles"
addons:
apt:
<<: *apt-common
packages:
- *clang
- *gcc
compiler: clang
- os: linux
sudo: required
env: BUILD_TYPE=Debug SANITIZE=address CMAKE_GENERATOR="Unix Makefiles"
addons:
apt:
<<: *apt-common
packages:
- *clang
- *gcc
compiler: clang
- os: linux
sudo: required
env: BUILD_TYPE=Release CMAKE_GENERATOR="Unix Makefiles"
addons:
apt:
<<: *apt-common
packages:
- *clang
- *gcc
compiler: clang
# Linux gcc
- os: linux
sudo: false
env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Unix Makefiles"
addons:
apt:
<<: *apt-common
packages:
- *gcc
- valgrind
compiler: gcc
- os: linux
sudo: false
env: BUILD_TYPE=Debug SANITIZE=undefined CMAKE_GENERATOR="Unix Makefiles"
addons:
apt:
<<: *apt-common
packages:
- *gcc
compiler: gcc
- os: linux
sudo: false
env: BUILD_TYPE=Debug SANITIZE=address CMAKE_GENERATOR="Unix Makefiles"
addons:
apt:
<<: *apt-common
packages:
- *gcc
compiler: gcc
- os: linux
sudo: false
env: BUILD_TYPE=Release CMAKE_GENERATOR="Unix Makefiles"
addons:
apt:
<<: *apt-common
packages:
- *gcc
compiler: gcc
# OSX clang
- os: osx
osx_image: xcode9.2
env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Xcode"
addons:
homebrew:
update: true
packages:
- ccache
- cmake
- valgrind
compiler: clang
- os: osx
osx_image: xcode8.3
env: BUILD_TYPE=Release CMAKE_GENERATOR="Xcode"
addons:
homebrew:
update: true
packages:
- ccache
- cmake
compiler: clang
# Windows GCC
- os: windows
language: sh
env: BUILD_TYPE=Debug CMAKE_GENERATOR="MinGW Makefiles"
compiler: gcc
- os: windows
language: sh
env: BUILD_TYPE=Release CMAKE_GENERATOR="MinGW Makefiles"
compiler: gcc
# Code coverage
- os: linux
sudo: false
if: branch in (master, develop)
env: BUILD_TYPE=Debug CMAKE_GENERATOR="Unix Makefiles" ENABLE_COVERAGE=true
addons:
apt:
<<: *apt-common
packages:
- *gcc
- lcov
compiler: gcc
# Conan
- os: linux
sudo: required
language: python
python: "3.6"
if: branch = master
env: CC=clang CXX=clang++
addons:
apt:
<<: *apt-common
packages:
- *gcc
install:
- pip install conan
script:
- conan create . morwenn/stable
after_success:
- conan remote add bintray https://api.bintray.com/conan/morwenn/cpp-sort
- conan user -r bintray -p ${CONAN_PASSWORD} morwenn
- conan upload --all -r bintray cpp-sort/1.5.0@morwenn/stable
before_install:
- if [[ $TRAVIS_OS_NAME = "linux" && $CXX = "clang++" ]]; then
sudo ln -s $(which ccache) /usr/lib/ccache/clang++;
export CXXFLAGS="-Qunused-arguments";
fi
install:
- gem install mtime_cache
- if [[ $TRAVIS_OS_NAME = "osx" ]]; then
export PATH="/usr/local/opt/ccache/libexec:$PATH";
fi
- if [[ $CXX = "g++" ]]; then export CXX="g++-5"; fi
- if [[ $CXX = "clang++" ]]; then export CXX="clang++-3.8"; fi
script:
- cmake -H. -Bbuild
-DCMAKE_CONFIGURATION_TYPES="${BUILD_TYPE}"
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}"
-DSANITIZE="${SANITIZE}"
-DUSE_VALGRIND=${USE_VALGRIND}
-DENABLE_COVERAGE=${ENABLE_COVERAGE}
-G"${CMAKE_GENERATOR}"
-DCMAKE_SH="CMAKE_SH-NOTFOUND"
- mtime_cache -g mtime_cache_globs.txt -c .mtime_cache/cache.json
- if [[ $TRAVIS_OS_NAME = "osx" ]]; then
cmake --build build --config ${BUILD_TYPE} -j 2;
else
cmake --build build --config ${BUILD_TYPE} -- -j2;
fi
- cd build
- if [[ $USE_VALGRIND = true ]]; then
travis_wait 50 ctest -T memcheck -C ${BUILD_TYPE} --output-on-failure -j 4;
else
travis_wait ctest -C ${BUILD_TYPE} --output-on-failure;
fi
- if [[ $TRAVIS_OS_NAME = "windows" ]]; then
cd ..;
fi
after_success:
- if [[ $TRAVIS_OS_NAME = "windows" ]]; then
cd build;
fi
- if [[ $ENABLE_COVERAGE = true ]]; then
make gcov;
make lcov;
bash <(curl -s https://codecov.io/bash) -X gcov || echo "Codecov did not collect coverage reports";
fi
after_failure:
- if [[ $TRAVIS_OS_NAME = "windows" ]]; then
cd build;
fi
- if [[ $USE_VALGRIND = true ]]; then
find ./Testing/Temporary -type f -name "MemoryChecker.*.log" -size +1300c | xargs cat;
fi
notifications:
email: false