-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
94 lines (89 loc) · 2.41 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
default:
image: ubuntu_coek:latest
stages:
- build
- test
- pages_plot
compile:
stage: build
tags: ["docker"]
script:
- source /root/.profile
- mkdir _build
- cd _build
- cmake
-DPython_EXECUTABLE=$PYTHON_DIR/python
-Dwith_compact=OFF
-Dwith_docs=OFF ..
- make install_tpls
#-DGUROBI_LIBRARY=$GUROBI_LIBRARY/libgurobi100.so
#-DGUROBI_INCLUDE_DIRS=$GUROBI_HOME/include
#-DGUROBI_CXX_LIBRARY=$GUROBI_LIBRARY/libgurobi_g++5.2.a
- cmake
-Dwith_asl=ON
-Dwith_pybind11=ON
-Dwith_cppad=ON
-Dwith_tests=ON
-Dwith_gurobi=ON
..
- make -j8
- make install
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "dev-public" && $CI_PIPELINE_SOURCE == "push"
- if: $CI_PIPELINE_SOURCE == "schedule"
artifacts:
paths:
- _build
expire_in: 1 hour
unit-tests:
stage: test
tags: ["docker"]
script:
- source /root/.profile
- cd _build
- export LD_LIBRARY_PATH="`pwd`/install/lib;`pwd`/install/lib64;$LD_LIBRARY_PATH"
- echo $LD_LIBRARY_PATH
- make test
allow_failure: false
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "dev-public" && $CI_PIPELINE_SOURCE == "push"
- if: $CI_PIPELINE_SOURCE == "schedule"
performance-tests:
stage: test
tags: ["docker"]
script:
- |-
if [[ $CI_PIPELINE_SOURCE == "merge_request_event" ]]; then
export BRANCH_NAME=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
else
export BRANCH_NAME=$CI_COMMIT_BRANCH
fi
- source /root/.profile
- cd _build
- ../test/aml_comparisons/scripts/bench_gurobi.sh
- tar -czf perf_archive.tgz /coek_performance_results
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "dev-public" && $CI_PIPELINE_SOURCE == "push"
- if: $CI_PIPELINE_SOURCE == "schedule"
artifacts:
expose_as: 'performance-trend'
paths:
- _build/perf_trend.html
- _build/perf_archive.tgz
expire_in: 4 weeks
pages:
stage: pages_plot
tags: ["docker"]
script:
- mkdir public
- mv _build/perf_trend.html public/index.html
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "dev-public" && $CI_PIPELINE_SOURCE == "push"
- if: $CI_PIPELINE_SOURCE == "schedule"
artifacts:
paths:
- public