-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
121 lines (108 loc) · 4.31 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
###############################################################################
# Copyright (c) 2016-2020, Lawrence Livermore National Security, LLC
# and RAJA project contributors. See the RAJA/COPYRIGHT file for details.
#
# SPDX-License-Identifier: (BSD-3-Clause)
###############################################################################
###############################################################################
# General GitLab pipelines configurations for supercomputers and Linux clusters
# at Lawrence Livermore National Laboratory (LLNL).
#
# This entire pipeline is LLNL-specific
# #############################################################################
# We define the following GitLab pipeline variables:
#
# GIT_SUBMODULE_STRATEGY:
# Tells Gitlab to recursively update the submodules when cloning umpire
#
# ALLOC_NAME:
# On LLNL's ruby, this pipeline creates only one allocation shared among jobs
# in order to save time and resources. This allocation has to be uniquely named
# so that we are sure to retrieve it.
#
# BUILD_ROOT:
# The path to the shared resources between all jobs. The BUILD_ROOT is unique to
# the pipeline, preventing any form of concurrency with other pipelines. This
# also means that the BUILD_ROOT directory will never be cleaned.
#
# DEFAULT_TIME:
# Default time to let the Lassen jobs run will be 30 minutes. However, if it is
# a job that requires more time, it will be overwritten in the lassen template
# file.
# TODO: add a clean-up mechanism
variables:
GIT_SUBMODULE_STRATEGY: recursive
ALLOC_NAME: ${CI_PROJECT_NAME}_ci_${CI_PIPELINE_ID}
BUILD_ROOT: ${CI_PROJECT_DIR}
DEFAULT_TIME: 30
MP_BRANCH: "develop"
# Normally, stages are blocking in Gitlab. However, using the keyword "needs" we
# can express dependencies between job that break the ordering of stages, in
# favor of a DAG.
# In practice r_*, l_* and b_* stages are independently run and start immediately.
stages:
- r_allocate_resources
- r_build_and_test
- r_release_resources
- l_build_and_test
- b_build_and_test
- c_build_and_test
- multi_project
# This is the rules that drives the activation of "advanced" jobs. All advanced
# jobs will share this through a template mechanism.
.advanced_pipeline:
rules:
- if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "develop" || $ALL_TARGETS == "ON"' #run only if ...
# These are also templates (.name) that define project specific build commands.
# If an allocation exist with the name defined in this pipeline, the job will
# use it (slurm specific).
.build_toss_3_x86_64_ib_script:
script:
- echo ${ALLOC_NAME}
- export JOBID=$(squeue -h --name=${ALLOC_NAME} --format=%A)
- echo ${JOBID}
- srun $( [[ -n "${JOBID}" ]] && echo "--jobid=${JOBID}" ) -t ${DEFAULT_TIME} -N 1 scripts/gitlab/build_and_test.sh
artifacts:
reports:
junit: junit.xml
.build_toss_4_x86_64_ib_corona_script:
script:
- srun -p pdebug -t 30 -N 1 scripts/gitlab/build_and_test.sh
# Lassen uses a different job scheduler (spectrum lsf) that does not
# allow pre-allocation the same way slurm does.
.build_blueos_3_ppc64le_ib_script:
script:
- lalloc 1 -W ${DEFAULT_TIME} scripts/gitlab/build_and_test.sh
artifacts:
reports:
junit: junit.xml
.build_blueos_3_ppc64le_ib_ats_disabled_script:
script:
- lalloc 1 --atsdisable -W ${DEFAULT_TIME} scripts/gitlab/build_and_test.sh
artifacts:
reports:
junit: junit.xml
.build_blueos_3_ppc64le_ib_p9_script:
extends: .build_blueos_3_ppc64le_ib_script
# If testing develop branch, trigger CHAI pipeline with this version of RAJA.
# TODO: Once spack allows to clone a specific commit on demand, then point to the exact commit.
# This will prevent from sticking to a branch (here develop).
# MP_BRANCH is short for "Multi-Project Branch" and will usually be develop.
trigger-rajaperf:
stage: multi_project
rules:
- if: '$CI_COMMIT_BRANCH == "${MP_BRANCH}" || $MULTI_PROJECT == "ON"' #run only if ...
variables:
UPDATE_RAJA: ${MP_BRANCH}
trigger:
project: radiuss/rajaperf
branch: develop
strategy: depend
# This is where jobs are included.
include:
- local: .gitlab/ruby-templates.yml
- local: .gitlab/ruby-jobs.yml
- local: .gitlab/lassen-templates.yml
- local: .gitlab/lassen-jobs.yml
- local: .gitlab/corona-templates.yml
- local: .gitlab/corona-jobs.yml