-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
258 lines (247 loc) · 12.3 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
language: cpp
sudo: required # need by trusty
dist: trusty # Ubuntu 14.04 Trusty Tahr
group: deprecated-2017Q4 # use the previous linux iso file in order to have cmake
cache: apt # feature available only for private repositories
##### Matrix definition
# For C++ projects, the env, compiler and os (provided as arrays)
# multiply to construct the build matrix. The shallow (refer to
# excluded configurations) resulting matrix yields 6 jobs:
# - linux:
# - gcc: Debug and Release over Qt4
# - clang: Debug and Release over Qt4
# - osx:
# - clang: Debug and Release over Qt4 and Qt5
# NOTE: under the hood OSX does in fact two sub-jobs per job,
# since two Qt versions 4 and 5 are sequentially tested.
# - Win32: (not dealt with by Travis bu through Appveyor)
# - VC++: Debug and Release over Qt4 and Qt5
os:
- linux # Ubuntu 14.04 Trusty Tahr
- osx # Default is OSX 10.11.6 (2015) and XCode 7.3.1: refer to
# https://docs.travis-ci.com/user/osx-ci-environment/
osx_image: xcode8.2
compiler:
- gcc
- clang # Under OSX the backend is Apple's LLVM
env:
- CONFIG="QT4,Debug"
- CONFIG="QT4,Release"
- CONFIG="QT5,Debug"
- CONFIG="QT5,Release"
matrix:
fast_finish: true
exclude:
- os: osx
compiler: gcc
#####
addons:
apt:
packages:
- libboost-date-time-dev
- libboost-filesystem-dev
- libboost-dev
- libboost-date-time-dev
- libboost-program-options-dev
- libassimp-dev
- libopenscenegraph-dev
- libgdal-dev
- doxygen
- graphviz
# Point Cloud Library (PCL) dependencies. PCL itself not being an
# available package (do not get confused with the Portable Coroutine
# Library packaged as libpcl1-dev), it is manually "gotten" (refer
# to install section)
- libboost-chrono-dev
- libboost-dev
- libboost-iostreams-dev
- libboost-serialization-dev
- libboost-system-dev
- libboost-thread-dev
- libeigen3-dev
- libflann-dev
- libqhull-dev
before_install:
# FIXME: remove this now hopefully useless TRAVIS environment variable
- export TRAVIS=YES
- export WGET="wget --no-check-certificate "
- export CMAKE_COMMON_FLAGS="-DBUILD_ALL_PLUGINS=ON -DBUILD_UNMATURE_TESTS=OFF"
- if [[ $CONFIG == "QT4,Debug" ]]; then export QT="4"; export BTYPE="Debug"; fi
- if [[ $CONFIG == "QT4,Release" ]]; then export QT="4"; export BTYPE="Release"; fi
- if [[ $CONFIG == "QT5,Debug" ]]; then export QT="5"; export BTYPE="Debug"; fi
- if [[ $CONFIG == "QT5,Release" ]]; then export QT="5"; export BTYPE="Release"; fi
install:
- cmake --version
#
### Linux dependencies install:
# Because of QT4/QT5 co-existence conflicts at the cmake level
# (refer e.g. to https://bugzilla.redhat.com/show_bug.cgi?id=1330761 )
# we refrain from co-installing those two packages
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$QT" == "4" ]; then
sudo apt-get -y install libqt4-dev libqt4-opengl-dev; fi
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$QT" == "5" ]; then
sudo apt-get -y install qtbase5-dev qt5-default libqt5opengl5; fi
#
### OSX dependencies install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update; fi
# Dealing with boost on OSX is messy. The difficulty is for cmake to
# find (when using find_package()) its boost required dependency:
# - sometimes it will find it under the Boost name (capital B to Boost
# it works for other paltforms)
# - sometimes it will find it under the boost name (lower case b to boost)
# which is very OSX specific.
# The additional difficulty is that this Boost vs boost confusiong depends
# (still for OSX) on a combination of two parameters:
# - cmake version number,
# - boost packages version number.
# In order to illustrate this difficulty, the follwing table illustrates
# the "fluctations" encountered in the history of the platform
# | 3.4.1 | 3.4.3 | 3.7.1 | CMake version
# ---------------------------------------------
# < 1.60 | Boost | boost | |
# 1.62 | | | Boost |
# 1.63 | | | boost |
# ---------------------------------------------
# Boost version |
# In other terms, with cmake version smaller to 3.4.1 you had to find
# "Boost". Then when cmake came to version 3.4.1 you had to find the
# lower case version "boost". When cmake upgraded to 3.7.1 one has to
# fold back to a capital "Boost". But when boost package changed from
# 1.62 to 1.63, one had to use the small caps "boost" again.
# This succession of situations becomes hellish when you know that Travis
# upgrades (that impact on OSX version that impacts on brew version)
# are decoralated from Homebrew upgrade choices for the current
# cmake version vs boost version...
#
# This would be already chanlenging to maintain if another tranversal
# difficulty (due to Travis) didn't kick in: sometimes when Travis
# instals boost directly (through "brew install boost") then brew triggers
# a re-install that ends up considered as an (false positive) error by
# Travis. A work around (documented here
# https://docs.travis-ci.com/user/osx-ci-environment/#A-note-on-upgrading-packages )
# consists in using the following odd form or install:
# brew outdated boost || brew upgrade boost; fi
# All the above histoty is to say that, when installing boost for OSX on
# Travis, you can expect some unstability and time (version dependent)
# kludgy (ad-hoc) fixes. Here goes the historical notes:
# Prior to 2017 we upgraded boost (to obtain version 1.62) which
# made "Boost" available (OSX would behave as the other platforms again):
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# brew outdated boost || brew upgrade boost; fi
# As for January 2017, upgrading boost would switch to version 1.63
# which means switching from Boost to boost again (refer to the above
# table). So we choose _not_ to upgrade and stick with version the
# default provided version 1.62...
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew info boost; fi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$QT" == "4" ]; then
travis_wait 50 brew install cartr/qt4/qt; fi
# As of december 2016, Homebrew no longer offers qt (qt4): refer to
# https://github.com/cartr/homebrew-qt4/issues/5
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$QT" == "5" ]; then
brew install qt5 &&
brew link qt5 --force; fi
# FIXME: following comment seems to be a historical glitch...
# Note: open-scene-graph is not re-installed and hence the native OSG-Qt
# (that links against Qt4) cannot be used.
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install assimp; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install doxygen; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install graphviz; fi
### Open-Scene-Graph
# Travis feeds on Homebrew that switched its default version of OSG to
# be 3.5.5 (which seems not even official, refer to
# http://www.openscenegraph.org/index.php/download-section/developer-releases).
# This breaks the embarked version 34 of OSG-QT. We thus trick Homebrew to
# install version 3.4.4 by overwriting the associated formula. This must be
# done just before installing OSG since Homebrew default behavior is now to
# check for updates on a per command basis a.k.a. auto-update (e.g. each
# time a sub-dependency is installed) and thus in order to prevent any
# change (overwrite to 3.5.5) that could happen (within the Homebrew
# repository) in between the "brew update" and the following "brew
# install" of OSG:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula &&
mv wget.rb wget.rb.old &&
wget --no-check-certificate https://download.gforge.liris.cnrs.fr/meppbin/travis-osx/Formula/wget119/wget.rb &&
mv open-scene-graph.rb open-scene-graph.rb.old &&
$WGET https://download.gforge.liris.cnrs.fr/meppbin/travis-osx/Formula/osg34/open-scene-graph.rb &&
cd $TRAVIS_BUILD_DIR; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install open-scene-graph; fi
### Gdal
# "brew install gdal" is skipped because was already (indirectly) pulled.
# Yet we need to fix an unstatified dependency of libgdal.1.dylib that
# looks for libspatialite.5.dylib (version 5) when the libspatialite
# formula installs libspatialite.7.dylib (version 7). We thus trick
# libgdal in getting what it needs:
# refer to issue #121. [osx_image: beta-xcode6.1]
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
ln -s /usr/local/lib/libspatialite.dylib /usr/local/lib/libspatialite.5.dylib; fi
### PCL related install:
# PCL INSTALLATION IS A MESS. It pulls too many heavy dependencies which
# eventually times out Travis. We thus disable it.
#
# The following sub-dependencies are manually installed (instead of
# letting them be pulled indirectly by pcl) just to make sub-dependencies
# more explicit.
#
#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# brew install flann; fi
#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# brew install homebrew/core/qhull; fi
#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# brew install eigen; fi
# Pcl itself takes a long time to be poured (more than Travis's 10'
# default cut off). Note that using brew options like --without-apps
# or --without-tools triggers a pull of sources and a rebuild which is
# much too long for hoping to this build finish properly. We the
# just pour the plain pcl package
#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_wait 40
# brew install homebrew/core/pcl --without-vtk --without-apps; fi
# PCL config files looks for the Boost package (whith a capital B) which
# will fail starting with cmake version 3.5 (previous version seem not
# be case dependent on the find_package argument) with a message of the
# form:
# CMake Error at /usr/local/share/pcl-1.7/PCLConfig.cmake:45 (message):
# common is required but boost was not found
# Hence the following kludgy fix
#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then printf ",s/find_package(Boost/find_package(boost/\nwq\n" | ed /usr/local/Cellar/pcl/1.8.*/share/pcl-1.8/PCLConfig.cmake; fi
#
###### Linux depedency installation
# We are here only concerned with dependencies that were not already
# installed in above section addons:apt:packages.
### Point Cloud Library (not be confused with another library carrying
# package under the same "pcl" name):
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cd /tmp &&
$WGET https://download.gforge.liris.cnrs.fr/meppbin/travis-trusty/pcl-pcl-1.7.2.travis-trusty.tgz &&
tar zxf pcl-pcl-1.7.2.travis-trusty.tgz &&
cd pcl-pcl-1.7.2/buildR &&
sudo make install &&
cd $TRAVIS_BUILD_DIR; fi
script:
# FIXME: try to deport laslib installation to install target
- cd externals/laslib
- mkdir buildR; cd buildR; cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_RULE_MESSAGES=OFF; make; sudo make install
# Proceed with cmake building:
- cd $TRAVIS_BUILD_DIR # that is our $HOME
- mkdir build && cd build
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$QT" == "4" ]; then
cmake .. $CMAKE_COMMON_FLAGS -DBUILD_PCL=OFF -DCMAKE_BUILD_TYPE=$BTYPE; fi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$QT" == "4" ]; then
cmake .. $CMAKE_COMMON_FLAGS -DCMAKE_BUILD_TYPE=$BTYPE -DBUILD_EMBARKED_OSG-QT_34=ON; fi
# Note: for QT5 open-scene-graph is not re-installed and hence the native OSG-Qt
# (that links against Qt4) cannot be used and we thus use the "embarked" versions
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$QT" == "5" ]; then
cmake .. $CMAKE_COMMON_FLAGS -DBUILD_PCL=OFF -DCMAKE_BUILD_TYPE=$BTYPE -DBUILD_GUI_QT5=ON -DBUILD_EMBARKED_OSG-QT_32=ON; fi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$QT" == "5" ]; then
cmake .. $CMAKE_COMMON_FLAGS -DCMAKE_BUILD_TYPE=$BTYPE -DBUILD_GUI_QT5=ON -DQT5_DIR=/usr/local/opt/qt5 -DBUILD_EMBARKED_OSG-QT_34=ON; fi
# End build at make level:
- make
# Eventually run the tests
- ctest -V