summaryrefslogtreecommitdiff
path: root/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
blob: 0b49e76b059a12d27532fa6589332d524077d306 (plain) (blame)
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
stages: [ "generate", "build" ]

default:
  image: { "name": "ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2021-05-15", "entrypoint": [""] }

########################################
# Job templates
########################################

.pr:
  only:
  - /^github\/pr[\d]+_.*$/
  variables:
    SPACK_PR_BRANCH: ${CI_COMMIT_REF_NAME}
    SPACK_PIPELINE_TYPE: "spack_pull_request"

.develop:
  only:
  - /^github\/develop$/
  variables:
    SPACK_PIPELINE_TYPE: "spack_protected_branch"

.generate:
  stage: generate
  script:
    - . "./share/spack/setup-env.sh"
    - spack --version
    - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME}
    - spack env activate --without-view .
    - spack ci generate --check-index-only
      --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
      --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml"
  artifacts:
    paths:
      - "${CI_PROJECT_DIR}/jobs_scratch_dir"
  tags: ["spack", "public", "medium", "x86_64"]
  interruptible: true

.pr-generate:
  extends: [ ".pr", ".generate" ]

.develop-generate:
  extends: [ ".develop", ".generate" ]

.build:
  stage: build

.pr-build:
  extends: [ ".pr", ".build" ]
  variables:
    AWS_ACCESS_KEY_ID: ${PR_MIRRORS_AWS_ACCESS_KEY_ID}
    AWS_SECRET_ACCESS_KEY: ${PR_MIRRORS_AWS_SECRET_ACCESS_KEY}

.develop-build:
  extends: [ ".develop", ".build" ]
  variables:
    AWS_ACCESS_KEY_ID: ${MIRRORS_AWS_ACCESS_KEY_ID}
    AWS_SECRET_ACCESS_KEY: ${MIRRORS_AWS_SECRET_ACCESS_KEY}
    SPACK_SIGNING_KEY: ${PACKAGE_SIGNING_KEY}

########################################
# TEMPLATE FOR ADDING ANOTHER PIPELINE
########################################
#
# First add a new spack.yml defining the pipeline to run in
# share/spack/gitlab/cloud_pipelines/stacks/my-super-cool-stack/spack.yaml
#
# Then add the following entries at the bottom of this file:
#
########################################
# My Super Cool Pipeline
########################################
# .my-super-cool-stack:
#   variables:
#     SPACK_CI_STACK_NAME: my-super-cool-stack
#
# my-super-cool-stack-pr-generate:
#   extends: [ ".my-super-cool-stack", ".pr-generate"]
#
# my-super-cool-stack-develop-generate:
#   extends: [ ".my-super-cool-stack", ".develop-generate"]
#
# my-super-cool-stack-pr-build:
#   extends: [ ".my-super-cool-stack", ".pr-build" ]
#   trigger:
#     include:
#       - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
#         job: my-super-cool-stack-pr-generate
#     strategy: depend
#
# my-super-cool-stack-develop-build:
#   extends: [ ".my-super-cool-stack", ".develop-build" ]
#   trigger:
#     include:
#       - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
#         job: my-super-cool-stack-develop-generate
#     strategy: depend

########################################
# E4S pipeline
########################################
.e4s:
  variables:
    SPACK_CI_STACK_NAME: e4s

e4s-pr-generate:
  extends: [ ".e4s", ".pr-generate"]

e4s-develop-generate:
  extends: [ ".e4s", ".develop-generate"]

e4s-pr-build:
  extends: [ ".e4s", ".pr-build" ]
  trigger:
    include:
      - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
        job: e4s-pr-generate
    strategy: depend

e4s-develop-build:
  extends: [ ".e4s", ".develop-build" ]
  trigger:
    include:
      - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
        job: e4s-develop-generate
    strategy: depend

########################################
# E4S on Power
########################################
# .power-e4s-generate-tags-and-image:
#   image: { "name": "ghcr.io/scottwittenburg/ecpe4s-ubuntu20.04-runner-ppc64le:2021-07-01", "entrypoint": [""] }
#   tags: ["spack", "public", "medium", "ppc64le"]

# .e4s-on-power:
#   variables:
#     SPACK_CI_STACK_NAME: e4s-on-power

# e4s-on-power-pr-generate:
#   extends: [ ".e4s-on-power", ".pr-generate", ".power-e4s-generate-tags-and-image"]

# e4s-on-power-develop-generate:
#   extends: [ ".e4s-on-power", ".develop-generate", ".power-e4s-generate-tags-and-image"]

# e4s-on-power-pr-build:
#   extends: [ ".e4s-on-power", ".pr-build" ]
#   trigger:
#     include:
#       - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
#         job: e4s-on-power-pr-generate
#     strategy: depend

# e4s-on-power-develop-build:
#   extends: [ ".e4s-on-power", ".develop-build" ]
#   trigger:
#     include:
#       - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
#         job: e4s-on-power-develop-generate
#     strategy: depend

#########################################
# Build tests for different build-systems
#########################################
.build_systems:
  variables:
    SPACK_CI_STACK_NAME: build_systems

build_systems-pr-generate:
  extends: [ ".build_systems", ".pr-generate"]

build_systems-develop-generate:
  extends: [ ".build_systems", ".develop-generate"]

build_systems-pr-build:
  extends: [ ".build_systems", ".pr-build" ]
  trigger:
    include:
      - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
        job: build_systems-pr-generate
    strategy: depend

build_systems-develop-build:
  extends: [ ".build_systems", ".develop-build" ]
  trigger:
    include:
      - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
        job: build_systems-develop-generate
    strategy: depend

#########################################
# RADIUSS
#########################################
.radiuss:
  variables:
    SPACK_CI_STACK_NAME: radiuss

.radiuss-generate:
  extends: [ ".radiuss"]
  image: { "name": "ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2021-05-15", "entrypoint": [""] }

# ---------  PRs ---------
radiuss-pr-generate:
  extends: [ ".radiuss-generate", ".pr-generate" ]

radiuss-pr-build:
  extends: [ ".radiuss", ".pr-build" ]
  trigger:
    include:
      - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
        job: radiuss-pr-generate
    strategy: depend

# ---------  Develop ---------
radiuss-develop-generate:
  extends: [ ".radiuss-generate", ".develop-generate" ]

radiuss-develop-build:
  extends: [ ".radiuss", ".develop-build" ]
  trigger:
    include:
      - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
        job: radiuss-develop-generate
    strategy: depend

########################################
# ECP Data & Vis SDK
########################################
.data-vis-sdk:
  variables:
    SPACK_CI_STACK_NAME: data-vis-sdk

data-vis-sdk-pr-generate:
  extends: [ ".data-vis-sdk", ".pr-generate"]

data-vis-sdk-develop-generate:
  extends: [ ".data-vis-sdk", ".develop-generate"]

data-vis-sdk-pr-build:
  extends: [ ".data-vis-sdk", ".pr-build" ]
  trigger:
    include:
      - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
        job: data-vis-sdk-pr-generate
    strategy: depend

data-vis-sdk-develop-build:
  extends: [ ".data-vis-sdk", ".develop-build" ]
  trigger:
    include:
      - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
        job: data-vis-sdk-develop-generate
    strategy: depend