-
Notifications
You must be signed in to change notification settings - Fork 34
/
.gitlab-ci.yml
99 lines (89 loc) · 3.6 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
##############################################################################
# Copyright (c) 2019-2024, Lawrence Livermore National Security, LLC and Serac
# project contributors. See the LICENSE file for details.
##############################################################################
variables:
#TODO: uncomment this when everyone has service user access across all the machines
#LLNL_SERVICE_USER: asmith
GIT_STRATEGY: clone
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
# Whether and how to update uberenv
.run_update_uberenv: &run_update_uberenv |
[[ -n "${UPDATE_UBERENV}" ]] && ./scripts/gitlab/update-uberenv.sh "${UPDATE_UBERENV}"
# Run src build each push
.src_workflow:
rules:
- if: $SERAC_CI_WORKFLOW_TYPE != "full" && $SERAC_CI_WORKFLOW_TYPE != "benchmarks"
# Run full build as a nightly scheduled pipeline
.full_workflow:
rules:
- if: $SERAC_CI_WORKFLOW_TYPE == "full"
# Run benchmarks build as a weekly scheduled pipeline
.benchmarks_workflow:
rules:
- if: $SERAC_CI_WORKFLOW_TYPE == "benchmarks"
####
# Templates
.src_build_script:
script:
# Build source, run unit tests, and test install examples. Conditionally run
# integration tests
- echo -e "section_start:$(date +%s):src_build_and_unit_test\r\e[0K
Source Build and Unit Tests ${CI_PROJECT_NAME}"
- ./scripts/gitlab/build_and_test.sh
- echo -e "section_end:$(date +%s):src_build_and_unit_test\r\e[0K"
artifacts:
expire_in: 2 weeks
when: always
paths:
- _serac_build_and_test_*/output.log*.txt
- _serac_build_and_test_*/build-*/output.log*.txt
- _serac_build_and_test_*/build-*/*.*.logs/*.log
- _serac_build_and_test_*/build-*/*.*.logs/*.err
reports:
junit:
- _serac_build_and_test_*/build-*/junit.xml
- _serac_build_and_test_*/build-*/*.*.logs/atsr.xml
.full_build_script:
script:
- *run_update_uberenv
# Build TPLs, src, and run unit tests
- echo -e "section_start:$(date +%s):full_build_and_unit_test\r\e[0K
Full Build and Unit Test ${CI_PROJECT_NAME}"
- ${ALLOC_COMMAND} python3 scripts/llnl/build_tpls.py -v ${SPEC} --directory=${FULL_BUILD_ROOT} --short-path
- echo -e "section_end:$(date +%s):full_build_and_unit_test\r\e[0K"
artifacts:
expire_in: 2 weeks
when: always
paths:
- ${FULL_BUILD_ROOT}/${SYS_TYPE}/*/output.log*.txt
- ${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
.benchmarks_build_script:
script:
# Builds src, runs benchmarks, and stores Caliper files in shared location
- echo -e "section_start:$(date +%s):benchmarks_build\r\e[0K
Benchmarks Build ${CI_PROJECT_NAME}"
- ${ALLOC_COMMAND} python3 scripts/llnl/run_benchmarks.py
- echo -e "section_end:$(date +%s):benchmarks_build\r\e[0K"
artifacts:
expire_in: 2 weeks
when: always
paths:
- _serac_build_and_test_*/output.log*.txt
- _serac_build_and_test_*/build-*/output.log*.txt
- _serac_build_and_test_*/build-*/*.cali
# This is where jobs are included for each system
include:
- local: .gitlab/build_blueos.yml
- local: .gitlab/build_toss4.yml
# Disabling cray until all developers have access to the tioga machine
# - local: .gitlab/build_toss4_cray.yml
- project: 'lc-templates/id_tokens'
file: 'id_tokens.yml'