forked from coreboot/coreboot
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.gitlab-ci.yml
308 lines (264 loc) · 5.9 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
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
services:
- docker:dind
variables:
RELEASE_DIR: ${CI_PROJECT_DIR}
stages:
- check_dependencies
- build_rom
- sign_rom
- publish_rom
- check_hw_matrix
- run_regression
check_dependencies:
stage: check_dependencies
script:
- git ls-remote https://github.com/pcengines/coreboot.git | grep ${CI_COMMIT_REF_NAME}
only:
- tags
.build_rom_apu: &build_rom_apu
image: coreboot/coreboot-sdk:2021-04-06_7014f8258e
variables:
PLATFORM:
stage: build_rom
tags:
- docker
script:
- git clone https://github.com/pcengines/pce-fw-builder.git /home/coreboot/pce-fw-builder
- cd /home/coreboot/pce-fw-builder
- git checkout `git describe --tags --abbrev=0`
- bash -x ./build.sh release-CI "${CI_COMMIT_REF_NAME}" "${PLATFORM}"
- cp -v /home/coreboot/${PLATFORM}_${CI_COMMIT_REF_NAME}.rom ${RELEASE_DIR}
artifacts:
name: ${PLATFORM}
paths:
- ${RELEASE_DIR}/${PLATFORM}_${CI_COMMIT_REF_NAME}.rom
only:
- tags
- web
.sign_rom: &sign_rom
variables:
PLATFORM:
stage: sign_rom
tags:
- docker
script:
- cd ${RELEASE_DIR}
- sha256sum ${PLATFORM}_${CI_COMMIT_REF_NAME}.rom > ${PLATFORM}_${CI_COMMIT_REF_NAME}.SHA256
- ls -la ${RELEASE_DIR}
artifacts:
name: ${PLATFORM}
paths:
- ${RELEASE_DIR}/${PLATFORM}_${CI_COMMIT_REF_NAME}.SHA256
only:
- tags
- web
.publish_rom: &publish_rom
variables:
PLATFORM:
stage: publish_rom
tags:
- docker
before_script:
- apt-get update
- apt-get -y install curl
script:
- ls -al ${RELEASE_DIR}
- curl -u ${UPLOADER_USERNAME}:${UPLOADER_PASSWORD} -X MKCOL ${UPLOADER_URL}/releases/
- curl -u ${UPLOADER_USERNAME}:${UPLOADER_PASSWORD} -X MKCOL "${UPLOADER_URL}/releases/${CI_COMMIT_REF_NAME}/"
- curl --fail -u ${UPLOADER_USERNAME}:${UPLOADER_PASSWORD} -T ${RELEASE_DIR}/${PLATFORM}_${CI_COMMIT_REF_NAME}.rom ${UPLOADER_URL}/releases/${CI_COMMIT_REF_NAME}/
- curl --fail -u ${UPLOADER_USERNAME}:${UPLOADER_PASSWORD} -T ${RELEASE_DIR}/${PLATFORM}_${CI_COMMIT_REF_NAME}.SHA256 ${UPLOADER_URL}/releases/${CI_COMMIT_REF_NAME}/
only:
- tags
.check_hw_matrix: &check_hw_matrix
image:
name: 3mdeb/rf-docker:1.2.0
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#overriding-the-entrypoint-of-an-image
# https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2692
# use EMPTY ENTRYPOINT for docker >17.06
entrypoint: [""]
variables:
PLATFORM:
RTE_IP:
CONFIG:
FIRMWARE_VERSION: $CI_COMMIT_REF_NAME
stage: check_hw_matrix
tags:
- local
timeout: 6h
script:
- mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- bash -x .gitlab-ci/check_hw_matrix.sh
only:
- tags
.run_regression: &run_regression
image:
name: 3mdeb/rf-docker:1.2.0
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#overriding-the-entrypoint-of-an-image
# https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2692
# use EMPTY ENTRYPOINT for docker >17.06
entrypoint: [""]
variables:
PLATFORM:
RTE_IP:
CONFIG:
AUTOFILL:
FIRMWARE_VERSION: $CI_COMMIT_REF_NAME
stage: run_regression
tags:
- local
timeout: 24h
script:
- mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- bash -x .gitlab-ci/regression.sh
only:
- tags
build:apu2:
<<: *build_rom_apu
variables:
PLATFORM: apu2
sign:apu2:
<<: *sign_rom
variables:
PLATFORM: apu2
publish:apu2:
<<: *publish_rom
variables:
PLATFORM: apu2
check_hw_matrix:apu2:
<<: *check_hw_matrix
variables:
PLATFORM: apu2
CONFIG: apu2
RTE_IP: $RTE_IP_APU2
regression:apu2:
<<: *run_regression
variables:
PLATFORM: apu2
CONFIG: apu2
RTE_IP: $RTE_IP_APU2
AUTOFILL: 1
build:apu3:
<<: *build_rom_apu
variables:
PLATFORM: apu3
sign:apu3:
<<: *sign_rom
variables:
PLATFORM: apu3
publish:apu3:
<<: *publish_rom
variables:
PLATFORM: apu3
check_hw_matrix:apu3:
<<: *check_hw_matrix
variables:
PLATFORM: apu3
CONFIG: apu3
RTE_IP: $RTE_IP_APU3
regression:apu3:
<<: *run_regression
variables:
PLATFORM: apu3
CONFIG: apu3
RTE_IP: $RTE_IP_APU3
AUTOFILL: 1
build:apu4:
<<: *build_rom_apu
variables:
PLATFORM: apu4
sign:apu4:
<<: *sign_rom
variables:
PLATFORM: apu4
publish:apu4:
<<: *publish_rom
variables:
PLATFORM: apu4
check_hw_matrix:apu4:
<<: *check_hw_matrix
variables:
PLATFORM: apu4
CONFIG: apu4
RTE_IP: $RTE_IP_APU4
regression:apu4:
<<: *run_regression
variables:
PLATFORM: apu4
CONFIG: apu4
RTE_IP: $RTE_IP_APU4
AUTOFILL: 1
build:apu5:
<<: *build_rom_apu
variables:
PLATFORM: apu5
sign:apu5:
<<: *sign_rom
variables:
PLATFORM: apu5
publish:apu5:
<<: *publish_rom
variables:
PLATFORM: apu5
check_hw_matrix:apu5:
<<: *check_hw_matrix
variables:
PLATFORM: apu5
CONFIG: apu5
RTE_IP: $RTE_IP_APU5
regression:apu5:
<<: *run_regression
variables:
PLATFORM: apu5
CONFIG: apu5
RTE_IP: $RTE_IP_APU5
AUTOFILL: 1
build:apu6:
<<: *build_rom_apu
variables:
PLATFORM: apu6
sign:apu6:
<<: *sign_rom
variables:
PLATFORM: apu6
publish:apu6:
<<: *publish_rom
variables:
PLATFORM: apu6
check_hw_matrix:apu6:
<<: *check_hw_matrix
variables:
PLATFORM: apu6
CONFIG: apu6
RTE_IP: $RTE_IP_APU6
regression:apu6:
<<: *run_regression
variables:
PLATFORM: apu6
CONFIG: apu6
RTE_IP: $RTE_IP_APU6
AUTOFILL: 1
build:apu7:
<<: *build_rom_apu
variables:
PLATFORM: apu7
sign:apu7:
<<: *sign_rom
variables:
PLATFORM: apu7
publish:apu7:
<<: *publish_rom
variables:
PLATFORM: apu7
check_hw_matrix:apu7:
<<: *check_hw_matrix
variables:
PLATFORM: apu7
CONFIG: apu7
RTE_IP: $RTE_IP_APU7
regression:apu7:
<<: *run_regression
variables:
PLATFORM: apu7
CONFIG: apu7
RTE_IP: $RTE_IP_APU7
AUTOFILL: 1