-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
157 lines (144 loc) · 3.86 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
154
155
156
157
image: ${BENCHMARKS_REGISTRY}/${BENCHMARKS_CONTAINER}:${BENCHMARKS_TAG}
variables:
RECO: "eicrecon"
DETECTOR: epic
DETECTOR_CONFIG: epic_craterlake
workflow:
name: '$PIPELINE_NAME'
default:
before_script:
- source .local/bin/env.sh
tags:
- phy-scratch
artifacts:
expire_in: 3 days
paths:
- .local/detector
- .local/lib
- .local/bin
- .local/include
- .local/share
- .local/root_build
- .snakemake/log
- results
- config
- .env
- summary.txt
reports:
dotenv: .env
stages:
- status-pending
- config
- compile
- generate
- simulate
- collect
- finish
- status-report
.status:
image: curlimages/curl:latest
before_script: []
script:
- |
if [ -n "${GITHUB_SHA}" ] ; then
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${GITHUB_REPO_STATUS_TOKEN}" \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}" \
-d '{"state":"'"${STATE}"'",
"target_url":"'"${CI_PIPELINE_URL}"'",
"description":"'"${DESCRIPTION} $(TZ=America/New_York date)"'",
"context":"eicweb/physics_benchmarks ('"$DETECTOR_CONFIG"')"
}' ;
fi
benchmarks:physics:pending:
stage: status-pending
extends: .status
variables:
STATE: "pending"
DESCRIPTION: "Started..."
when: always
common:setup:
stage: config
before_script:
- |
if [[ -z "${COMMON_BENCH_VERSION}" ]] ; then
export COMMON_BENCH_VERSION="master"
fi
echo "COMMON_BENCH_VERSION = ${COMMON_BENCH_VERSION}"
echo "COMMON_BENCH_VERSION=${COMMON_BENCH_VERSION}" >> .env
script:
- git clone -b "${COMMON_BENCH_VERSION}" https://eicweb.phy.anl.gov/EIC/benchmarks/common_bench.git setup
- source setup/bin/env.sh && ./setup/bin/install_common.sh
- mkdir_local_data_link sim_output
- mkdir_local_data_link datasets
- mkdir -p results
- mkdir -p config
- print_env.sh
.compile_benchmark:
needs:
- ["common:setup"]
before_script:
- source .local/bin/env.sh
.phy_benchmark:
needs:
- ["common:setup"]
before_script:
- source .local/bin/env.sh
- source /opt/detector/epic-main/setup.sh
- ls -lrtha
- ln -s "${LOCAL_DATA_PATH}/sim_output" sim_output
- ln -s "${LOCAL_DATA_PATH}/datasets/data" data
- mkdir -p "$SNAKEMAKE_OUTPUT_CACHE"
- ls -lrtha
retry:
max: 2
when:
- runner_system_failure
include:
- local: 'benchmarks/Exclusive-Diffraction-Tagging/diffractive_vm/config.yml'
- local: 'benchmarks/Exclusive-Diffraction-Tagging/demp/config.yml'
- local: 'benchmarks/Exclusive-Diffraction-Tagging/semi_coherent/config.yml'
#- local: 'benchmarks/Exclusive-Diffraction-Tagging/dvmp/config.yml'
- local: 'benchmarks/Exclusive-Diffraction-Tagging/dvcs/config.yml'
- local: 'benchmarks/Exclusive-Diffraction-Tagging/tcs/config.yml'
- local: 'benchmarks/Exclusive-Diffraction-Tagging/u_omega/config.yml'
- local: 'benchmarks/Inclusive/dis/config.yml'
summary:
stage: finish
needs:
- "diffractive_vm:results"
- "demp:results"
- "dis:results"
- "dvcs:results"
- "tcs:results"
- "u_omega:results"
script:
- collect_benchmarks.py
- find results -print | sort | tee summary.txt
artifacts:
paths:
- summary.txt
- results/*
# reports:
# junit: ["results/dvcs/report2.xml"]
benchmarks:physics:success:
stage: status-report
dependencies: []
extends: .status
variables:
STATE: "success"
DESCRIPTION: "Succeeded!"
after_script:
# Cleanup scratch space
- rm -rfv $LOCAL_DATA_PATH
when: on_success
benchmarks:physics:failure:
stage: status-report
dependencies: []
extends: .status
variables:
STATE: "failure"
DESCRIPTION: "Failed!"
when: on_failure