VirtualBox

source: vbox/trunk/src/VBox/Additions/3D/mesa/mesa-24.0.2/.gitlab-ci/container/gitlab-ci.yml@ 103996

Last change on this file since 103996 was 103996, checked in by vboxsync, 13 months ago

Additions/3D/mesa: export mesa-24.0.2 to OSE. bugref:10606

File size: 14.8 KB
Line 
1# Docker image tag helper templates
2
3.incorporate-templates-commit:
4 variables:
5 FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
6
7.incorporate-base-tag+templates-commit:
8 variables:
9 FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
10 FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
11
12.set-image:
13 extends:
14 - .incorporate-templates-commit
15 variables:
16 MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
17 image: "$MESA_IMAGE"
18
19.set-image-base-tag:
20 extends:
21 - .set-image
22 - .incorporate-base-tag+templates-commit
23 variables:
24 MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
25
26# Build the CI docker images.
27#
28# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
29# image doesn't exist yet, the container stage job generates it.
30#
31# In order to generate a new image, one should generally change the tag.
32# While removing the image from the registry would also work, that's not
33# recommended except for ephemeral images during development: Replacing
34# an image after a significant amount of time might pull in newer
35# versions of gcc/clang or other packages, which might break the build
36# with older commits using the same tag.
37#
38# After merging a change resulting in generating a new image to the
39# main repository, it's recommended to remove the image from the source
40# repository's container registry, so that the image from the main
41# repository's registry will be used there as well.
42
43.debian-container:
44 variables:
45 FDO_DISTRIBUTION_VERSION: bookworm-slim
46
47.container:
48 stage: container
49 extends:
50 - .container+build-rules
51 - .incorporate-templates-commit
52 variables:
53 FDO_REPO_SUFFIX: $CI_JOB_NAME
54 FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
55 # no need to pull the whole repo to build the container image
56 GIT_STRATEGY: none
57
58.use-base-image:
59 extends:
60 - .container
61 - .incorporate-base-tag+templates-commit
62
63# Debian based x86_64 build image base
64debian/x86_64_build-base:
65 extends:
66 - .fdo.container-build@debian
67 - .container
68 - .debian-container
69 variables:
70 MESA_IMAGE_TAG: &debian-x86_64_build-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
71 rules:
72 # python-test requires debian/x86_64_build, which requires this job
73 - !reference [python-test, rules]
74 - !reference [.container, rules]
75
76.use-debian/x86_64_build-base:
77 extends:
78 - .fdo.container-build@debian
79 - .debian-container
80 - .use-base-image
81 variables:
82 MESA_BASE_IMAGE: ${DEBIAN_X86_64_BUILD_BASE_IMAGE}
83 MESA_BASE_TAG: *debian-x86_64_build-base
84 MESA_ARTIFACTS_BASE_TAG: *debian-x86_64_build-base
85 needs:
86 - debian/x86_64_build-base
87
88# Debian based x86_64 main build image
89debian/x86_64_build:
90 extends:
91 - .use-debian/x86_64_build-base
92 variables:
93 MESA_IMAGE_TAG: &debian-x86_64_build ${DEBIAN_BUILD_TAG}
94 rules:
95 # python-test requires this job
96 - !reference [python-test, rules]
97 - !reference [.use-debian/x86_64_build-base, rules]
98
99.use-debian/x86_64_build:
100 extends:
101 - .set-image-base-tag
102 variables:
103 MESA_BASE_TAG: *debian-x86_64_build-base
104 MESA_IMAGE_PATH: ${DEBIAN_X86_64_BUILD_IMAGE_PATH}
105 MESA_IMAGE_TAG: *debian-x86_64_build
106 needs:
107 - debian/x86_64_build
108
109# Debian based x86_32 cross-build image
110debian/x86_32_build:
111 extends:
112 - .use-debian/x86_64_build-base
113 variables:
114 MESA_IMAGE_TAG: &debian-x86_32_build ${DEBIAN_BUILD_TAG}
115
116.use-debian/x86_32_build:
117 extends:
118 - .set-image-base-tag
119 variables:
120 MESA_BASE_TAG: *debian-x86_64_build-base
121 MESA_IMAGE_PATH: "debian/x86_32_build"
122 MESA_IMAGE_TAG: *debian-x86_32_build
123 needs:
124 - debian/x86_32_build
125
126# Debian based ppc64el cross-build image
127debian/ppc64el_build:
128 extends:
129 - .use-debian/x86_64_build-base
130 variables:
131 MESA_IMAGE_TAG: &debian-ppc64el_build ${DEBIAN_BUILD_TAG}
132
133.use-debian/ppc64el_build:
134 extends:
135 - .set-image-base-tag
136 variables:
137 MESA_BASE_TAG: *debian-x86_64_build-base
138 MESA_IMAGE_PATH: "debian/ppc64el_build"
139 MESA_IMAGE_TAG: *debian-ppc64el_build
140 needs:
141 - debian/ppc64el_build
142
143# Debian based s390x cross-build image
144debian/s390x_build:
145 extends:
146 - .use-debian/x86_64_build-base
147 variables:
148 MESA_IMAGE_TAG: &debian-s390x_build ${DEBIAN_BUILD_TAG}
149
150.use-debian/s390x_build:
151 extends:
152 - .set-image-base-tag
153 variables:
154 MESA_BASE_TAG: *debian-x86_64_build-base
155 MESA_IMAGE_PATH: "debian/s390x_build"
156 MESA_IMAGE_TAG: *debian-s390x_build
157 needs:
158 - debian/s390x_build
159
160# Android NDK cross-build image
161debian/android_build:
162 extends:
163 - .use-debian/x86_64_build-base
164 variables:
165 MESA_IMAGE_TAG: &debian-android_build ${DEBIAN_BUILD_TAG}
166 ANDROID_SDK_VERSION: 33
167 ANDROID_NDK: android-ndk-r25b
168
169.use-debian/android_build:
170 extends:
171 - .set-image-base-tag
172 variables:
173 MESA_BASE_TAG: *debian-x86_64_build-base
174 MESA_IMAGE_PATH: "debian/android_build"
175 MESA_IMAGE_TAG: *debian-android_build
176 needs:
177 - debian/android_build
178
179# Debian based x86_64 test image base
180debian/x86_64_test-base:
181 extends: debian/x86_64_build-base
182 variables:
183 MESA_IMAGE_TAG: &debian-x86_64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${KERNEL_TAG}"
184
185.use-debian/x86_64_test-base:
186 extends:
187 - .fdo.container-build@debian
188 - .debian-container
189 - .use-base-image
190 variables:
191 MESA_BASE_IMAGE: ${DEBIAN_X86_64_TEST_BASE_IMAGE}
192 MESA_BASE_TAG: *debian-x86_64_test-base
193 needs:
194 - debian/x86_64_test-base
195
196# Debian based x86_64 test image for GL
197debian/x86_64_test-gl:
198 extends: .use-debian/x86_64_test-base
199 variables:
200 MESA_IMAGE_TAG: &debian-x86_64_test-gl ${DEBIAN_X86_64_TEST_GL_TAG}
201
202.use-debian/x86_64_test-gl:
203 extends:
204 - .set-image-base-tag
205 variables:
206 MESA_BASE_TAG: *debian-x86_64_test-base
207 MESA_IMAGE_PATH: ${DEBIAN_X86_64_TEST_IMAGE_GL_PATH}
208 MESA_IMAGE_TAG: *debian-x86_64_test-gl
209 needs:
210 - debian/x86_64_test-gl
211
212# Debian based x86_64 test image for VK
213debian/x86_64_test-vk:
214 extends: .use-debian/x86_64_test-base
215 variables:
216 MESA_IMAGE_TAG: &debian-x86_64_test-vk ${DEBIAN_X86_64_TEST_VK_TAG}
217
218.use-debian/x86_64_test-vk:
219 extends:
220 - .set-image-base-tag
221 variables:
222 MESA_BASE_TAG: *debian-x86_64_test-base
223 MESA_IMAGE_PATH: ${DEBIAN_X86_64_TEST_IMAGE_VK_PATH}
224 MESA_IMAGE_TAG: *debian-x86_64_test-vk
225 needs:
226 - debian/x86_64_test-vk
227
228# Debian based x86_64 test image for Android
229debian/x86_64_test-android:
230 extends: .use-debian/x86_64_test-base
231 variables:
232 MESA_IMAGE_TAG: &debian-x86_64_test-android ${DEBIAN_X86_64_TEST_ANDROID_TAG}
233 ANDROID_NDK: android-ndk-r25b
234
235.use-debian/x86_64_test-android:
236 extends:
237 - .set-image-base-tag
238 variables:
239 MESA_BASE_TAG: *debian-x86_64_test-base
240 MESA_IMAGE_PATH: ${DEBIAN_X86_64_TEST_ANDROID_IMAGE_PATH}
241 MESA_IMAGE_TAG: *debian-x86_64_test-android
242 needs:
243 - debian/x86_64_test-android
244
245# Debian based ARM build image
246debian/arm64_build:
247 extends:
248 - .fdo.container-build@debian
249 - .container
250 - .debian-container
251 tags:
252 - aarch64
253 variables:
254 MESA_IMAGE_TAG: &debian-arm64_build "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
255
256.use-debian/arm64_build:
257 extends:
258 - .set-image
259 variables:
260 MESA_IMAGE_PATH: "debian/arm64_build"
261 MESA_IMAGE_TAG: *debian-arm64_build
262 MESA_ARTIFACTS_TAG: *debian-arm64_build
263 needs:
264 - debian/arm64_build
265
266
267# Alpine based x86_64 build image
268.alpine/x86_64_build-base:
269 extends:
270 - .fdo.container-build@alpine
271 - .container
272 variables:
273 FDO_DISTRIBUTION_VERSION: "edge" # switch to 3.20 when gets released
274 FDO_BASE_IMAGE: alpine:$FDO_DISTRIBUTION_VERSION # since cbuild ignores it
275
276# Alpine based x86_64 build image
277alpine/x86_64_build:
278 extends:
279 - .alpine/x86_64_build-base
280 variables:
281 MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG}
282
283.use-alpine/x86_64_build:
284 extends:
285 - .set-image
286 variables:
287 MESA_IMAGE_PATH: "alpine/x86_64_build"
288 MESA_IMAGE_TAG: *alpine-x86_64_build
289 needs:
290 - alpine/x86_64_build
291
292# Alpine based x86_64 image for LAVA SSH dockerized client
293alpine/x86_64_lava_ssh_client:
294 extends:
295 - .alpine/x86_64_build-base
296 variables:
297 MESA_IMAGE_TAG: &alpine-x86_64_lava_ssh_client ${ALPINE_X86_64_LAVA_SSH_TAG}
298
299# Fedora based x86_64 build image
300fedora/x86_64_build:
301 extends:
302 - .fdo.container-build@fedora
303 - .container
304 variables:
305 FDO_DISTRIBUTION_VERSION: 38
306 MESA_IMAGE_TAG: &fedora-x86_64_build ${FEDORA_X86_64_BUILD_TAG}
307
308.use-fedora/x86_64_build:
309 extends:
310 - .set-image
311 variables:
312 MESA_IMAGE_PATH: "fedora/x86_64_build"
313 MESA_IMAGE_TAG: *fedora-x86_64_build
314 needs:
315 - fedora/x86_64_build
316
317
318.kernel+rootfs:
319 timeout: 2h # 24.0-only change
320 extends:
321 - .container+build-rules
322 - .debian-container
323 stage: container
324 variables:
325 GIT_STRATEGY: fetch
326 MESA_ROOTFS_TAG: &kernel-rootfs ${KERNEL_ROOTFS_TAG}
327 DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
328 script:
329 - .gitlab-ci/container/lava_build.sh
330
331kernel+rootfs_x86_64:
332 extends:
333 - .use-debian/x86_64_build-base
334 - .kernel+rootfs
335 image: "$FDO_BASE_IMAGE"
336 variables:
337 DEBIAN_ARCH: "amd64"
338 DISTRIBUTION_TAG: &distribution-tag-x86_64 "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
339
340kernel+rootfs_arm64:
341 extends:
342 - .use-debian/arm64_build
343 - .kernel+rootfs
344 tags:
345 - aarch64
346 variables:
347 DEBIAN_ARCH: "arm64"
348
349kernel+rootfs_arm32:
350 extends:
351 - kernel+rootfs_arm64
352 variables:
353 DEBIAN_ARCH: "armhf"
354
355# Cannot use anchors defined here from included files, so use extends: instead
356.use-kernel+rootfs-arm:
357 variables:
358 DISTRIBUTION_TAG: *distribution-tag-arm
359 MESA_ROOTFS_TAG: *kernel-rootfs
360
361.use-kernel+rootfs-x86_64:
362 variables:
363 DISTRIBUTION_TAG: *distribution-tag-x86_64
364 MESA_ROOTFS_TAG: *kernel-rootfs
365
366# x86_64 image with ARM64 & ARM32 kernel & rootfs for baremetal testing
367.debian/arm_test:
368 extends:
369 - .fdo.container-build@debian
370 - .container
371 - .debian-container
372 # Don't want the .container rules
373 - .container+build-rules
374 variables:
375 FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
376 ARTIFACTS_PREFIX: "https://${S3_HOST}/mesa-lava"
377 ARTIFACTS_SUFFIX: "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
378 MESA_ARTIFACTS_TAG: *debian-arm64_build
379 MESA_ROOTFS_TAG: *kernel-rootfs
380
381debian/arm32_test:
382 extends:
383 - .debian/arm_test
384 needs:
385 - kernel+rootfs_arm32
386 variables:
387 MESA_IMAGE_TAG: &debian-arm32_test "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
388
389debian/arm64_test:
390 extends:
391 - .debian/arm_test
392 needs:
393 - kernel+rootfs_arm64
394 variables:
395 MESA_IMAGE_TAG: &debian-arm64_test "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
396
397.use-debian/arm_test:
398 variables:
399 MESA_ROOTFS_TAG: *kernel-rootfs
400
401.use-debian/arm32_test:
402 image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
403 extends:
404 - .use-debian/arm_test
405 variables:
406 MESA_IMAGE_PATH: "debian/arm32_test"
407 MESA_IMAGE_TAG: *debian-arm32_test
408 needs:
409 - debian/arm_test
410
411.use-debian/arm64_test:
412 image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
413 extends:
414 - .use-debian/arm_test
415 variables:
416 MESA_IMAGE_PATH: "debian/arm64_test"
417 MESA_IMAGE_TAG: *debian-arm64_test
418 needs:
419 - debian/arm_test
420
421# Native Windows docker builds
422#
423# Unlike the above Linux-based builds - including MinGW builds which
424# cross-compile for Windows - which use the freedesktop ci-templates, we
425# cannot use the same scheme here. As Windows lacks support for
426# Docker-in-Docker, and Podman does not run natively on Windows, we have
427# to open-code much of the same ourselves.
428#
429# This is achieved by first running in a native Windows shell instance
430# (host PowerShell) in the container stage to build and push the image,
431# then in the build stage by executing inside Docker.
432
433.windows-docker-msvc:
434 variables:
435 MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}"
436 MESA_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MESA_IMAGE_PATH:${MESA_IMAGE_TAG}"
437 extends:
438 - .windows-docker-tags
439
440.windows_container_build:
441 inherit:
442 default: [retry]
443 extends:
444 - .container
445 - .windows-docker-msvc
446 - .windows-shell-tags
447 rules:
448 - !reference [.microsoft-farm-container-rules, rules]
449 - !reference [.container+build-rules, rules]
450 variables:
451 GIT_STRATEGY: fetch # we do actually need the full repository though
452 MESA_BASE_IMAGE: None
453 script:
454 - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $MESA_IMAGE $MESA_UPSTREAM_IMAGE ${DOCKERFILE} ${MESA_BASE_IMAGE}
455
456windows_msvc:
457 inherit:
458 default: [retry]
459 extends:
460 - .windows_container_build
461 variables:
462 MESA_IMAGE_PATH: &windows_msvc_image_path ${WINDOWS_X64_MSVC_PATH}
463 MESA_IMAGE_TAG: ${WINDOWS_X64_MSVC_TAG}
464 DOCKERFILE: Dockerfile_msvc
465 MESA_BASE_IMAGE: "mcr.microsoft.com/windows/server:ltsc2022"
466
467windows_build_msvc:
468 inherit:
469 default: [retry]
470 extends:
471 - .windows_container_build
472 rules:
473 - !reference [.microsoft-farm-rules, rules]
474 - !reference [.container+build-rules, rules]
475 variables:
476 MESA_IMAGE_PATH: &windows_build_image_path ${WINDOWS_X64_BUILD_PATH}
477 MESA_IMAGE_TAG: &windows_build_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_BUILD_TAG}
478 DOCKERFILE: Dockerfile_build
479 MESA_BASE_IMAGE_PATH: *windows_msvc_image_path
480 MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${WINDOWS_X64_MSVC_TAG}"
481 timeout: 2h 30m # LLVM takes ages
482 needs:
483 - windows_msvc
484
485windows_test_msvc:
486 inherit:
487 default: [retry]
488 extends:
489 - .windows_container_build
490 rules:
491 - !reference [.microsoft-farm-rules, rules]
492 - !reference [.container+build-rules, rules]
493 variables:
494 MESA_IMAGE_PATH: &windows_test_image_path ${WINDOWS_X64_TEST_PATH}
495 MESA_IMAGE_TAG: &windows_test_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_TEST_TAG}
496 DOCKERFILE: Dockerfile_test
497 MESA_BASE_IMAGE_PATH: *windows_msvc_image_path
498 MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${WINDOWS_X64_MSVC_TAG}"
499 timeout: 2h 30m
500 needs:
501 - windows_msvc
502
503.use-windows_build_msvc:
504 inherit:
505 default: [retry]
506 extends: .windows-docker-msvc
507 image: "$MESA_IMAGE"
508 variables:
509 MESA_IMAGE_PATH: *windows_build_image_path
510 MESA_IMAGE_TAG: *windows_build_image_tag
511 needs:
512 - windows_build_msvc
513
514.use-windows_test_msvc:
515 inherit:
516 default: [retry]
517 extends: .windows-docker-msvc
518 image: "$MESA_IMAGE"
519 variables:
520 MESA_IMAGE_PATH: *windows_test_image_path
521 MESA_IMAGE_TAG: *windows_test_image_tag
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette