-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
100 lines (88 loc) · 2.71 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
image: eicweb.phy.anl.gov:4567/containers/eic_container/jug_dev:testing
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "webide"'
- if: '$CI_COMMIT_BRANCH == "master"'
default:
before_script:
- mkdir -p images && mkdir -p doc/
tags:
- phy
artifacts:
paths:
- images/
- doc/
reports:
dotenv: juggler.env
stages:
- config
- build
- deploy
env:
stage: config
rules:
- if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"'
script:
- |
if [[ "x${CI_PIPELINE_SOURCE}" == "xmerge_request_event" || "$CI_COMMIT_BRANCH" == "master" ]]; then
export EIC_DATA_MODEL_VERSION="${CI_COMMIT_REF_NAME}"
echo "EIC_DATA_MODEL_VERSION = ${EIC_DATA_MODEL_VERSION}"
echo "EIC_DATA_MODEL_VERSION=$CI_COMMIT_REF_NAME" >> juggler.env
fi
- mkdir -p "/scratch/${CI_PROJECT_NAME}_${CI_PIPELINE_ID}" && cp juggler.env /scratch/${CI_PROJECT_NAME}_${CI_PIPELINE_ID}/juggler.env && printenv > /scratch/${CI_PROJECT_NAME}_${CI_PIPELINE_ID}/env.out
artifacts:
reports:
dotenv: juggler.env
compile:
stage: build
rules:
- if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"'
needs:
- ["env"]
script:
- mkdir build && cd build && cmake ../. -DCMAKE_INSTALL_PREFIX=../install && make -j20 && make install
checks:juggler:
stage: deploy
rules:
- if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"'
variables:
JUGGLER_EICD_VERSION: "$EIC_DATA_MODEL_VERSION"
trigger:
project: EIC/juggler
strategy: depend
#benchmarks:physics:
# stage: deploy
# rules:
# - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"'
# needs:
# - ["compile"]
# trigger:
# project: EIC/benchmarks/physics_benchmarks
# strategy: depend
gen_doxygen_src:
stage: build
rules:
- if: '$CI_SERVER_HOST == "gitlab.phy.anl.gov" && $CI_COMMIT_BRANCH == "master"'
script:
- mkdir build && cd build && cmake ../. -DCMAKE_INSTALL_PREFIX=../install
artifacts:
paths:
- build/src
- build/eicd
pages:
image: eicweb.phy.anl.gov:4567/containers/eic_container/alpine
stage: deploy
needs: ['gen_doxygen_src']
rules:
- if: '$CI_SERVER_HOST == "gitlab.phy.anl.gov" && $CI_COMMIT_BRANCH == "master"'
script:
- apk update && apk add doxygen graphviz ttf-ubuntu-font-family
- cd build && cp -r ../docs/* . && doxygen Doxyfile && cd ..
- mkdir -p public && cp -r build/docs/html/* public/.
# - mkdir build && cd build && cmake ../. -DCMAKE_INSTALL_PREFIX=../install && make doc_doxygen && cd ..
#- cp -r build/doxygen_output/html public
artifacts:
paths:
- public