-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
228 lines (208 loc) · 5.79 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
228 lines (208 loc) · 5.79 KB
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
image: codecr.jlab.org/hallb/clas12/iguana/ci_no_root:latest
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
auto_cancel:
on_new_commit: interruptible
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
auto_cancel:
on_new_commit: conservative
- if: $CI_COMMIT_TAG
auto_cancel:
on_new_commit: conservative
variables:
EVIOFILE: clas_018779.evio.00001
default:
interruptible: true
before_script:
- export CLARA_HOME=$CI_PROJECT_DIR/clara
- export COATJAVA=$CI_PROJECT_DIR/coatjava
- export PATH=$CLARA_HOME/plugins/clas12/bin:$PATH
- export PATH=$CLARA_HOME/bin:$PATH
- export PATH=$COATJAVA/bin:$PATH
.clon:
tags:
- clonfarm3-shell
stage: test
needs: [build,download]
dependencies: [build,download]
interruptible: true
before_script:
- export JAVA_HOME=/usr/clas12/offline/jdk/21.0.2
- export PATH=$JAVA_HOME:$PATH
- export PATH=/usr/clas12/offline/maven/3.9.6/bin:$PATH
- export PATH=/usr/clas12/offline/asprof/4.4/bin:$PATH
- export CLARA_HOME=$CI_PROJECT_DIR/clara
- export COATJAVA=$CI_PROJECT_DIR/coatjava
- export PATH=$CLARA_HOME/plugins/clas12/bin:$PATH
- export PATH=$CLARA_HOME/bin:$PATH
- export PATH=$COATJAVA/bin:$PATH
- tar -xzf clara.tar.gz
stages:
- mirror
- build
- test
- deploy
mirror:
stage: mirror
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
script:
- git config --global --add safe.directory $CI_PROJECT_DIR
- git config --global user.email "ci-bot@code.jlab.org"
- git config --global user.name "GitLab CI"
- git checkout development
- git config pull.rebase true
- git remote set-url origin https://github.com/jeffersonlab/coatjava
- git pull origin development
- git remote set-url origin https://gitlab-ci-token:${CI_JOB_TOKEN}@code.jlab.org/hallb/clas12/coatjava/coatjava.git
- git push
build:
stage: build
needs:
- job: mirror
optional: true
script:
- git config --global --add safe.directory $CI_PROJECT_DIR
- ./build-coatjava.sh --lfs --clara -T48 --quiet --no-progress
- tar -czf coatjava.tar.gz coatjava
- tar -czf clara.tar.gz clara
artifacts:
when: always
expire_in: 1 day
paths:
- coatjava.tar.gz
- clara.tar.gz
download:
stage: build
script:
- GIT_LFS_SKIP_SMUDGE=1 git clone https://code.jlab.org/hallb/clas12/validation-data
- cd validation-data
- git lfs install --skip-smudge
- git config lfs.fetchinclude raw/rg-d/$EVIOFILE
- git lfs pull
- cd -
- ln validation-data/raw/rg-d/$EVIOFILE
artifacts:
when: always
paths:
- $EVIOFILE
spotbugs:
stage: test
needs: [build]
dependencies: [build]
script:
- tar -xzf coatjava.tar.gz
- ./build-coatjava.sh -T48 --spotbugs --quiet --no-progress
unit-tests:
stage: test
needs: [build]
dependencies: [build]
script:
- tar -xzf coatjava.tar.gz
- ./build-coatjava.sh -T48 --lfs --unittests --quiet --no-progress
- ./validation/jacoco-aggregate.sh
artifacts:
when: always
expire_in: 1 day
paths:
- publish
docs:
stage: test
needs: [build,unit-tests]
dependencies: [build,unit-tests]
script:
- tar -xzf coatjava.tar.gz
- python3 -m venv venv
- source venv/bin/activate
- python3 -m pip install -r docs/zensical/requirements.txt
- ./docs/zensical/generate.sh pages
- libexec/build-javadocs.sh
- ls -l && ls -l pages && ls -l publish
- mv target/reports/apidocs pages/javadoc
- cp -r publish pages/jacoco
artifacts:
when: always
expire_in: 1 week
paths:
- pages
eb:
stage: test
needs: [build]
dependencies: [build]
script:
- tar -xzf coatjava.tar.gz
- git config --global --add safe.directory $CI_PROJECT_DIR
- git lfs install
- git submodule update --init validation/advanced-tests/data
- cd validation/advanced-tests
- ./run-eb-tests.sh -100 ${ARG}
parallel:
matrix:
- ARG: electronproton
- ARG: electronprotonC
- ARG: electrongamma
- ARG: electronneutronC
- ARG: electronFTpion
decoder:
stage: test
needs: [build,download]
dependencies: [build,download]
script:
- tar -xzf clara.tar.gz
- decoder -l FINE -n 1000 -o decoded.hipo $EVIOFILE
clara:
stage: test
needs: [build,download]
dependencies: [build,download]
script:
- tar -xzf clara.tar.gz
- run-clara -v -c $CLARA_HOME -t 4 -y ./etc/services/rgd-clarode.yml -n 30 -o out $EVIOFILE
- mv out/rec_$EVIOFILE.hipo claroded.hipo
profile:
extends: .clon
allow_failure: true
script:
- ./clara/plugins/clas12/libexec/profile -e cpu run-clara -c ./clara -y ./etc/services/rgd-clarode.yml -o tmp1 -t 16 -l $EVIOFILE
- ./clara/plugins/clas12/libexec/profile -e alloc run-clara -c ./clara -y ./etc/services/rgd-clarode.yml -o tmp2 -t 16 -l $EVIOFILE
- ./clara/plugins/clas12/libexec/profile -e lock run-clara -c ./clara -y ./etc/services/rgd-clarode.yml -o tmp3 -t 16 -l $EVIOFILE
artifacts:
when: always
expire_in: 1 week
paths:
- "asprof*.html"
scaling:
extends: .clon
allow_failure: true
script:
- ./clara/plugins/clas12/libexec/scaling -c ./clara -y ./etc/services/rgd-clarode.yml -t 8,12,18,24 $EVIOFILE
artifacts:
when: always
expire_in: 1 week
paths:
- scaling.svg
pages:
stage: deploy
needs: [profile,scaling,docs]
dependencies: [profile,scaling,docs]
script:
- cp -r pages public
- mkdir public/perf
- cp asprof*.html public/perf
- cp scaling.svg public/perf
pages: true
artifacts:
expire_in: 1 week
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
.deploy:
stage: deploy
script:
- echo DEPLOY!
.release:
stage: deploy
script:
- echo RELEASE!