-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy path.gitlab-ci.yml
136 lines (124 loc) · 4.81 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
##############################################################################
# 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
SPOT_DIR: ${BUILD_ROOT}/califiles
# Whether and how to update uberenv
.run_update_uberenv: &run_update_uberenv |
[[ -n "${UPDATE_UBERENV}" ]] && ./scripts/gitlab/update-uberenv.sh "${UPDATE_UBERENV}"
stages:
- src
- full
- benchmarks
- comparison
# Run src build each push
.src_workflow:
stage: src
rules:
- if: $SERAC_CI_WORKFLOW_TYPE != "full" &&
$SERAC_CI_WORKFLOW_TYPE != "benchmarks" &&
$SERAC_CI_WORKFLOW_TYPE != "comparison"
# Run full build as a nightly scheduled pipeline
.full_workflow:
stage: full
rules:
- if: $SERAC_CI_WORKFLOW_TYPE == "full"
# Run benchmarks build as a weekly scheduled pipeline
# or, run benchmarks and save them in tmp location for comparison
.benchmarks_workflow:
stage: benchmarks
rules:
- if: $SERAC_CI_WORKFLOW_TYPE == "benchmarks"
variables:
# Note: make sure this matches what's in common_build_functions.py!
SPOT_DIR: /usr/workspace/smithdev/califiles/serac
- if: $SERAC_CI_WORKFLOW_TYPE == "comparison"
# Compare caliper files (generated from .benchmarks_workflow) against develop
.comparison_workflow:
stage: comparison
rules:
- if: $SERAC_CI_WORKFLOW_TYPE == "comparison"
dependencies:
- blueos-clang_10_0_1-benchmarks
- toss4-gcc_10_3_1-benchmarks
- toss4-clang_14_0_6-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}"
- mkdir -p ${SPOT_DIR}
- ${ALLOC_COMMAND} python3 scripts/llnl/run_benchmarks.py --spot-dir ${SPOT_DIR}
- 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
- ${SPOT_DIR}/*.cali
.comparison_build_script:
script:
# Takes Caliper files from previous jobs and performs benchmark analysis
- echo -e "section_start:$(date +%s):comparison\r\e[0K
Comparison Build ${CI_PROJECT_NAME}"
- ls ${SPOT_DIR}
- ls ${SPOT_DIR} | wc -l
- ${ALLOC_COMMAND} python3 scripts/llnl/compare_benchmarks.py --current-cali-dir ${SPOT_DIR} --verbose
- echo -e "section_end:$(date +%s):comparison\r\e[0K"
# 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'