forked from LLNL/serac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
67 lines (58 loc) · 2.35 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
##############################################################################
# Copyright (c) 2019-2021, Lawrence Livermore National Security, LLC and Serac
# project contributors. See the LICENSE file for details.
##############################################################################
variables:
GIT_SUBMODULE_STRATEGY: recursive
PROJECT_ALLOC_NAME: ${CI_PROJECT_NAME}_ci_${CI_PIPELINE_ID}
BUILD_ROOT: ${CI_PROJECT_DIR}
FULL_BUILD_ROOT: ${CI_BUILDS_DIR}/serac/${CI_JOB_NAME}
ALLOC_BANK: eng
stages:
- allocate
- build
- release
# Whether and how to update uberenv
.run_update_uberenv: &run_update_uberenv |
[[ -n "${UPDATE_UBERENV}" ]] && ./scripts/gitlab/update-uberenv.sh "${UPDATE_UBERENV}"
.src_workflow:
rules:
- if: '$FULL_BUILD != "ON"'
.full_workflow:
rules:
- if: '$FULL_BUILD == "ON"'
####
# Template
.src_build_script:
script:
# Use pre-existing allocation if any
- JOBID=$(if [[ "$SYS_TYPE" == "toss_3_x86_64_ib" ]]; then squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A; fi)
- ASSIGN_ID=$(if [[ -n "${JOBID}" ]]; then echo "--jobid=${JOBID}"; fi)
# BUILD + TEST
- echo -e "section_start:$(date +%s):src_build_and_test\r\e[0K
Source Build and Test ${CI_PROJECT_NAME}"
- ${ALLOC_COMMAND} python3 scripts/llnl/build_src.py -v --host-config ${HOST_CONFIG} ${EXTRA_BUILD_OPTIONS}
- echo -e "section_end:$(date +%s):src_build_and_test\r\e[0K"
artifacts:
paths:
- _serac_build_and_test_*/output.log*.txt
- _serac_build_and_test_*/build-*/output.log*.txt
reports:
junit: _serac_build_and_test_*/build-*/junit.xml
.full_build_script:
script:
- *run_update_uberenv
- echo -e "section_start:$(date +%s):full_build_and_test\r\e[0K
Full Build and Test ${CI_PROJECT_NAME}"
- ${ALLOC_COMMAND} python3 scripts/llnl/build_tpls.py -v --spec="${SPEC} ${EXTRA_SPEC}" --directory=${FULL_BUILD_ROOT}
- echo -e "section_end:$(date +%s):full_build_and_test\r\e[0K"
artifacts:
paths:
- ${FULL_BUILD_ROOT}/${SYS_TYPE}/*/_serac_build_and_test_*/output.log*.txt
- ${FULL_BUILD_ROOT}/${SYS_TYPE}/*/_serac_build_and_test_*/build-*/output.log*.txt
reports:
junit: ${FULL_BUILD_ROOT}/${SYS_TYPE}/*/_serac_build_and_test_*/build-*/junit.xml
# This is where jobs are included
include:
- local: .gitlab/build_quartz.yml
- local: .gitlab/build_lassen.yml