forked from e0404/matRad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
63 lines (54 loc) · 2.07 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
language: c++
before_install:
- sudo chmod +x runtests.sh
- sudo apt-get update -qq
- sudo apt-get install gdb # to capture backtrace of eventual failures
# - sudo apt-get purge libopenblas-base # fixes PPA Octave 4.0 crash on Travis
# add PPA repo to use latest GNU Octave release
- sudo add-apt-repository ppa:octave/stable --yes
- sudo apt-get update --yes --force-yes
# dependencies
- sudo apt-get install octave --yes --force-yes
- sudo apt-get install liboctave-dev --yes --force-yes
- sudo apt-get install git --yes --force-yes
- export MATRAD=`pwd`
# IpOpt in Ubuntu repo is too old
#sudo apt-get install coinor-libipopt-dev --yes --force-yes
# Compiling IpOpt
- cd ..
- mkdir IpoptMUMPS
- cd IpoptMUMPS
- wget https://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.10.tgz
- tar -zxvf Ipopt-3.12.10.tgz
- cd Ipopt-3.12.10/
- export IPOPTDIR=`pwd`
- cd $IPOPTDIR/ThirdParty/Blas
- ./get.Blas
- cd $IPOPTDIR/ThirdParty/Lapack
- ./get.Lapack
- cd $IPOPTDIR/ThirdParty/Metis
- ./get.Metis
- cd $IPOPTDIR/ThirdParty/Mumps
- ./get.Mumps
- mkdir $IPOPTDIR/build
- cd $IPOPTDIR/build
- $IPOPTDIR/configure --prefix=/usr/local
- sudo make
- sudo make test
- sudo make install
- sudo ldconfig
# clone repository with IpOpt Interface
- git clone https://github.com/ebertolazzi/mexIPOPT
# compile interface
- mkoctfile --mex -ImexIPOPT/src -I/usr/local/include/coin mexIPOPT/src/ipopt.cc mexIPOPT/src/IpoptInterfaceCommon.cc -v -DMATLAB_MEXFILE -DHAVE_CSTDDEF -DIPOPT_INTERFACE_MISSING_COPY_N -Wl,--no-undefined -lipopt -lcoinmumps -lcoinlapack -lcoinblas -L/usr/local/lib -std=gnu++11
- sudo cp ipopt* $MATRAD/optimization
- cd $MATRAD
before_script:
- ulimit -c unlimited -S # enable core dumps for Octave crash debugging
script:
- travis_wait 45 ./runtests.sh /usr/bin/octave
after_failure:
- COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) # find core file
- gdb -c "$COREFILE" -ex "thread apply all bt" -ex "set pagination 0" -batch /usr/bin/octave-cli # print stack trace
- tail runtests.log
# - tail runtests.err