forked from robotology/yarp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
320 lines (257 loc) · 13.6 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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
sudo: required
dist: trusty
language: cpp
cache: ccache
os:
- linux
- osx
compiler:
- gcc
- clang
env:
global:
- TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
- TRAVIS_BUILD_TYPE=Release
- TRAVIS_WITH_INTEGRATION_TESTS=false
- TRAVIS_STATIC=false
- TRAVIS_WITH_VALGRIND=false
- TRAVIS_NO_DEPRECATED=false
- TRAVIS_WITH_BROKEN_TESTS=false
matrix:
# Normal build
- TRAVIS_WITH_CXX11=false
# C++11 build
- TRAVIS_WITH_CXX11=true
matrix:
exclude:
- os: osx
compiler: gcc
include:
# No ACE build (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=false TRAVIS_WITH_CXX11=false
# No ACE build (linux, clang)
- os: linux
compiler: clang
env: TRAVIS_WITH_ACE=false TRAVIS_WITH_CXX11=false
# C++11, no ACE build (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=false TRAVIS_WITH_CXX11=true
# C++11, no ACE build (linux, clang)
- os: linux
compiler: clang
env: TRAVIS_WITH_ACE=false TRAVIS_WITH_CXX11=true
# Normal build with Ninja generator (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_CMAKE_GENERATOR="Ninja"
# Normal build with Ninja generator (linux, clang)
- os: linux
compiler: clang
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_CMAKE_GENERATOR="Ninja"
# Normal build with integration tests (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_WITH_INTEGRATION_TESTS=true
# Normal build with integration tests (linux, clang)
- os: linux
compiler: clang
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_WITH_INTEGRATION_TESTS=true
# Normal build no deprecated (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_NO_DEPRECATED=true
# Normal build no deprecated (linux, clang)
- os: linux
compiler: clang
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_NO_DEPRECATED=true
# Static build (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_STATIC=true
# Static build (linux, clang)
- os: linux
compiler: clang
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_STATIC=true
# Static build, no ACE (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=false TRAVIS_WITH_CXX11=false TRAVIS_STATIC=true
# Static build, no ACE (linux, clang)
- os: linux
compiler: clang
env: TRAVIS_WITH_ACE=false TRAVIS_WITH_CXX11=false TRAVIS_STATIC=true
# Normal build with valgrind (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_WITH_VALGRIND=true
# C++11 build with valgrind (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=true TRAVIS_WITH_VALGRIND=true
# No ACE build with valgrind (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=false TRAVIS_WITH_CXX11=false TRAVIS_WITH_VALGRIND=true
# C++11 build with valgrind (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=false TRAVIS_WITH_CXX11=true TRAVIS_WITH_VALGRIND=true
# Normal build with valgrind and broken tests (linux, gcc)
- os: linux
compiler: gcc
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_WITH_VALGRIND=true TRAVIS_WITH_BROKEN_TESTS=true
# Normal build with Coverage (linux, gcc)
# - os: linux
# compiler: gcc
# env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_BUILD_TYPE=Profile
# Normal build with Xcode 7.3 (osx, clang)
- os: osx
osx_image: xcode7.3
compiler: clang
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_CMAKE_GENERATOR="Xcode"
# C++11 build with Xcode 7.3 (osx, clang)
- os: osx
osx_image: xcode7.3
compiler: clang
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=true TRAVIS_CMAKE_GENERATOR="Xcode"
# Normal build with Xcode 8 (osx, clang)
- os: osx
osx_image: xcode8
compiler: clang
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_CMAKE_GENERATOR="Xcode"
# C++11 build with Xcode 8 (osx, clang)
- os: osx
osx_image: xcode8
compiler: clang
env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=true TRAVIS_CMAKE_GENERATOR="Xcode"
allow_failures:
# Normal build with integration tests (sometimes integration::rpc test fails)
- env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_WITH_INTEGRATION_TESTS=true
# Normal build with valgrind and broken tests (tests of already broken things)
- env: TRAVIS_WITH_ACE=true TRAVIS_WITH_CXX11=false TRAVIS_WITH_VALGRIND=true TRAVIS_WITH_BROKEN_TESTS=true
branches:
except:
- /^*appveyor*$/
notifications:
irc:
channels:
- "chat.freenode.net#yarpers"
template:
- "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"
use_notice: true
skip_join: true
before_install:
# Prepare ros environment variables
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then export ROS_CI_DESKTOP=`lsb_release -cs`; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then export ROS_CI_VERSION=indigo; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then export ROS_CI_PREFIX=ros-${ROS_CI_VERSION}-; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then export ROS_HOSTNAME=localhost; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then export ROS_MASTER_URI=http://localhost:11311; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then export ROBOT=sim; fi; fi
# Update repositories (macOS)
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
# Add additional repositories
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then echo "deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main" | sudo tee /etc/apt/sources.list.d/ros-latest.list; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then wget http://packages.ros.org/ros.key -O - | sudo apt-key add -; fi; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew tap homebrew/science; fi
# Update repositories (Linux)
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
# Install missing build tools
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TRAVIS_CMAKE_GENERATOR" == "Ninja" ]; then sudo apt-get install ninja-build; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TRAVIS_BUILD_TYPE" == "Profile" ]; then sudo apt-get -y install lcov; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TRAVIS_BUILD_TYPE" == "Profile" ]; then sudo gem install coveralls-lcov; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_VALGRIND; then sudo apt-get install -y valgrind; fi; fi
# Install ccache on osx
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ccache; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
# Use ccache also for clang and clang++ on linux
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CC" == "clang" ]; then sudo ln -s ../../bin/ccache /usr/lib/ccache/clang; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CC" == "clang" ]; then export CFLAGS="-Qunused-arguments"; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CXX" == "clang++" ]; then sudo ln -s ../../bin/ccache /usr/lib/ccache/clang++; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CXX" == "clang++" ]; then export CXXFLAGS="-Qunused-arguments"; fi; fi
# Print some more system information after installing all build tools
- echo "-------------------- BEGIN SYSTEM INFORMATION --------------------"
- uname -a
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then lsb_release -a; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then system_profiler SPSoftwareDataType; fi
- env
- which cmake
- cmake --version
- which $CC
- $CC --version
- which $CXX
- $CXX --version
- which ccache
- ccache --version
- ccache -s
- echo "-------------------- END SYSTEM INFORMATION --------------------"
install:
# Install ACE
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_ACE; then sudo apt-get -y install libace-dev; fi; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then if $TRAVIS_WITH_ACE; then brew install ace; fi; fi
# Install other core dependencies (sqlite, tinyxml, libedit)
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y libsqlite3-dev libtinyxml-dev libedit-dev; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install sqlite tinyxml homebrew/dupes/libedit; fi
# Install Qt5 GUIs dependencies
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install qt5; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export Qt5_DIR="/usr/local/opt/qt5/lib/cmake/Qt5"; fi
# Install GPL dependencies (gsl, qcustomplot)
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y libgsl0-dev libqcustomplot-dev; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install gsl readline; fi
# Install other dependencies (opencv, eigen)
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y libopencv-dev libeigen3-dev; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then /usr/bin/yes | pip uninstall numpy || true; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install opencv eigen; fi
# Install swig stuff
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then sudo apt-get -y install liblua5.1-0-dev lua5.1 tcl-dev tk-dev mono-mcs; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then wget https://github.com/robotology-dependencies/swigs/releases/download/v0.0.5/swigs.zip; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then unzip -q swigs.zip; mkdir -p cache; mv swigs cache/swig; fi; fi
# Install ros stuff
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then sudo apt-get -y install ${ROS_CI_PREFIX}desktop-full; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then sudo rosdep init && rosdep update; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if $TRAVIS_WITH_INTEGRATION_TESTS; then source /opt/ros/${ROS_CI_VERSION}/setup.bash; fi; fi
before_script:
# Prepare build directory
- mkdir -p build
- if $TRAVIS_WITH_INTEGRATION_TESTS; then ln -s ../cache build/cache; fi
# Prepare cmake options
- . scripts/admin/generate-cmake-options.sh $(hostname) $(lsb_release -cs) continuous
- export YARP_CMAKE_OPTIONS=" $CMAKE_OPTIONS"
- if ! $TRAVIS_WITH_ACE; then export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DSKIP_ACE=ON -DYARP_TEST_HEAP=ON"; fi
- if $TRAVIS_WITH_CXX11; then export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_EXPERIMENTAL_CXX11=ON"; fi
- if $TRAVIS_WITH_INTEGRATION_TESTS; then export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_TEST_INTEGRATION=ON"; fi
- if $TRAVIS_STATIC; then export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DCREATE_SHARED_LIBRARY=OFF"; fi
- if $TRAVIS_WITH_VALGRIND; then export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_VALGRIND_TESTS=ON -DYARP_VALGRIND_DRD_TESTS=OFF -DYARP_VALGRIND_HELGRIND_TESTS=OFF YARP_VALGRIND_MEMCHECK_TESTS=ON YARP_VALGRIND_SGCHECK_TESTS=OFF"; fi
- if $TRAVIS_NO_DEPRECATED; then export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_NO_DEPRECATED=ON"; fi
- if $TRAVIS_WITH_BROKEN_TESTS; then export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DYARP_ENABLE_BROKEN_TESTS=ON"; fi
- export YARP_CMAKE_OPTIONS="${YARP_CMAKE_OPTIONS} -DCREATE_LIB_MATH_USING_GSL=OFF"
# Run CMake
- (cd build; cmake -G"${TRAVIS_CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} ${YARP_CMAKE_OPTIONS} ..)
# Reset coverage information
- if [ "$TRAVIS_BUILD_TYPE" == "Profile" ]; then (cd build; lcov --directory . --zerocounters); fi
script:
# Build yarp
- (cd build; cmake --build . --config ${TRAVIS_BUILD_TYPE})
# Configure yarp
- if $TRAVIS_WITH_INTEGRATION_TESTS; then build/bin/yarp conf 0 0 local; fi
# Run unit tests
- (cd build; travis_wait 50 ctest --output-on-failure --build . -C ${TRAVIS_BUILD_TYPE})
# Test installation
- (cd build; sudo cmake --build . --config ${TRAVIS_BUILD_TYPE} --target install)
# Build also the os examples
- mkdir example/os/build
- (cd example/os/build; cmake -G"${TRAVIS_CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} ..)
- (cd example/os/build; cmake --build . --config ${TRAVIS_BUILD_TYPE})
after_success:
# Capture coverage info for Profile builds
- if [ "$TRAVIS_BUILD_TYPE" == "Profile" ]; then (cd build; lcov --directory . --capture --output-file coverage.info); fi
# Filter out system and test code
- if [ "$TRAVIS_BUILD_TYPE" == "Profile" ]; then (cd build; lcov --remove coverage.info '/usr/*' 'tests/*' 'example/*' 'extern/*' 'idls/*' '*/harness/*' 'yarp/build/*' 'src/libYARP_serversql/*' 'src/libYARP_name/*' --output-file coverage.info); fi
# Debug before upload
- if [ "$TRAVIS_BUILD_TYPE" == "Profile" ]; then (cd build; lcov --list coverage.info); fi
# Uploads to coveralls
- if [ "$TRAVIS_BUILD_TYPE" == "Profile" ]; then (cd build; coveralls-lcov --source-encoding=ISO-8859-1 coverage.info); fi