-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
153 lines (137 loc) · 4.76 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
variables:
BOOST_VERSION: 1.80.0
SOPLEX_REVISION: bugfix-71
VIPR_REVISION: master
SCIP_REVISION: v91-bugfix
SCIPEXACT_REVISION: exact-rational
SETUP_DIR: ${CI_PROJECT_DIR}/setups
INSTALL_DIR: ${CI_PROJECT_DIR}/../installs
BUILD_DIR: ${CI_PROJECT_DIR}/builds
BOOST_DIR: ${SETUP_DIR}/boost
SOPLEX_DIR: ${SETUP_DIR}/soplex
VIPR_DIR: ${SETUP_DIR}/vipr
SCIP_DIR: ${SETUP_DIR}/scip
stages:
- setup
- build
.common:
rules:
- if: $CI_MERGE_REQUEST_TITLE =~ /^Draft:/
when: manual
- if: $CI_MERGE_REQUEST_ID
image:
name: gcc:10
before_script:
- apt-get update
- apt-get install -y cmake libtbb-dev libmpfr-dev
- export CFLAGS="-Werror"
- export CXXFLAGS="-Werror"
- export LD_LIBRARY_PATH=${INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
- export BOOST_ROOT=${INSTALL_DIR}
- mkdir -p ${CI_PROJECT_DIR}/installs
- mv ${CI_PROJECT_DIR}/installs ${INSTALL_DIR}
after_script:
- mv ${INSTALL_DIR} ${CI_PROJECT_DIR}/installs
boost-soplex-scip:
extends: .common
stage: setup
artifacts:
paths:
- ${CI_PROJECT_DIR}/installs
expire_in: 1 minute
script:
- mkdir -p ${SETUP_DIR}
- export CFLAGS=""
- export CXXFLAGS=""
# boost
- wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_$(echo ${BOOST_VERSION} | tr . _).tar.gz -O ${BOOST_DIR}.tar.gz
- mkdir -p ${BOOST_DIR}
- tar -xzf ${BOOST_DIR}.tar.gz -C ${BOOST_DIR} --strip-components=1
- cd ${BOOST_DIR}
- ./bootstrap.sh --prefix=${INSTALL_DIR} --with-libraries=program_options,serialization,iostreams,regex
- ./b2 --prefix=${INSTALL_DIR} -j4 install
# soplex
- git clone https://github.com/scipopt/soplex.git ${SOPLEX_DIR}
- cd ${SOPLEX_DIR}
- git checkout ${SOPLEX_REVISION}
- cmake . -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}
- make -j4
- make install
# vipr
- git clone https://github.com/ambros-gleixner/VIPR.git ${VIPR_DIR}
- cd ${VIPR_DIR}/code
- git checkout ${VIPR_REVISION}
- cmake .
- make -j4
- export PATH=${VIPR_DIR}/code:${PATH}
# scip
- git clone https://github.com/scipopt/scip.git ${SCIP_DIR}
- mkdir ${SCIP_DIR}/build
- cd ${SCIP_DIR}/build
- git checkout ${SCIP_REVISION}
- cmake .. -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/default -DCRITERION=off -DREADLINE=off -DZIMPL=off -DPAPILO=off -DIPOPT=off
- make -j4
- make install
# scipexact
- git checkout ${SCIPEXACT_REVISION}
- cmake .. -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/exact -DCRITERION=off -DREADLINE=off -DZIMPL=off -DPAPILO=off -DIPOPT=off
- make -j4
- make install
.test:
extends: .common
stage: build
dependencies: [boost-soplex-scip]
script:
- mkdir -p ${BUILD_DIR}/${CI_JOB_NAME}
- cd ${BUILD_DIR}/${CI_JOB_NAME}
- cmake ${CI_PROJECT_DIR} ${CMAKE_FLAGS}
- make -j4
- bin/bugger --help
soplex_double_debug:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Debug -DBUGGER_ARITHMETIC=d -DSOPLEX=on -DSOPLEX_DIR=${INSTALL_DIR}"
soplex_double_optimized:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Release -DBUGGER_ARITHMETIC=d -DSOPLEX=on -DSOPLEX_DIR=${INSTALL_DIR}"
soplex_rational_debug:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Debug -DBUGGER_ARITHMETIC=r -DSOPLEX=on -DSOPLEX_DIR=${INSTALL_DIR}"
soplex_rational_optimized:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Release -DBUGGER_ARITHMETIC=r -DSOPLEX=on -DSOPLEX_DIR=${INSTALL_DIR}"
scip_double_debug:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Debug -DBUGGER_ARITHMETIC=d -DSCIP=on -DSCIP_DIR=${INSTALL_DIR}/default"
scip_double_optimized:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Release -DBUGGER_ARITHMETIC=d -DSCIP=on -DSCIP_DIR=${INSTALL_DIR}/default"
scip_rational_debug:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Debug -DBUGGER_ARITHMETIC=r -DSCIP=on -DSCIP_DIR=${INSTALL_DIR}/default"
scip_rational_optimized:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Release -DBUGGER_ARITHMETIC=r -DSCIP=on -DSCIP_DIR=${INSTALL_DIR}/default"
scipexact_double_debug:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Debug -DBUGGER_ARITHMETIC=d -DSCIP=on -DSCIP_DIR=${INSTALL_DIR}/exact"
scipexact_double_optimized:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Release -DBUGGER_ARITHMETIC=d -DSCIP=on -DSCIP_DIR=${INSTALL_DIR}/exact"
scipexact_rational_debug:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Debug -DBUGGER_ARITHMETIC=r -DSCIP=on -DSCIP_DIR=${INSTALL_DIR}/exact"
scipexact_rational_optimized:
extends: .test
variables:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Release -DBUGGER_ARITHMETIC=r -DSCIP=on -DSCIP_DIR=${INSTALL_DIR}/exact"