-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
153 lines (140 loc) · 4.5 KB
/
.gitlab-ci.yml
File metadata and controls
153 lines (140 loc) · 4.5 KB
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
# Gitlab pipeline for SWIFT, defines the various jobs that could be ran by a
# suitably registered gitlab-runner instance.
#
# Should only run on non-draft merge requests or pushes to the master branch,
# either directly or from a merge request. Some of this logic is repeated in
# the jobs.
#
# Peter W. Draper 20-JAN-2026.
# Keep to the smaller job on MR branches and activate for all pushes to the
# master branch. Don't do anything on draft MRs.
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_DRAFT == "true"'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "push"'
- when: never
# We just build, that is a job is lots of compilations and tests. Those
# could be separated but tests would need to keep artefacts to preserve
# context with the compilations, and we have a lot of builds based on
# configure options, so each would need to be handled. That would be
# inefficient as the artefacts are uploaded to the gitlab and then
# retrieved.
stages:
- build
- runtime
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: none
# JOBS.
# -----
# Full GCC toolchain on COSMA:
gnu-build-cosma:
stage: build
tags:
- cosma
# When MR to master happens, or commit is to master.
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "master"'
- when: never
timeout: 6h
script:
- echo "GNU toolchain compilation and unit tests (full)"
- ci/COSMA/swift-gnu-check.sh
- echo "complete."
# Full Intel toolchain on COSMA:
intel-build-cosma:
stage: build
tags:
- cosma
# When MR to master happens, or commit is to master.
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "master"'
- when: never
timeout: 6h
script:
- echo "Intel OneAPI toolchain compilation and unit tests (full)"
- ci/COSMA/swift-intel-check.sh
- echo "complete."
# Small runtime checks.
runtime-check-cosma:
stage: runtime
tags:
- cosma
# When MR to master happens, or commit is to master.
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "master"'
- when: never
timeout: 6h
script:
- echo "Runtime checks"
- ci/COSMA/swift-runtime-check.sh
- echo "complete."
# Small test for MRs only. Some like to push a lot...
swift-intel-build-mr-quick:
stage: build
tags:
- cosma
# When this commit is part of an active MR.
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_DRAFT == "false"'
- when: never
timeout: 1h
script:
- echo "Merge request check using Intel toolchain"
- ci/COSMA/swift-intel-check-mr.sh
- echo "complete."
# Fuller test for MRs only, but only when requested.
# Shows a run chevron in the job in the pipeline page.
swift-intel-build-mr-long:
stage: build
tags:
- cosma
# When this commit is part of an active MR.
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_DRAFT == "false"'
- when: never
# And job is requested to run, note will not block the stage unless
# allow_failure is set to false.
when: manual
allow_failure: true
timeout: 6h
script:
- echo "Full Intel toolchain check in a merge request"
- ci/COSMA/swift-intel-check.sh
- echo "complete."
# Whatever toolchain is provided in the runner environment.
# Note this is not enabled by on the main repository, those
# jobs will only run on COSMA. Comment those out or change things
# to match your fork environment as needed.
#gnu-build:
# stage: build
# tags:
# - genericlinux
# # When MR to master happens, or commit is to master.
# rules:
# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "master"'
# - when: never
# timeout: 6h
# script:
# - echo "Full compilation and unit tests"
# - ci/swift-gnu-check.sh
# - echo "complete."
# Example of running other tests on a branch from the zoom work. Note this
# runs in the runtime stage and on the zoom-ci branch as well as the master
# branch. When an MR the branch name is not in CI_COMMIT_BRANCH.
#
#zoom-runtime-check-cosma:
# stage: runtime
# tags:
# - cosma
# rules:
# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "master"'
# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == "zoom-ci"'
# - when: never
# timeout: 6h
# script:
# - echo "Zoom runtime checks"
# - ci/COSMA/swift-zoom-runtime-checks.sh
# - echo "complete."