forked from casadi/casadi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
218 lines (207 loc) · 12.2 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
# Inspiration: https://github.com/edx/configuration/blob/master/.travis.yml
env:
global:
- IPOPT_DEFAULT_LINEAR_SOLVER=ma57
- LD_LIBRARY_PATH=/home/travis/build/libhsl
- ECOS=/home/travis/build/ecos
- MOSEK=/home/travis/build/mosek
- MOSEKLM_LICENSE_FILE=/home/travis/build/testbot/restricted/mosek.lic
- secure: KvMG4VORV7Ja09shvmsMpiaRMoWqupR76dKxOd7W28I//F4YDIn5ZZefM4aoXsmRgs4G9YqloU8JjVpHutZARmKn2drUwHVMA+96iKb9eDODwZaKXgFYsrQIX5c/OgO8ZpsXynD2daqH3bMK8Mjz1+4fjbFToPFXHggxqQuHm1U=
- CMAKE_INCLUDE_PATH=/home/travis/build/testbot/restricted/cplex/cplex/include:/home/travis/build/testbot/restricted/cplex/concert/include
- CMAKE_LIBRARY_PATH=/home/travis/build/testbot/restricted/cplex/cplex/lib/x86-64_sles10_4.1/static_pic/:/home/travis/build/testbot/restricted/cplex/concert/lib/x86-64_sles10_4.1/static_pic/
- ILOG_LICENSE_FILE=/home/travis/build/testbot/restricted/cplex/access.ilm
- WORHP=/home/travis/build/testbot/restricted/worhp
- WORHP_LICENSE_FILE=/home/travis/build/testbot/restricted/worhp/unlocked.lic
- SNOPT=/home/travis/build/snopt7
- MATLABPATH=/home/travis/build/matlab-install
- MATLAB_ROOT=/home/travis/build/matlab
- MATLABRELEASE=R2014b
- CLANG=/home/travis/build/clang
before_script:
- set -e
- set -o pipefail # otherwise, piping with grep discards exit statuses
matrix:
include:
- compiler: gcc
os: linux
env: TESTMODE=full
script:
- sudo apt-get install valgrind libgomp1 -y
- mkdir build
- pushd build
- cmake -DWITH_OPENMP=ON -DOLD_LLVM=ON -DWITH_CLANG=ON -DWITH_ECOS=ON -DWITH_MOSEK=ON -DWITH_PYTHON=ON -DWITH_WORHP=ON -DWITH_SLICOT=OFF -DWITH_OOQP=ON -DWITH_PROFILING=ON -DWITH_DOC=ON -DWITH_EXAMPLES=ON -DWITH_COVERAGE=ON -DWITH_EXTRA_WARNINGS=ON -DWITH_PYTHON=ON -DWITH_JSON=ON ..
- make -j2
- sudo make -j2 install
- popd
- python -c "from casadi.tools import *;loadAllCompiledPlugins()"
- pushd test && make unittests_py_valgrind && 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
- compiler: gcc
os: linux
env: TESTMODE=docs
script:
- set -e
- mkdir build
- pushd build
- cmake -DOLD_LLVM=ON -DWITH_CLANG=ON -DWITH_JSON=ON -DWITH_ECOS=ON -DWITH_MOSEK=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_PYTHON=ON -DWITH_WORHP=ON -DWITH_SLICOT=OFF -DWITH_OOQP=ON -DWITH_PROFILING=ON -DWITH_DOC=ON -DWITH_EXAMPLES=ON -DWITH_COVERAGE=ON -DWITH_EXTRA_WARNINGS=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 | 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"
- git stash && git checkout $TRAVIS_BRANCH && git pull origin $TRAVIS_BRANCH && git stash pop || allowfail 1 && sh /home/travis/build/testbot/helpers/acommit.sh "automatic documentation update" && git push [email protected]:casadi/casadi.git $TRAVIS_BRANCH
- compiler: clang
os: linux
env: TESTMODE=minimal
script:
- mkdir build
- pushd build
- cmake -DOLD_LLVM=ON -DWITH_CLANG=ON -DWITH_ECOS=ON -DWITH_MOSEK=ON -DWITH_PYTHON=ON -DWITH_WORHP=ON -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
env: TESTMODE=minimal
script:
- mkdir build
- pushd build
- cmake -DOLD_LLVM=ON -DWITH_CLANG=ON -DWITH_DEPRECATED_FEATURES=OFF -DWITH_ECOS=ON -DWITH_MOSEK=ON -DWITH_PYTHON=ON -DWITH_WORHP=ON -DWITH_SLICOT=OFF -DWITH_PYTHON=ON -DWITH_JSON=ON ..
- make
- sudo make install
- popd
- python -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 examples_code_py && popd
- compiler: gcc
os: linux
env: TESTMODE=quick
script:
- 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 oracle-java7-installer -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 -DOLD_LLVM=ON -DWITH_CLANG=ON -DWITH_ECOS=ON -DWITH_MOSEK=ON -DWITH_WORHP=ON -DWITH_SLICOT=OFF -DWITH_OOQP=ON -DWITH_WERROR=ON -DWITH_EXTRA_WARNINGS=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
- pushd binaries && git commit -a -m "automatic runner commit $TRAVIS_COMMIT" && git push origin run && popd
- os: osx
env: TESTMODE=minimal
compiler: clang
before_install:
- 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 ipython matplotlib numpy scipy
script:
- mkdir build
- pushd build
- cmake -DOLD_LLVM=ON -DWITH_ECOS=ON -DWITH_MOSEK=ON -DWITH_WORHP=ON -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 && popd
- compiler: gcc
os: linux
env: NEEDMATLAB=1
script:
# travis-wait seems to stop at 20 mins, regardless if output is being generated
- (while true ; do sleep 60 ; echo "ping" ; done ) &
- 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
- PATH=/home/travis/build/swig_matlab/bin:/home/travis/build/swig_matlab/share:$PATH cmake -DOLD_LLVM=ON -DCMAKE_INSTALL_PREFIX=/home/travis/build/matlab-install -DWITH_CLANG=ON -DWITH_ECOS=ON -DWITH_MOSEK=ON -DWITH_DEEPBIND=ON -DWITH_MATLAB=ON -DWITH_WORHP=ON -DWITH_SLICOT=OFF -DWITH_OOQP=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
- source /home/travis/build/testbot/restricted/env.sh
- sudo bash -c "echo '127.0.0.1 $FLEX_SERVER' >> /etc/hosts;echo '127.0.0.1 $FLEX_HOSTNAME' >> /etc/hosts"
- sudo hostname $FLEX_HOSTNAME
- mkdir -p ~/.matlab/${MATLABRELEASE}_licenses/
- echo -e "SERVER $FLEX_SERVER ANY 1715\nUSE_SERVER" > ~/.matlab/${MATLABRELEASE}_licenses/license.lic
- ssh-keyscan $GATE_SERVER >> ~/.ssh/known_hosts
- ssh -i /home/travis/build/testbot/id_rsa_travis $USER_GATE@$GATE_SERVER -L 1701:$FLEX_SERVER:1701 -L 1719:$FLEX_SERVER:1719 -L 1718:$FLEX_SERVER:1718 -L 2015:$FLEX_SERVER:2015 -L 1815:$FLEX_SERVER:1815 -L 1715:$FLEX_SERVER:1715 -N &
- sleep 3
- pushd test && PATH=/home/travis/build/matlab/bin/:$PATH make unittests_matlab && popd
branches:
except:
- /.*appveyor.*/
before_install:
- sudo /etc/init.d/mysql stop
- sudo /etc/init.d/postgresql stop
- sync
- free -t -m
- pushd ../../ && git clone https://github.com/casadi/testbot.git
- pushd testbot && recipes/setup.sh && popd
- source testbot/shellhelpers
- sudo apt-get install p7zip-full -y
- travis_retry testbot/recipes/fetch.sh libhsl.tar.gz && mkdir libhsl && tar -xf libhsl.tar.gz -C libhsl && rm libhsl.tar.gz
- travis_retry testbot/recipes/fetch.sh clang.tar.gz && mkdir clang && tar -xf clang.tar.gz -C clang && rm clang.tar.gz
- travis_retry testbot/recipes/fetch.sh mosek7.tar.bz2 && tar -xf mosek7.tar.bz2 && rm mosek7.tar.bz2
- git clone https://github.com/embotech/ecos.git && pushd ecos && make && popd
- travis_retry testbot/recipes/fetch.sh snopt7.tar.gz && mkdir snopt7 && tar -xf snopt7.tar.gz -C snopt7 && rm snopt7.tar.gz
- mkdir -p /home/travis/build/casadi/testbot
- |
if [ $NEEDMATLAB ]
then
travis_retry testbot/recipes/fetch.sh swig_matlab.tar.gz && mkdir swig_matlab && tar -xf swig_matlab.tar.gz -C swig_matlab && rm swig_matlab.tar.gz
pushd /home/travis/build/casadi/testbot && ln -s /home/travis/build/swig_matlab swig-matlab-install && popd
else
travis_retry testbot/recipes/fetch.sh swig.tar.gz && mkdir swig && tar -xf swig.tar.gz -C swig && rm swig.tar.gz
pushd /home/travis/build/casadi/testbot && ln -s /home/travis/build/swig swig-install && popd
fi
- export PATH=/home/travis/build/swig/bin:$PATH
- pushd testbot/restricted/cplex && mkdir cplex && tar -xf cplex12.4.tar.gz -C cplex && mkdir concert && tar -xf cplex12.4-concert.tar.gz -C concert && rm cplex12.4-concert.tar.gz && popd
- pushd testbot/restricted && mkdir -p worhp && cd worhp && 7za e ../libworhp_debian7_amd64_gcc47_1.7-12970f3.7z -y && popd
- popd
- sudo add-apt-repository ppa:umn-claoit-rce/compute-packages -y
- sudo add-apt-repository ppa:nodakai/valgrind -y
- sudo add-apt-repository ppa:kedazo/doxygen-updates-precise -y
- sudo add-apt-repository ppa:webupd8team/java -y
- sudo apt-get update -qq
- sudo apt-get install -q -y binutils gcc g++ gfortran git cmake liblapack-dev ipython python-dev python-numpy python-scipy python-matplotlib coinor-libipopt-dev libmumps-seq-dev libblas-dev liblapack-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
language: cpp