-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
133 lines (118 loc) · 4.48 KB
/
.gitlab-ci.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
image: jgillis/meco_build
#pma-rob-dbs.mech.kuleuven.be/meco/meco
stages:
- tests
- binaries
variables:
CI_PROJECT_NAME: cpp_splines
DEBIAN_BINARIES: /Dropbox/meco_binaries_debian
WINDOWS_BINARIES: /Dropbox/meco_binaries_windows
BINARIES: meco_binaries_${BUILD_OS}
MATLABPATH: $DEBIAN_BINARIES
PYTHONPATH: $PYTHONPATH:$DEBIAN_BINARIES
MOSEKLM_LICENSE_FILE: /repo/mosek/8/mosek.lic
before_script:
- source env.sh
- rclone sync dropbox:meco_binaries_debian/$SWIG_HOME_REL $SWIG_HOME
- rclone sync --include meco_binaries.* dropbox:$BINARIES $DEBIAN_BINARIES
- chmod +x $SWIG_HOME/bin/swig
- set -e
- mkdir build
- echo $CASADI_PREFIX
after_script:
- source env.sh
- set -e
- pushd build
- export TARGET=meco_binaries_${BUILD_OS}/${BUILD_LANG}/${CI_PROJECT_NAME}/$CI_BUILD_REF_NAME
- TZ=CET touch swig/build_`date -Iseconds`.log
- rm -rf swig/*.pyc swig/CMakeFiles
- echo $TARGET
- rclone delete dropbox:$TARGET
- rclone --transfers 2 sync swig/ dropbox:$TARGET --exclude CMakeFiles || rclone sync swig/ dropbox:$TARGET --exclude CMakeFiles || rclone sync swig/ dropbox:$TARGET --exclude CMakeFiles
coverage:
stage: tests
variables:
BUILD_OS: debian
BUILD_LANG: python27
script:
- set -e
- rclone sync dropbox:$BINARIES/$CASADI_PREFIX_REL $CASADI_PREFIX
- pushd build
- cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_MATLAB=OFF ..
- make VERBOSE=1
- ctest -V -R python_test
- gcovr -e ".*wrap.cxx" -r ..
after_script:
- echo 123
debian-matlab:
stage: binaries
variables:
BUILD_OS: debian
MATLABRELEASE: R2014a
BUILD_LANG: matlab$MATLABRELEASE
script:
- set -e
- rclone sync dropbox:$BINARIES/$CASADI_PREFIX_REL $CASADI_PREFIX
- export MATLAB_ROOT=/repo/matlabR2014a
- pushd build
- cmake -DWITH_COVERAGE=ON -DWITH_PYTHON=OFF ..
- make VERBOSE=1
- cp src/*.so swig
- export PATH=$PATH:$MATLAB_ROOT/bin/
- ctest -V -R matlab
debian-python:
stage: binaries
variables:
BUILD_OS: debian
BUILD_LANG: python27
script:
- set -e
- rclone sync dropbox:$BINARIES/$CASADI_PREFIX_REL $CASADI_PREFIX
- pushd build
- cmake -DWITH_MATLAB=OFF ..
- make VERBOSE=1
- cp src/*.so swig
- ctest -V -R python
- ctest -V -R valgrind
windows-matlab:
stage: binaries
variables:
BUILD_OS: windows
MATLABRELEASE: R2014a
BUILD_LANG: matlab$MATLABRELEASE
script:
- set -e
- export CASADI_PREFIX_REL=$BUILD_LANG/casadi/$CASADIVERSION/
- export CASADI_PREFIX=$WINDOWS_BINARIES/$CASADI_PREFIX_REL
- rclone sync dropbox:$BINARIES/$CASADI_PREFIX_REL $CASADI_PREFIX
- export MATLAB_ROOT=/repo/matlabR2014a-win
- pushd build
- cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain64.cmake -DWITH_PYTHON=OFF ..
- make VERBOSE=1
- cp src/*.dll swig
windows-python:
stage: binaries
variables:
BUILD_OS: windows
BUILD_LANG: python27
script:
- set -e
- export NUMPYSUFFIX=win32
- export CASADI_PREFIX_REL=$BUILD_LANG/casadi/$CASADIVERSION
- export CASADI_PREFIX=$WINDOWS_BINARIES/$CASADI_PREFIX_REL
- rclone sync dropbox:$BINARIES/$CASADI_PREFIX_REL $CASADI_PREFIX
- echo "find_library(PYTHON_LIBRARY NAMES python27 PATHS $HOME/.wine/drive_c/Python27/libs NO_SYSTEM_ENVIRONMENT_PATH)" > tmp.txt
- echo "find_path(PYTHON_INCLUDE_DIR NAMES Python.h PATHS $HOME/.wine/drive_c/Python27/include NO_SYSTEM_ENVIRONMENT_PATH)" >> tmp.txt
- echo "set(PYTHON_EXECUTABLE $HOME/.wine/drive_c/Python27/python.exe)" >> tmp.txt
- echo "set(NUMPY_INCLUDE_DIR $HOME/.wine/drive_c/Python27/Lib/site-packages/numpy-1.9.1-py2.7-$NUMPYSUFFIX.egg/numpy/core/include)" >> tmp.txt
- echo "set(NUMPY_INCLUDED_DIRS $HOME/.wine/drive_c/Python27/Lib/site-packages/numpy-1.9.1-py2.7-$NUMPYSUFFIX.egg/numpy/core/include/numpy)" >> tmp.txt
- echo "set(NUMPY_PATH $HOME/.wine/drive_c/Python27/Lib/site-packages/numpy-1.9.1-py2.7-$NUMPYSUFFIX.egg/numpy/core/include/numpy)" >> tmp.txt
- cat swig/CMakeLists.txt >> tmp.txt
- mv tmp.txt swig/CMakeLists.txt
- which swig
- mkdir -p swig/python && pushd swig && swig -I$SWIG_LIB/python -co pyrun.swg && sed -i -e 's/\"SwigPyObject\"/\"SwigPyCasadiObject\"/g' pyrun.swg && popd
- pushd build
- cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain32.cmake -DWITH_MATLAB=OFF ..
- make VERBOSE=1
- cp src/*.dll swig
- sed -i -e "s/'SwigPyObject'/'SwigPyCasadiObject'/g" swig/splines.py