forked from casadi/casadi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
350 lines (330 loc) · 16 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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# Inspiration: https://github.com/edx/configuration/blob/master/.travis.yml
env:
global:
- IPOPT_DEFAULT_LINEAR_SOLVER=ma57
- MOSEKLM_LICENSE_FILE=/home/travis/build/testbot/restricted/mosek.lic
- secure: KvMG4VORV7Ja09shvmsMpiaRMoWqupR76dKxOd7W28I//F4YDIn5ZZefM4aoXsmRgs4G9YqloU8JjVpHutZARmKn2drUwHVMA+96iKb9eDODwZaKXgFYsrQIX5c/OgO8ZpsXynD2daqH3bMK8Mjz1+4fjbFToPFXHggxqQuHm1U=
- SNOPT=/home/travis/build/snopt75
- MATLABPATH=/home/travis/build/matlab-install/matlab
- MATLAB_ROOT=/home/travis/build/matlab
- MATLABRELEASE=R2014a
- SLURP_OS=trusty
- PYTHONPATH=/usr/local/python
before_script:
- set -e
- set -o pipefail # otherwise, piping with grep discards exit statuses
matrix:
include:
- compiler: gcc
os: linux
dist: trusty
language: generic
env: TESTMODE=valgrind
script:
- sudo apt-get install valgrind libgomp1 -y
- mkdir build
- pushd build
- cmake -DWITH_OPENMP=ON $casadi_build_flags -DWITH_PROFILING=ON -DWITH_DOC=ON -DWITH_EXAMPLES=ON -DWITH_COVERAGE=ON -DWITH_EXTRA_WARNINGS=ON -DWITH_PYTHON=ON -DWITH_JSON=ON -DWITH_BLASFEO=ON -DWITH_BUILD_BLASFEO=ON -DWITH_HPMPC=ON -DWITH_BUILD_HPMPC=ON ..
- make -j2
- sudo make -j2 install
- popd
- python -c "from casadi.tools import *;loadAllCompiledPlugins()"
- pushd test && make unittests_py_valgrind && popd
after_success:
- cd build
- git clone https://github.com/jgillis/cpp-coveralls.git
- pushd cpp-coveralls && sudo python setup.py install && popd
- coveralls --root .. --exclude swig -E '.*cxx' -E '.*CMakeFiles.*' -E '.*casadiPYTHON_wrap.*' -E '.*lib.*' -E '.*_export.*' --exclude experimental --exclude _temp.cc --exclude docs --exclude codegen --exclude external_packages --exclude cmake --exclude test --gcov-options '\-lp'
- compiler: clang
os: linux
dist: trusty
language: generic
env: TESTMODE=valgrind
script:
- sudo apt-get install valgrind libgomp1 -y
- mkdir build
- pushd build
- cmake -DWITH_OPENMP=ON $casadi_build_flags -DWITH_PROFILING=ON -DWITH_DOC=ON -DWITH_EXAMPLES=ON -DWITH_COVERAGE=ON -DWITH_EXTRA_WARNINGS=ON -DWITH_PYTHON=ON -DWITH_JSON=ON -DWITH_BLASFEO=ON -DWITH_BUILD_BLASFEO=ON -DWITH_HPMPC=ON -DWITH_BUILD_HPMPC=ON ..
- make -j2
- sudo make -j2 install
- popd
- python -c "from casadi.tools import *;loadAllCompiledPlugins()"
- pushd test && make unittests_py_valgrind && popd
after_success:
- cd build
- git clone https://github.com/jgillis/cpp-coveralls.git
- pushd cpp-coveralls && sudo python setup.py install && popd
- coveralls --root .. --exclude swig -E '.*cxx' -E '.*CMakeFiles.*' -E '.*casadiPYTHON_wrap.*' -E '.*lib.*' -E '.*_export.*' --exclude experimental --exclude _temp.cc --exclude docs --exclude codegen --exclude external_packages --exclude cmake --exclude test --gcov-options '\-lp'
- compiler: gcc
os: linux
dist: trusty
language: generic
env: TESTMODE=full
script:
- sudo apt-get install valgrind libgomp1 -y
- mkdir build
- pushd build
- cmake -DWITH_OPENMP=ON $casadi_build_flags -DWITH_SLICOT=OFF -DWITH_PROFILING=ON -DWITH_DOC=ON -DWITH_EXAMPLES=ON -DWITH_COVERAGE=ON -DWITH_EXTRA_WARNINGS=ON -DWITH_PYTHON=ON -DWITH_JSON=ON -DWITH_BLASFEO=ON -DWITH_BUILD_BLASFEO=ON -DWITH_HPMPC=ON -DWITH_BUILD_HPMPC=ON ..
- make -j2
- sudo make -j2 install
- popd
- sudo apt-get install python-ipdb graphviz python-lxml texlive-science texlive-latex-base texlive-latex-recommended texlive-latex-extra -y
- sudo pip install pydot2
# travis-wait seems to stop at 20 mins, regardless if output is being generated
- (while true ; do sleep 60 ; echo "ping" ; done ) &
- pushd test && make trunktesterbot_no_unittests_py && popd
- pushd test && make unittests_py_slow && popd
- pushd build && make json && popd
after_success:
- cd build
- git clone https://github.com/jgillis/cpp-coveralls.git
- pushd cpp-coveralls && sudo python setup.py install && popd
- coveralls --verbose --root .. --exclude swig -E '.*cxx' -E '.*CMakeFiles.*' -E '.*casadiPYTHON_wrap.*' -E '.*lib.*' -E '.*_export.*' --exclude experimental --exclude _temp.cc --exclude docs --exclude codegen --exclude external_packages --exclude cmake --exclude test --gcov-options '\-lp'
- compiler: gcc
os: linux
dist: trusty
language: generic
env:
- TESTMODE=full-py3
- WITH_PYTHON3=ON
script:
- sudo apt-get install cmake valgrind libgomp1 python3-dev python3-numpy python3-scipy python3-matplotlib python3-setuptools -y
- sudo easy_install3 pip==7.1.2
- mkdir build
- pushd build
- cmake --version
- python3 --version
- cmake -DWITH_OPENMP=OFF $casadi_build_flags -DWITH_SLICOT=OFF -DCMAKE_BUILD_TYPE=Debug -DWITH_PROFILING=ON -DWITH_DOC=ON -DWITH_EXAMPLES=ON -DWITH_EXTRA_WARNINGS=ON -DWITH_PYTHON=ON -DWITH_PYTHON3=ON -DWITH_JSON=ON ..
- make -j2
- sudo make -j2 install
- popd
- python3 -c "from casadi.tools import *;loadAllCompiledPlugins()"
#- (while true ; do sleep 60 ; echo "ping" ; done ) &
#- source /home/travis/build/testbot/restricted/env.sh
#- ssh-keyscan $GATE_SERVER >> ~/.ssh/known_hosts
#- whoami
#- echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3mEl1i8wiojyJdJnwrmC3RTWCIGgUM4lmtWNWu4p4QyiBry2iB7y2qno48pZqkV/EFRsyWWeEDvbdA4etYlceKZaGJFAdqJig/247qPbamU5W5++d7zkGwA5nQDH147/+JMYk4na9RoGl2iOHMyxi7Wq0WkN11u0Slp2awluvV9UXpBl/XD74eYmUfOFop6y+Hkg/K2hyytg8vAkp33x/vy8JxSK93vbnLGsrVOVjp6Epf7Jo2C8ZHX9eVL2sfi7icjNbt6s9AnU076tBURBIEQbg+Sa8nK7v6zzJNZbn9G85t0M64BKMvcRH1BXf0VvIeBQs/yv9uZLaC9SFvj+4Q== [email protected]" >> ~/.ssh/authorized_keys
#- ssh -i /home/travis/build/testbot/id_rsa_travis $USER_GATE@$GATE_SERVER -R 19922:localhost:22 -N
#- pushd test && make unittests_py_valgrind && popd
- sudo apt-get install graphviz python3-lxml texlive-science texlive-latex-base texlive-latex-recommended texlive-latex-extra -y
- sudo pip3 install pydot3
# travis-wait seems to stop at 20 mins, regardless if output is being generated
- (while true ; do sleep 60 ; echo "ping" ; done ) &
#- pushd test && make trunktesterbot_no_unittests_py && popd
#- pushd test && make unittests_py_slow && popd
#- pushd build && make json && popd
- pushd test && make unittests_py && popd
- pushd test && make unittests_py_slow && popd
- pushd test && make examples_code_py && popd
- pushd test && make user_guide_snippets_py && popd
- pushd test && make examples_indoc_py && popd
- compiler: gcc
os: linux
dist: trusty
language: generic
env: TESTMODE=docs
script:
- set -e
- mkdir build
- pushd build
- cmake $casadi_build_flags -DWITH_SLICOT=OFF -DWITH_JSON=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_PROFILING=ON -DWITH_DOC=ON -DWITH_EXAMPLES=ON -DWITH_COVERAGE=ON -DWITH_EXTRA_WARNINGS=ON -DWITH_PYTHON=ON ..
- make -j2
- sudo make -j2 install
- popd
- sudo pip install texttable
- sudo pip install pydot2
- sudo apt-get install graphviz python-lxml python-ipdb python-docutils doxygen -y
- pushd docs/api && make doxexport_old | grep -v "file loc from" && popd
# Let's verify that we can still compile
- pushd build && make && sudo make -j2 install && make json && popd
- python -c "import doctest;import casadi;assert doctest.testmod(casadi.casadi,verbose=True).failed==0"
- |
if [[ $TRAVIS_BRANCH == *develop* || $TRAVIS_BRANCH == *release* ]]
then
git stash && git checkout $TRAVIS_BRANCH && git pull origin $TRAVIS_BRANCH && git stash pop || allowfail 1 && test $(git status --porcelain | grep UU | wc -c) -eq 0 && sh /home/travis/build/testbot/helpers/acommit.sh "automatic documentation update" && git push [email protected]:casadi/casadi.git $TRAVIS_BRANCH
fi
- compiler: clang
os: linux
dist: trusty
language: generic
env: TESTMODE=minimal
script:
- mkdir build
- pushd build
- cmake $casadi_build_flags -DWITH_SLICOT=OFF -DWITH_PYTHON=ON -DWITH_JSON=ON ..
- make
- sudo make install
- popd
- python -c "from casadi.tools import *;loadAllCompiledPlugins()"
- pushd test && make unittests_py examples_code_py && popd
- compiler: gcc
os: linux
dist: trusty
language: generic
env: TESTMODE=minimal
script:
- mkdir build
- pushd build
- cmake $casadi_build_flags -DWITH_SLICOT=OFF -DWITH_DEPRECATED_FEATURES=OFF -DWITH_PYTHON=ON -DWITH_JSON=ON ..
- make
- sudo make install
- popd
- python -c "from casadi.tools import *;loadAllCompiledPlugins()"
- pushd test && make unittests_py examples_code_py && popd
- compiler: gcc
os: linux
dist: trusty
language: generic
env: TESTMODE=minimal
script:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get install gcc-6 g++-6
- export CC=gcc-6
- export CXX=g++-6
- mkdir build
- pushd build
- cmake $casadi_build_flags -DWITH_SLICOT=OFF -DWITH_ERROR=ON -DWITH_EXTRA_WARNINGS=ON -DWITH_DEPRECATED_FEATURES=OFF -DWITH_PYTHON=ON -DWITH_JSON=ON ..
- make
- sudo make install
- popd
- python -c "from casadi.tools import *;loadAllCompiledPlugins()"
- pushd test && make unittests_py examples_code_py && popd
- compiler: gcc
os: linux
dist: trusty
language: generic
env: TESTMODE=quick
script:
- sudo add-apt-repository ppa:webupd8team/java -y
- sudo apt-get update -qq
#- sudo echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
- sudo apt-get install python-pyparsing libhunspell-dev default-jdk -y
- sudo pip install hunspell
- wget https://www.languagetool.org/download/LanguageTool-2.7.zip
- unzip LanguageTool-2.7.zip
- mypwd=`pwd`
- export languagetool="$mypwd/LanguageTool-2.7"
- mkdir build
- pushd build
- cmake $casadi_build_flags -DWITH_SLICOT=OFF -DWITH_WERROR=ON -DWITH_EXTRA_WARNINGS=ON -DWITH_SPELL=ON -DWITH_LINT=ON ..
- make lint
- export languagetool="$mypwd/LanguageTool-2.7" make spell
- popd && pushd misc && python autogencode.py && popd
- sh /home/travis/build/testbot/helpers/acommit.sh "automatic code generation"
- git pull
- git config --global push.default simple
- git remote set-url origin [email protected]:casadi/casadi.git
- ssh-agent bash -c 'ssh-add /home/travis/build/testbot/id_rsa_travis; git push origin HEAD:$TRAVIS_BRANCH'
after_success:
- cd /home/travis/build/
- git clone [email protected]:casadi/binaries.git
- pushd binaries && git checkout run && git submodule init && git submodule update || allowfail 1 && popd
- pushd binaries/casadi && git checkout $TRAVIS_COMMIT && popd
- |
if ! [[ $TRAVIS_BRANCH == *test* ]]
then
#if ! [[ $TRAVIS_BRANCH == develop ]]
#then
pushd binaries && git commit -a -m "automatic runner commit $TRAVIS_COMMIT" && git push origin run && popd
#fi
fi
- os: osx
env: TESTMODE=minimal SLURP_OS=osx
compiler: clang
before_install:
- shell_session_update() { :; } # Workaround for travis-ci/travis-ci#6522
- brew update
- brew tap homebrew/science
- brew outdated swig ; brew install swig
#- brew outdated pkg-config || brew install pkg-config
#- brew doctor
- sudo easy_install pip
- sudo pip install matplotlib numpy scipy
script:
- mkdir build
- pushd build
- cmake $casadi_build_flags -DWITH_SLICOT=OFF -DWITH_PYTHON=ON -DWITH_JSON=ON ..
- make VERBOSE=1
- sudo make install
- popd
- python -c "from casadi.tools import *;loadAllCompiledPlugins()"
- pushd test && make unittests_py && popd
- compiler: gcc
os: linux
dist: trusty
language: generic
env: NEEDMATLAB=1
script:
- sudo apt-get install -y gcc-4.7 g++-4.7 gfortran-4.7
- export CC=gcc-4.7
- export CXX=g++-4.7
# travis-wait seems to stop at 20 mins, regardless if output is being generated
- (while true ; do sleep 60 ; echo "ping" ; done ) &
- swig -version
- pushd /home/travis/build/
- testbot/recipes/fetch.sh matlab$MATLABRELEASE.tar.gz
- mkdir matlab && tar -xf matlab$MATLABRELEASE.tar.gz -C matlab
- popd
- mkdir build
- pushd build
- cmake $casadi_build_flags -DWITH_SLICOT=OFF -DCMAKE_INSTALL_PREFIX=/home/travis/build/matlab-install -DWITH_DEEPBIND=ON -DWITH_MATLAB=ON -DWITH_PROFILING=ON -DWITH_DOC=ON -DWITH_EXAMPLES=ON -DWITH_COVERAGE=ON -DWITH_EXTRA_WARNINGS=ON -DWITH_JSON=ON ..
- make -j2 VERBOSE=1
- sudo make -j2 install
- popd
- matlabtunnel
- pushd test && PATH=/home/travis/build/matlab/bin/:$PATH make matlab && popd
- compiler: gcc
os: linux
dist: trusty
language: generic
env: NEEDMATLAB=1
script:
- sudo apt-add-repository ppa:octave/stable -y
- sudo apt-get update -qq
- sudo apt-get install octave liboctave-dev -y
- sudo apt-get install -y xvfb
- sudo apt-get install -y libgl1-mesa-dri
# travis-wait seems to stop at 20 mins, regardless if output is being generated
- (while true ; do sleep 60 ; echo "ping" ; done ) &
- mkdir build
- pushd build
- cmake $casadi_build_flags -DWITH_SLICOT=OFF -DCMAKE_INSTALL_PREFIX=/home/travis/build/octave-install -DWITH_DEEPBIND=ON -DWITH_OCTAVE=ON -DWITH_OCTAVE_IMPORT=ON -DWITH_PROFILING=ON -DWITH_DOC=ON -DWITH_EXAMPLES=ON -DWITH_COVERAGE=ON -DWITH_EXTRA_WARNINGS=ON -DWITH_JSON=ON ..
- make -j2
- sudo make -j2 install
- popd
- Xvfb :1 &
- export DISPLAY=:1
- octave --no-gui --no-window-system --eval "addpath('/home/travis/build/octave-install/matlab');savepath;"
- pushd test && make octave && popd
branches:
except:
- /.*appveyor.*/
before_install:
- export casadi_build_flags="-DWITH_COMMON=ON "
- pushd ../../ && git clone https://github.com/casadi/testbot.git
- pushd testbot && git checkout merged && source recipes/setup.sh && popd
- sudo apt-get install p7zip-full -y
- |
if [ $NEEDMATLAB ]
then
export SLURP_GCC=4.7
slurp swig_matlab
else
slurp swig
fi
- slurp hsl
- slurp clang
- travis_retry testbot/recipes/fetch.sh mosek7.tar.bz2 && tar -xf mosek7.tar.bz2 && rm mosek7.tar.bz2
- slurp ecos
- travis_retry testbot/recipes/fetch.sh snopt75.tar.gz && mkdir snopt75 && tar -xf snopt75.tar.gz -C snopt75 && rm snopt75.tar.gz
- slurp cplex
- slurp bonmin
- slurp ipopt
- slurp worhp
- popd
- sudo apt-get update -qq
- sudo apt-get install -q -y binutils gcc g++ gfortran git cmake liblapack-dev liblapack3 libblas3 ipython python-dev python-numpy python-scipy python-matplotlib coinor-libipopt-dev libmumps-seq-dev libxml2-dev
- sudo pip install github3.py
after_failure:
- pushd /home/travis/build/testbot/ && python -c "from github3 import login;from testbotcredentials import TestBotCredentials;tbc = TestBotCredentials();login(*tbc.github).repository('casadi','casadi').create_comment(sha='$TRAVIS_COMMIT',body='Failure reported by [travis](https://travis-ci.org/casadi/casadi/jobs/$TRAVIS_JOB_ID) in $TRAVIS_COMMIT_RANGE -- $TRAVIS_TEST_RESULT')" && popd