-
Notifications
You must be signed in to change notification settings - Fork 9
272 lines (255 loc) · 6.77 KB
/
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
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
name: ci
on:
pull_request:
push:
branches:
- main
defaults:
run:
shell: bash
env:
dataset: ci_test
validation_single_run: '011329'
validation_run_group: B # FIXME: not actually used; see comments mentioning this variable below
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# build
#############################################################################
build_timelines:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- name: build
run: mvn package
- name: tar # to preserve any permissions
run: |
tar czvf build_detectors.tar.gz detectors/target
tar czvf build_monitoring.tar.gz monitoring/target
- uses: actions/upload-artifact@v3
with:
name: build
retention-days: 1
path: build*.tar.gz
build_coatjava:
runs-on: ubuntu-latest
steps:
- name: setup java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- name: get coatjava
uses: robinraju/[email protected]
with:
repository: JeffersonLab/coatjava
tag: 10.0.2
tarBall: true
extract: true
- name: rename coatjava release directory
run: |
rm *.tar.gz
mv JeffersonLab-coatjava* coatjava
- name: build coatjava
run: |
cd coatjava
./build-coatjava.sh
- name: tree
run: tree
- name: tar
run: tar czvf build_coatjava.tar.gz coatjava/coatjava
- uses: actions/upload-artifact@v3
with:
name: build
retention-days: 1
path: build*.tar.gz
# download test data
#############################################################################
download_test_data:
runs-on: ubuntu-latest
steps:
- name: download
run: wget --no-check-certificate http://clasweb.jlab.org/clas12offline/distribution/clas12-timeline/validation_files.tar.gz
- uses: actions/upload-artifact@v3
with:
name: validation_files
retention-days: 1
path: validation_files.tar.gz
# monitoring
#############################################################################
run_monitoring:
needs:
- build_timelines
- build_coatjava
- download_test_data
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
type:
- detectors
- physics
steps:
- name: setup java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- name: setup groovy
uses: wtfjoke/setup-groovy@v1
with:
groovy-version: 4.x
- name: groovy version
run: groovy --version
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: validation_files
- uses: actions/download-artifact@v3
with:
name: build
- name: untar
run: ls *.tar.gz | xargs -I_ tar xzvf _
- name: tree
run: tree
- name: run monitoring
run: bin/run-monitoring.sh -d ${{env.dataset}} --findhipo --series --focus-${{matrix.type}} validation_files
- name: tree slurm
run: tree slurm
- name: tree outfiles
run: tree outfiles
- uses: actions/upload-artifact@v3
with:
name: slurm
retention-days: 1
path: slurm
- uses: actions/upload-artifact@v3
with:
name: outfiles
retention-days: 1
path: outfiles
test_swifjob:
needs:
- build_timelines
- build_coatjava
- download_test_data
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
type:
- detectors
- physics
steps:
- name: setup java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- name: setup groovy
uses: wtfjoke/setup-groovy@v1
with:
groovy-version: 4.x
- name: groovy version
run: groovy --version
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: validation_files
- uses: actions/download-artifact@v3
with:
name: build
- name: untar
run: ls *.tar.gz | xargs -I_ tar xzvf _
- name: tree
run: tree
- name: test monitoring swifjob
run: bin/test-swifjob.sh validation_files/${{env.validation_single_run}} runner --focus-${{matrix.type}}
- name: tree runner
run: tree runner
# timeline production
#############################################################################
run_timelines:
needs:
- run_monitoring
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
type:
- detectors
- physics
include:
- { type: detectors, args: -n 2 -r B } # FIXME: prefer `-r ${{env.validation_run_group}}`, but that's invalid syntax for matrix arg
- { type: physics, args: '' }
steps:
- name: setup java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- name: setup groovy
uses: wtfjoke/setup-groovy@v1
with:
groovy-version: 4.x
- name: groovy version
run: groovy --version
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: outfiles
path: outfiles
- uses: actions/download-artifact@v3
with:
name: build
- name: untar
run: ls *.tar.gz | xargs -I_ tar xzvf _
- name: tree
run: tree
- name: run timelines
run: bin/run-${{matrix.type}}-timelines.sh -d ${{env.dataset}} ${{matrix.args}}
- name: tree outfiles
run: tree outfiles
- uses: actions/upload-artifact@v3
with:
name: outfiles
retention-days: 1
path: outfiles
# timeline deployment
#############################################################################
deploy_timelines:
needs:
- run_timelines
runs-on: ubuntu-latest
steps:
- name: setup groovy
uses: wtfjoke/setup-groovy@v1
with:
groovy-version: 4.x
- name: groovy version
run: groovy --version
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: outfiles
path: outfiles
- uses: actions/download-artifact@v3
with:
name: build
- name: untar
run: ls *.tar.gz | xargs -I_ tar xzvf _
- name: tree outfiles
run: tree outfiles
- name: deploy
run: bin/deploy-timelines.sh -d ${{env.dataset}} -c -t web
- uses: actions/upload-artifact@v3
with:
name: web
retention-days: 7
path: web