-
Notifications
You must be signed in to change notification settings - Fork 16
/
.gitlab-ci.yml
240 lines (195 loc) · 5.36 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
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
variables:
TIMEOUT: 3600 # Set default timeout to 3600 seconds
.setup-buildtest: &setup-buildtest
- export COLUMNS=160
- export NERSC_HOST=$(cat /etc/clustername)
- module load python/3.9-anaconda-2021.11
- python -m venv $CI_PROJECT_DIR/pyenv
- source $CI_PROJECT_DIR/pyenv/bin/activate
- git clone -b devel https://github.com/buildtesters/buildtest
- cd buildtest
- . setup.sh
- git log --oneline -1
- buildtest --help
- export BUILDTEST_CONFIGFILE=$CI_PROJECT_DIR/config.yml
- buildtest config validate
.buildspec_cache: &buildspec_cache
- buildtest buildspec find --quiet --rebuild --root $CI_PROJECT_DIR/buildspecs
- buildtest buildspec summary
- buildtest buildspec find invalid
.post_run: &post_run
- mkdir -p $CI_PROJECT_DIR/.artifacts
- buildtest report --fail | tee $CI_PROJECT_DIR/.artifacts/report.txt
- buildtest cdash upload $CDASH_BUILD_NAME
- cp $(buildtest --logpath) $CI_PROJECT_DIR/.artifacts/
.validate_buildspecs:
allow_failure: true
#rules:
# - if: '$CI_PIPELINE_SOURCE == "external_pull_request_event" && $CI_EXTERNAL_PULL_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
before_script:
- *setup-buildtest
script:
- *buildspec_cache
.test_compilers:
allow_failure: true
#rules:
# - if: '$CI_PIPELINE_SOURCE == "external_pull_request_event" && $CI_EXTERNAL_PULL_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
before_script:
- *setup-buildtest
script:
- buildtest config compilers test
.scheduled_test:
before_script:
- *setup-buildtest
script:
- buildtest buildspec find --rebuild --root $CI_PROJECT_DIR/buildspecs
- TESTDIR=$CI_PROJECT_DIR/buildtest/runs/$CI_JOB_NAME/$(date +%F)
- SCRATCHDIR=$PSCRATCH/buildtest/runs/$CI_JOB_NAME/$(date +%F)
- buildtest build -t $TAGNAME --limit $LIMIT --account m3503_g --timeout $TIMEOUT --testdir $SCRATCHDIR
- *post_run
artifacts:
paths:
- $CI_PROJECT_DIR/.artifacts
expire_in: 1 week
validate_buildspecs_on_perlmutter:
extends: .validate_buildspecs
tags: [perlmutter-bdtest]
validate_buildspecs_on_muller:
extends: .validate_buildspecs
tags: [muller-bdtest]
test_compilers_perlmutter:
extends: .test_compilers
tags: [ perlmutter-bdtest ]
test_compilers_muller:
extends: .test_compilers
tags: [ muller-bdtest ]
.mini_runs:
variables:
LIMIT: 10
.large_runs:
variables:
LIMIT: 75
.system_check:
extends: [.scheduled_test, .mini_runs]
variables:
TAGNAME: "system"
CDASH_BUILD_NAME: "system-check"
perlmutter_system_check:
extends: .system_check
tags: [perlmutter-bdtest]
muller_system_check:
extends: .system_check
tags: [muller-bdtest]
#### E4S Jobs #####
.e4s_test:
extends: .scheduled_test
variables:
TAGNAME: "e4s,e4s-22.11,e4s-23.05,e4s-23.08"
.e4s_mini_test:
extends: [.e4s_test, .mini_runs]
only:
refs:
- schedules
variables:
- $SCHEDULE_TYPE == "e4s-mini"
variables:
CDASH_BUILD_NAME: "e4s-mini"
.e4s_large_test:
extends: [.e4s_test, .large_runs]
only:
refs:
- schedules
variables:
- $SCHEDULE_TYPE == "large"
variables:
CDASH_BUILD_NAME: "e4s-large"
e4s_mini_test_perlmutter:
extends: .e4s_mini_test
tags: [perlmutter-bdtest]
e4s_large_test_perlmutter:
extends: .e4s_large_test
tags: [perlmutter-bdtest]
e4s_mini_test_muller:
extends: .e4s_mini_test
tags: [muller-bdtest]
e4s_large_test_muller:
extends: .e4s_large_test
tags: [muller-bdtest]
#### APPLICATION JOBS ####
.apps_test:
extends: .scheduled_test
variables:
TAGNAME: "compile,gpu,mpi,openmp"
.apps_mini:
extends: [.apps_test, .mini_runs]
only:
refs:
- schedules
variables:
- $SCHEDULE_TYPE == "apps-mini"
variables:
CDASH_BUILD_NAME: "apps-mini"
.apps_large:
extends: [.apps_test, .large_runs]
only:
refs:
- schedules
variables:
- $SCHEDULE_TYPE == "large"
variables:
CDASH_BUILD_NAME: "apps-large"
apps_mini_test_perlmutter:
extends: .apps_mini
tags: [perlmutter-bdtest]
apps_mini_test_muller:
extends: .apps_mini
tags: [muller-bdtest]
apps_large_test_perlmutter:
extends: .apps_large
tags: [perlmutter-bdtest]
apps_large_test_muller:
extends: .apps_large
tags: [muller-bdtest]
#### FULL TESTSUITE RUN JOBS #####
.full_testsuite:
before_script:
- *setup-buildtest
script:
- TESTDIR=$CI_PROJECT_DIR/buildtest/runs/$CI_JOB_NAME/$(date +%F)
- SCRATCHDIR=$PSCRATCH/buildtest/runs/$CI_JOB_NAME/$(date +%F)
- buildtest build -b $CI_PROJECT_DIR/buildspecs/ --limit $LIMIT --account m3503_g --timeout $TIMEOUT --testdir $SCRATCHDIR
- *post_run
artifacts:
paths:
- $CI_PROJECT_DIR/.artifacts
expire_in: 1 week
.mini_fullsuite:
extends: [.full_testsuite, .mini_runs]
only:
refs:
- schedules
variables:
- $SCHEDULE_TYPE == "mini-fullsuite"
variables:
CDASH_BUILD_NAME: "mini-fullsuite"
.large_fullsuite:
extends: [.full_testsuite, .large_runs]
only:
refs:
- schedules
variables:
- $SCHEDULE_TYPE == "large"
variables:
CDASH_BUILD_NAME: "large-fullsuite"
mini-fullsuite-perlmutter:
extends: .mini_fullsuite
tags: [perlmutter-bdtest]
mini-fullsuite-muller:
extends: .mini_fullsuite
tags: [muller-bdtest]
large-fullsuite-perlmutter:
extends: .large_fullsuite
tags: [perlmutter-bdtest]
large-fullsuite-muller:
extends: .large_fullsuite
tags: [muller-bdtest]