-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
157 lines (138 loc) · 4.32 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
sudo: false
dist: trusty
language: cpp
os:
- linux
cache: ccache
addons:
apt:
sources:
- sourceline: 'ppa:nschloe/eigen-backports'
- sourceline: 'deb http://www.icub.org/ubuntu trusty contrib/science'
packages:
- cmake3
- ninja-build
# YARP / YCM / iCub
- icub-common
- libqt5opengl5-dev
- libeigen3-dev
compiler:
- gcc
- clang
env:
global:
- TRAVIS_CMAKE_GENERATOR="Ninja"
- DEPS_INSTALL_PREFIX=$HOME/deps
matrix:
- TRAVIS_BUILD_TYPE="Release"
- TRAVIS_BUILD_TYPE="Debug"
matrix:
include:
- os: osx
osx_image: xcode9.3
env:
- TRAVIS_CMAKE_GENERATOR="Xcode"
- TRAVIS_BUILD_TYPE="Release"
before_install:
- >-
if [ "$TRAVIS_OS_NAME" == "osx" ] ; then
brew install ccache
export PATH="/usr/local/opt/ccache/libexec:$PATH"
brew install eigen ace tinyxml gsl || travis_terminate 1
fi
install:
# Install dependencies
# --------------------
# Limit concurrency for some project in order to avoid let the CI fail
- if [ "$TRAVIS_OS_NAME" == "linux" ] ; then CMAKE_BUILD_OPTIONS="-- -j4" ; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] ; then CMAKE_BUILD_OPTIONS="" ; fi
- mkdir $HOME/git
#- export CXXFLAGS="-Wno-unused-command-line-argument"
- export PATH=$PATH:$DEPS_INSTALL_PREFIX/bin
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DEPS_INSTALL_PREFIX/lib
- export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$DEPS_INSTALL_PREFIX
# Install YCM
- cd $HOME/git
- git clone --depth 1 https://github.com/robotology/ycm.git
- cd ycm
- mkdir build && cd build
- >-
cmake .. \
-G"$TRAVIS_CMAKE_GENERATOR" \
-DCMAKE_INSTALL_PREFIX=$DEPS_INSTALL_PREFIX
- cmake --build . --target install
# Install Yarp
- cd $HOME/git
- git clone --depth 1 https://github.com/robotology/yarp.git
- cd yarp
- mkdir build && cd build
- >-
cmake .. \
-G"$TRAVIS_CMAKE_GENERATOR" \
-DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$DEPS_INSTALL_PREFIX \
-DCREATE_LIB_MATH=ON
- cmake --build . --config $TRAVIS_BUILD_TYPE --target install
# Install icub-main
- cd $HOME/git
- git clone --depth 1 https://github.com/robotology/icub-main.git
- cd icub-main
- mkdir build && cd build
- >-
cmake .. \
-G"$TRAVIS_CMAKE_GENERATOR" \
-DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$DEPS_INSTALL_PREFIX
- cmake --build . --config $TRAVIS_BUILD_TYPE --target install $CMAKE_BUILD_OPTIONS
# Install iDynTree
- cd $HOME/git
- git clone --depth 1 https://github.com/robotology/idyntree.git
- cd idyntree
- mkdir build && cd build
- >-
cmake .. \
-G"$TRAVIS_CMAKE_GENERATOR" \
-DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$DEPS_INSTALL_PREFIX
- cmake --build . --config $TRAVIS_BUILD_TYPE --target install $CMAKE_BUILD_OPTIONS
# Install qpOASES
- cd $HOME/git
- git clone --depth 1 https://github.com/robotology-dependencies/qpOASES.git
- cd qpOASES
- mkdir build && cd build
- >-
cmake .. \
-G"$TRAVIS_CMAKE_GENERATOR" \
-DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$DEPS_INSTALL_PREFIX
- cmake --build . --config $TRAVIS_BUILD_TYPE --target install
# Install wb-toolbox
- cd $HOME/git
- git clone --depth 1 https://github.com/robotology/wb-toolbox.git
- cd wb-toolbox
- mkdir build && cd build
- >-
cmake .. \
-G"$TRAVIS_CMAKE_GENERATOR" \
-DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$DEPS_INSTALL_PREFIX
- cmake --build . --config $TRAVIS_BUILD_TYPE --target install
# Install simulink-coder-runtime
- cd $HOME/git
- git clone --depth 1 https://oauth2:${LOC2BOT_CLONE_TOKEN}@github.com/loc2/simulink-coder-runtime.git
- cd simulink-coder-runtime
- mkdir build && cd build
- >-
cmake .. \
-G"$TRAVIS_CMAKE_GENERATOR" \
-DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$DEPS_INSTALL_PREFIX
- cmake --build . --config $TRAVIS_BUILD_TYPE --target install
script:
- cd $TRAVIS_BUILD_DIR
- mkdir build && cd build
- cmake -G"$TRAVIS_CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE ..
- cmake --build . --config $TRAVIS_BUILD_TYPE
after_script:
- cd $TRAVIS_BUILD_DIR/build
- cmake --build . --config $TRAVIS_BUILD_TYPE --target install