• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Shared between windows and Linux
2.build-common:
3  extends: .container+build-rules
4  # Cancel job if a newer commit is pushed to the same branch
5  interruptible: true
6  variables:
7    # Build jobs don't take more than 1-3 minutes. 5-8 min max on a fresh runner
8    # without a populated ccache.
9    # These jobs are never slow, either they finish within reasonable time or
10    # something has gone wrong and the job will never terminate, so we should
11    # instead timeout so that the retry mechanism can kick in.
12    # A few exception are made, see overrides in the rest of this file.
13    BUILD_JOB_TIMEOUT: 15m
14    RUN_MESON_TESTS: "true"
15  timeout: 1h
16  # We don't want to download any previous job's artifacts
17  dependencies: []
18  artifacts:
19    name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
20    when: always
21    paths:
22      - _build/meson-logs/*.txt
23      - _build/meson-logs/strace
24      - _build/.ninja_log
25      - artifacts
26
27# Just Linux
28.build-linux:
29  extends: .build-common
30  variables:
31    CCACHE_COMPILERCHECK: "content"
32    CCACHE_COMPRESS: "true"
33    CCACHE_DIR: /cache/mesa/ccache
34  # Use ccache transparently, and print stats before/after
35  before_script:
36    - !reference [default, before_script]
37    - |
38      export PATH="/usr/lib/ccache:$PATH"
39      export CCACHE_BASEDIR="$PWD"
40      if test -x /usr/bin/ccache; then
41        section_start ccache_before "ccache stats before build"
42        ccache --show-stats
43        section_end ccache_before
44      fi
45  after_script:
46    - if test -x /usr/bin/ccache; then ccache --show-stats | grep "Hits:"; fi
47    - !reference [default, after_script]
48
49.build-windows:
50  extends:
51    - .build-common
52    - .windows-docker-tags
53  cache:
54    key: ${CI_JOB_NAME}
55    paths:
56      - subprojects/packagecache
57
58.meson-build:
59  extends:
60    - .build-linux
61    - .use-debian/x86_64_build
62  stage: build-only
63  script:
64    - &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} .gitlab-ci/meson/build.sh
65
66
67# Make sure this list stays the same as all the jobs with
68# `stage: build-for-tests`, except for the windows job as
69# explained below.
70.build-for-tests-jobs:
71  - job: debian-testing
72    optional: true
73  - job: debian-testing-asan
74    optional: true
75  - job: debian-testing-ubsan
76    optional: true
77  - job: debian-build-testing
78    optional: true
79  - job: debian-arm32
80    optional: true
81  - job: debian-arm32-asan
82    optional: true
83  - job: debian-arm64
84    optional: true
85  - job: debian-arm64-asan
86    optional: true
87  # Windows runners don't have more than one build right now, so there is
88  # no need to wait on the "first one" to be done.
89  # - job: windows-msvc
90  #   optional: true
91  - job: python-artifacts
92    optional: true
93
94
95debian-testing:
96  extends:
97    - .meson-build
98    - .ci-deqp-artifacts
99  stage: build-for-tests
100  variables:
101    BUILD_JOB_TIMEOUT: 30m
102    UNWIND: "enabled"
103    DRI_LOADERS: >
104      -D egl=enabled
105      -D gbm=enabled
106      -D glvnd=disabled
107      -D glx=dri
108      -D platforms=x11,wayland
109    GALLIUM_ST: >
110      -D gallium-nine=false
111      -D gallium-rusticl=true
112      -D gallium-va=enabled
113    GALLIUM_DRIVERS: "llvmpipe,softpipe,virgl,radeonsi,zink,iris,svga"
114    VULKAN_DRIVERS: "swrast,amd,intel,virtio"
115    BUILDTYPE: "debugoptimized"
116    EXTRA_OPTION: >
117      -D intel-elk=false
118      -D spirv-to-dxil=true
119      -D tools=drm-shim
120      -D valgrind=disabled
121    S3_ARTIFACT_NAME: mesa-x86_64-default-${BUILDTYPE}
122    RUN_MESON_TESTS: "false" # debian-build-testing already runs these
123  script:
124    - *meson-build
125    - .gitlab-ci/prepare-artifacts.sh
126  artifacts:
127    reports:
128      junit: artifacts/ci_scripts_report.xml
129
130debian-testing-asan:
131  extends:
132    - debian-testing
133  stage: build-for-tests
134  variables:
135    BUILD_JOB_TIMEOUT: 30m
136    VULKAN_DRIVERS: "swrast"
137    GALLIUM_DRIVERS: "llvmpipe,softpipe"
138    C_ARGS: >
139      -Wno-error=stringop-truncation
140    EXTRA_OPTION: >
141      -D b_sanitize=address
142      -D gallium-va=false
143      -D gallium-nine=false
144      -D gallium-rusticl=false
145      -D mesa-clc=system
146      -D tools=dlclose-skip
147      -D valgrind=disabled
148    S3_ARTIFACT_NAME: ""
149    ARTIFACTS_DEBUG_SYMBOLS: 1
150    RUN_MESON_TESTS: "false" # just too slow
151    # Do a host build for mesa-clc (asan complains not being loaded as
152    # the first library)
153    HOST_BUILD_OPTIONS: >
154      -D build-tests=false
155      -D enable-glcpp-tests=false
156      -D gallium-opencl=disabled
157      -D gallium-rusticl=false
158      -D gallium-nine=false
159      -D gallium-drivers=
160      -D glx=disabled
161      -D install-mesa-clc=true
162      -D mesa-clc=enabled
163      -D platforms=
164      -D video-codecs=
165      -D vulkan-drivers=
166
167debian-testing-msan:
168  # https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo
169  # msan cannot fully work until it's used together with msan libc
170  extends:
171    - debian-clang
172  # `needs:` inherited from debian-clang
173  variables:
174    BUILD_JOB_TIMEOUT: 30m
175    # l_undef is incompatible with msan
176    EXTRA_OPTION:
177      -D b_sanitize=memory
178      -D b_lundef=false
179      -D mesa-clc=system
180    S3_ARTIFACT_NAME: ""
181    ARTIFACTS_DEBUG_SYMBOLS: 1
182    # Don't run all the tests yet:
183    # GLSL has some issues in sexpression reading.
184    # gtest has issues in its test initialization.
185    MESON_TEST_ARGS: "--suite glcpp --suite format"
186    GALLIUM_DRIVERS: "freedreno,iris,nouveau,r300,r600,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
187    VULKAN_DRIVERS: intel,amd,broadcom,virtio
188    RUN_MESON_TESTS: "false" # just too slow
189    # Do a host build for mesa-clc (msan complains about uninitialized
190    # values in the LLVM libs)
191    HOST_BUILD_OPTIONS: >
192      -D build-tests=false
193      -D enable-glcpp-tests=false
194      -D gallium-opencl=disabled
195      -D gallium-drivers=
196      -D vulkan-drivers=
197      -D video-codecs=
198      -D glx=disabled
199      -D platforms=
200      -D mesa-clc=enabled
201      -D install-mesa-clc=true
202
203debian-testing-ubsan:
204  extends:
205    - debian-testing
206  stage: build-for-tests
207  timeout: 40m
208  variables:
209    BUILD_JOB_TIMEOUT: 30m
210    C_ARGS: >
211      -Wno-error=stringop-overflow
212      -Wno-error=stringop-truncation
213    CPP_ARGS: >
214      -Wno-error=array-bounds
215    GALLIUM_DRIVERS: "swrast"
216    VULKAN_DRIVERS: "swrast"
217    EXTRA_OPTION: >
218      -D b_sanitize=undefined
219      -D mesa-clc=system
220      -D gallium-rusticl=false
221      -D gallium-va=false
222      -D gallium-nine=false
223    S3_ARTIFACT_NAME: ""
224    ARTIFACTS_DEBUG_SYMBOLS: 1
225    RUN_MESON_TESTS: "false" # just too slow
226    HOST_BUILD_OPTIONS: >
227      -D build-tests=false
228      -D enable-glcpp-tests=false
229      -D gallium-opencl=disabled
230      -D gallium-rusticl=false
231      -D gallium-drivers=
232      -D vulkan-drivers=
233      -D video-codecs=
234      -D glx=disabled
235      -D platforms=
236      -D mesa-clc=enabled
237      -D install-mesa-clc=true
238
239debian-build-testing:
240  extends: .meson-build
241  stage: build-for-tests
242  variables:
243    UNWIND: "enabled"
244    DRI_LOADERS: >
245      -D glx=dri
246      -D gbm=enabled
247      -D egl=enabled
248      -D glvnd=disabled
249      -D platforms=x11,wayland
250    GALLIUM_ST: >
251      -D gallium-extra-hud=true
252      -D gallium-vdpau=enabled
253      -D gallium-va=enabled
254      -D gallium-xa=enabled
255      -D gallium-nine=true
256      -D gallium-rusticl=false
257    GALLIUM_DRIVERS: "i915,iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
258    VULKAN_DRIVERS: "intel_hasvk,imagination-experimental,microsoft-experimental,nouveau,swrast"
259    BUILDTYPE: "debugoptimized"
260    EXTRA_OPTION: >
261      -D spirv-to-dxil=true
262      -D osmesa=true
263      -D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi
264      -D perfetto=true
265    S3_ARTIFACT_NAME: debian-build-testing
266  script:
267    - *meson-build
268    - .gitlab-ci/prepare-artifacts.sh
269
270shader-db:
271  stage: code-validation
272  extends:
273    - .use-debian/x86_64_build
274  rules:
275    - !reference [.never-post-merge-rules, rules]
276    - !reference [.core-rules, rules]
277    # Keep this list in sync with the drivers tested in run-shader-db.sh
278    - !reference [.freedreno-common-rules, rules]
279    - !reference [.intel-common-rules, rules]
280    - !reference [.lima-rules, rules]
281    - !reference [.v3d-rules, rules]
282    - !reference [.vc4-rules, rules]
283    - !reference [.nouveau-rules, rules]
284    - !reference [.r300-rules, rules]
285    # Also run if this job's own config or script changes
286    - changes:
287        - .gitlab-ci/build/gitlab-ci.yml
288        - .gitlab-ci/run-shader-db.sh
289  needs:
290    - debian-build-testing
291  variables:
292    S3_ARTIFACT_NAME: debian-build-testing
293  before_script:
294    - !reference [.download_s3, before_script]
295  script: |
296    .gitlab-ci/run-shader-db.sh
297  artifacts:
298    paths:
299      - shader-db
300  timeout: 15m
301
302# Test a release build with -Werror so new warnings don't sneak in.
303debian-release:
304  extends: .meson-build
305  needs:
306    - !reference [.meson-build, needs]
307    - !reference [.build-for-tests-jobs]
308  variables:
309    UNWIND: "enabled"
310    C_ARGS: >
311      -Wno-error=stringop-overread
312    DRI_LOADERS: >
313      -D glx=dri
314      -D gbm=enabled
315      -D egl=enabled
316      -D glvnd=disabled
317      -D platforms=x11,wayland
318    GALLIUM_ST: >
319      -D gallium-extra-hud=true
320      -D gallium-vdpau=enabled
321      -D gallium-va=enabled
322      -D gallium-xa=enabled
323      -D gallium-nine=false
324      -D gallium-rusticl=false
325      -D llvm=enabled
326    GALLIUM_DRIVERS: "i915,iris,nouveau,r300,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
327    VULKAN_DRIVERS: "swrast,intel_hasvk,imagination-experimental,microsoft-experimental"
328    EXTRA_OPTION: >
329      -D spirv-to-dxil=true
330      -D osmesa=true
331      -D tools=all
332      -D mesa-clc=enabled
333      -D intel-rt=enabled
334      -D imagination-srv=true
335    BUILDTYPE: "release"
336    S3_ARTIFACT_NAME: "mesa-x86_64-default-${BUILDTYPE}"
337  script:
338    - *meson-build
339    - 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
340
341alpine-build-testing:
342  extends:
343    - .meson-build
344    - .use-alpine/x86_64_build
345  needs:
346    - !reference [.use-alpine/x86_64_build, needs]
347    - !reference [.build-for-tests-jobs]
348  variables:
349    BUILD_JOB_TIMEOUT: 30m
350    BUILDTYPE: "release"
351    C_ARGS: >
352      -Wno-error=cpp
353      -Wno-error=array-bounds
354      -Wno-error=stringop-overflow
355      -Wno-error=stringop-overread
356    DRI_LOADERS: >
357      -D glx=disabled
358      -D gbm=enabled
359      -D egl=enabled
360      -D glvnd=disabled
361      -D platforms=wayland
362    GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,iris,lima,nouveau,panfrost,r300,r600,radeonsi,svga,llvmpipe,softpipe,tegra,v3d,vc4,virgl,zink"
363    GALLIUM_ST: >
364      -D gallium-extra-hud=true
365      -D gallium-vdpau=disabled
366      -D gallium-va=enabled
367      -D gallium-xa=disabled
368      -D gallium-nine=true
369      -D gallium-rusticl=false
370      -D gles1=disabled
371      -D gles2=enabled
372      -D llvm=enabled
373      -D llvm-orcjit=true
374      -D microsoft-clc=disabled
375      -D shared-llvm=enabled
376    UNWIND: "disabled"
377    VULKAN_DRIVERS: "amd,asahi,broadcom,freedreno,intel,imagination-experimental"
378
379fedora-release:
380  extends:
381    - .meson-build
382    - .use-fedora/x86_64_build
383  needs:
384    - !reference [.use-fedora/x86_64_build, needs]
385    - !reference [.build-for-tests-jobs]
386  variables:
387    BUILDTYPE: "release"
388    # array-bounds are pure non-LTO gcc buggy warning
389    # maybe-uninitialized is misfiring in nir_lower_gs_intrinsics.c, and
390    # a "maybe" warning should never be an error anyway.
391    C_ARGS: >
392      -Wno-error=stringop-overflow
393      -Wno-error=stringop-overread
394      -Wno-error=array-bounds
395      -Wno-error=maybe-uninitialized
396    CPP_ARGS: >
397      -Wno-error=dangling-reference
398      -Wno-error=overloaded-virtual
399    DRI_LOADERS: >
400      -D glx=dri
401      -D gbm=enabled
402      -D egl=enabled
403      -D glvnd=enabled
404      -D platforms=x11,wayland
405    EXTRA_OPTION: >
406      -D osmesa=true
407      -D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,imagination
408      -D vulkan-layers=device-select,overlay
409      -D intel-rt=enabled
410      -D imagination-srv=true
411      -D teflon=true
412    GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,i915,iris,lima,nouveau,panfrost,r300,r600,radeonsi,svga,llvmpipe,softpipe,tegra,v3d,vc4,virgl,zink"
413    GALLIUM_ST: >
414      -D gallium-extra-hud=true
415      -D gallium-vdpau=enabled
416      -D gallium-va=enabled
417      -D gallium-xa=enabled
418      -D gallium-nine=false
419      -D gallium-rusticl=true
420      -D gles1=disabled
421      -D gles2=enabled
422      -D llvm=enabled
423      -D microsoft-clc=disabled
424      -D shared-llvm=enabled
425    UNWIND: "disabled"
426    VULKAN_DRIVERS: "amd,asahi,broadcom,freedreno,imagination-experimental,intel,intel_hasvk"
427
428debian-android:
429  extends:
430    - .android-variables
431    - .meson-cross
432    - .use-debian/android_build
433    - .ci-deqp-artifacts
434  needs:
435    - !reference [.use-debian/android_build, needs]
436    - !reference [.build-for-tests-jobs]
437  variables:
438    BUILDTYPE: debug
439    UNWIND: "disabled"
440    C_ARGS: >
441      -Wno-error=asm-operand-widths
442      -Wno-error=constant-conversion
443      -Wno-error=enum-conversion
444      -Wno-error=initializer-overrides
445      -Wno-error=sometimes-uninitialized
446    CPP_ARGS: >
447      -Wno-error=c99-designator
448      -Wno-error=unused-variable
449      -Wno-error=unused-but-set-variable
450      -Wno-error=self-assign
451    DRI_LOADERS: >
452      -D glx=disabled
453      -D gbm=disabled
454      -D egl=enabled
455      -D glvnd=disabled
456      -D platforms=android
457    FORCE_FALLBACK_FOR: llvm
458    EXTRA_OPTION: >
459      -D android-stub=true
460      -D platform-sdk-version=${ANDROID_SDK_VERSION}
461      -D cpp_rtti=false
462      -D valgrind=disabled
463      -D android-libbacktrace=disabled
464      -D mesa-clc=system
465    GALLIUM_ST: >
466      -D gallium-vdpau=disabled
467      -D gallium-va=disabled
468      -D gallium-xa=disabled
469      -D gallium-nine=false
470      -D gallium-rusticl=false
471    PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files"
472    HOST_BUILD_OPTIONS: >
473      -D build-tests=false
474      -D enable-glcpp-tests=false
475      -D gallium-opencl=disabled
476      -D gallium-drivers=
477      -D vulkan-drivers=
478      -D video-codecs=
479      -D glx=disabled
480      -D platforms=
481      -D mesa-clc=enabled
482      -D install-mesa-clc=true
483    ARTIFACTS_DEBUG_SYMBOLS: 1
484    S3_ARTIFACT_NAME: mesa-x86_64-android-${BUILDTYPE}
485  script:
486    - export CROSS=aarch64-linux-android
487    - export GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d
488    - export VULKAN_DRIVERS=freedreno,broadcom,virtio
489    - *meson-build
490    # x86_64 build:
491    # Can't do AMD drivers because they require LLVM, which is currently
492    # problematic in our Android builds.
493    - export CROSS=x86_64-linux-android
494    - export GALLIUM_DRIVERS=iris,virgl,zink,softpipe,llvmpipe,swrast
495    - export VULKAN_DRIVERS=intel,virtio,swrast
496    - .gitlab-ci/create-llvm-meson-wrap-file.sh
497    - *meson-build
498    - .gitlab-ci/prepare-artifacts.sh
499
500.meson-cross:
501  extends:
502    - .meson-build
503  variables:
504    UNWIND: "disabled"
505    DRI_LOADERS: >
506      -D glx=dri
507      -D gbm=enabled
508      -D egl=enabled
509      -D platforms=x11,wayland
510      -D osmesa=false
511    GALLIUM_ST: >
512      -D gallium-vdpau=disabled
513      -D gallium-va=disabled
514      -D gallium-xa=disabled
515      -D gallium-nine=false
516
517.meson-arm:
518  extends:
519    - .meson-cross
520    - .use-debian/arm64_build
521  needs:
522    - debian/arm64_build
523  variables:
524    VULKAN_DRIVERS: "asahi,broadcom,freedreno"
525    GALLIUM_DRIVERS: "etnaviv,freedreno,lima,nouveau,panfrost,llvmpipe,softpipe,tegra,v3d,vc4,zink"
526    BUILDTYPE: "debugoptimized"
527  tags:
528    - aarch64
529
530debian-arm32:
531  extends:
532    - .meson-arm
533    - .ci-deqp-artifacts
534  stage: build-for-tests
535  variables:
536    CROSS: armhf
537    DRI_LOADERS:
538      -D glvnd=disabled
539    # remove asahi & llvmpipe from the .meson-arm list because here we have llvm=disabled
540    VULKAN_DRIVERS: "broadcom,freedreno"
541    GALLIUM_DRIVERS: "etnaviv,freedreno,lima,nouveau,panfrost,softpipe,tegra,v3d,vc4,zink"
542    EXTRA_OPTION: >
543      -D llvm=disabled
544      -D valgrind=disabled
545      -D gallium-rusticl=false
546    S3_ARTIFACT_NAME: mesa-arm32-default-${BUILDTYPE}
547    # The strip command segfaults, failing to strip the binary and leaving
548    # tempfiles in our artifacts.
549    ARTIFACTS_DEBUG_SYMBOLS: 1
550  script:
551    - *meson-build
552    - .gitlab-ci/prepare-artifacts.sh
553
554debian-arm32-asan:
555  extends:
556    - debian-arm32
557  stage: build-for-tests
558  variables:
559    BUILD_JOB_TIMEOUT: 30m
560    GALLIUM_DRIVERS: "etnaviv"
561    VULKAN_DRIVERS: ""
562    DRI_LOADERS:
563      -D glvnd=disabled
564    EXTRA_OPTION: >
565      -D llvm=disabled
566      -D b_sanitize=address
567      -D valgrind=disabled
568      -D tools=dlclose-skip
569      -D gallium-rusticl=false
570    ARTIFACTS_DEBUG_SYMBOLS: 1
571    RUN_MESON_TESTS: "false" # just too slow
572    S3_ARTIFACT_NAME: mesa-arm32-asan-${BUILDTYPE}
573
574debian-arm64:
575  extends:
576    - .meson-arm
577    - .ci-deqp-artifacts
578  stage: build-for-tests
579  variables:
580    C_ARGS: >
581      -Wno-error=array-bounds
582      -Wno-error=stringop-truncation
583    GALLIUM_DRIVERS: "etnaviv,freedreno,lima,panfrost,v3d,vc4,zink"
584    VULKAN_DRIVERS: "broadcom,freedreno,panfrost"
585    DRI_LOADERS:
586      -D glvnd=disabled
587    EXTRA_OPTION: >
588      -D valgrind=disabled
589      -D imagination-srv=true
590      -D freedreno-kmds=msm,virtio
591      -D teflon=true
592    GALLIUM_ST:
593      -D gallium-rusticl=true
594    RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing
595    S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
596  script:
597    - *meson-build
598    - .gitlab-ci/prepare-artifacts.sh
599
600debian-arm64-asan:
601  extends:
602    - debian-arm64
603  stage: build-for-tests
604  variables:
605    BUILD_JOB_TIMEOUT: 30m
606    VULKAN_DRIVERS: "broadcom,freedreno"
607    GALLIUM_DRIVERS: "freedreno,vc4,v3d"
608    DRI_LOADERS:
609      -D glvnd=disabled
610    EXTRA_OPTION: >
611      -D b_sanitize=address
612      -D valgrind=disabled
613      -D tools=dlclose-skip
614      -D gallium-rusticl=false
615    ARTIFACTS_DEBUG_SYMBOLS: 1
616    RUN_MESON_TESTS: "false" # just too slow
617    S3_ARTIFACT_NAME: mesa-arm64-asan-${BUILDTYPE}
618
619debian-arm64-ubsan:
620  extends:
621    - debian-arm64
622  stage: build-for-tests
623  variables:
624    BUILD_JOB_TIMEOUT: 30m
625    VULKAN_DRIVERS: "broadcom"
626    GALLIUM_DRIVERS: "v3d,vc4"
627    C_ARGS: >
628      -Wno-error=array-bounds
629      -Wno-error=stringop-overflow
630      -Wno-error=stringop-truncation
631    CPP_ARGS: >
632      -Wno-error=array-bounds
633      -fno-var-tracking-assignments
634    DRI_LOADERS:
635      -D glvnd=disabled
636    EXTRA_OPTION: >
637      -D b_sanitize=undefined
638      -D gallium-rusticl=false
639    ARTIFACTS_DEBUG_SYMBOLS: 1
640    RUN_MESON_TESTS: "false" # just too slow
641    S3_ARTIFACT_NAME: mesa-arm64-ubsan-${BUILDTYPE}
642
643debian-arm64-build-test:
644  extends:
645    - .meson-arm
646    - .ci-deqp-artifacts
647  needs:
648    - !reference [.meson-arm, needs]
649    - !reference [.build-for-tests-jobs]
650  variables:
651    VULKAN_DRIVERS: "amd,asahi,imagination-experimental,nouveau"
652    DRI_LOADERS:
653      -D glvnd=disabled
654    EXTRA_OPTION: >
655      -D tools=panfrost,imagination
656      -D perfetto=true
657
658debian-arm64-release:
659  extends:
660    - debian-arm64
661  stage: build-only
662  needs:
663    - !reference [debian-arm64, needs]
664    - !reference [.build-for-tests-jobs]
665  variables:
666    BUILDTYPE: release
667    S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
668    C_ARGS: >
669      -Wno-error=array-bounds
670      -Wno-error=stringop-truncation
671      -Wno-error=stringop-overread
672  script:
673    - *meson-build
674    - 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
675
676debian-no-libdrm:
677  extends:
678    - .meson-arm
679  stage: build-only
680  needs:
681    - !reference [.meson-arm, needs]
682    - !reference [.build-for-tests-jobs]
683  variables:
684    VULKAN_DRIVERS: freedreno
685    GALLIUM_DRIVERS: "zink,llvmpipe"
686    BUILDTYPE: release
687    C_ARGS: >
688      -Wno-error=array-bounds
689      -Wno-error=stringop-truncation
690      -Wno-error=stringop-overread
691    EXTRA_OPTION: >
692      -D freedreno-kmds=kgsl
693      -D glx=disabled
694      -D gbm=disabled
695      -D egl=disabled
696
697debian-clang:
698  extends: .meson-build
699  needs:
700    - !reference [.meson-build, needs]
701    - !reference [.build-for-tests-jobs]
702  variables:
703    BUILDTYPE: debug
704    UNWIND: "enabled"
705    C_ARGS: >
706      -Wno-error=constant-conversion
707      -Wno-error=enum-conversion
708      -Wno-error=initializer-overrides
709      -Wno-error=sometimes-uninitialized
710      -Werror=misleading-indentation
711    CPP_ARGS: >
712      -Wno-error=c99-designator
713      -Wno-error=overloaded-virtual
714      -Wno-error=tautological-constant-out-of-range-compare
715      -Wno-error=unused-private-field
716      -Wno-error=vla-cxx-extension
717    DRI_LOADERS: >
718      -D glx=dri
719      -D gbm=enabled
720      -D egl=enabled
721      -D glvnd=enabled
722      -D platforms=x11,wayland
723    GALLIUM_ST: >
724      -D gallium-extra-hud=true
725      -D gallium-vdpau=enabled
726      -D gallium-va=enabled
727      -D gallium-xa=enabled
728      -D gallium-nine=true
729      -D gles1=enabled
730      -D gles2=enabled
731      -D llvm=enabled
732      -D microsoft-clc=disabled
733      -D shared-llvm=enabled
734      -D shared-glapi=enabled
735    GALLIUM_DRIVERS: "iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus,i915,asahi"
736    VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio,swrast,panfrost,imagination-experimental,microsoft-experimental,nouveau
737    EXTRA_OPTION:
738      -D spirv-to-dxil=true
739      -D osmesa=true
740      -D imagination-srv=true
741      -D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi,imagination
742      -D vulkan-layers=device-select,overlay
743      -D build-aco-tests=true
744      -D mesa-clc=enabled
745      -D intel-rt=enabled
746      -D imagination-srv=true
747      -D teflon=true
748    CC: clang-${LLVM_VERSION}
749    CXX: clang++-${LLVM_VERSION}
750
751debian-clang-release:
752  extends: debian-clang
753  # `needs:` inherited from debian-clang
754  variables:
755    BUILD_JOB_TIMEOUT: 30m
756    BUILDTYPE: "release"
757    DRI_LOADERS: >
758      -D glx=xlib
759      -D platforms=x11,wayland
760    GALLIUM_ST: >
761      -D gallium-extra-hud=true
762      -D gallium-vdpau=enabled
763      -D gallium-va=enabled
764      -D gallium-xa=enabled
765      -D gallium-nine=true
766      -D gles1=disabled
767      -D gles2=disabled
768      -D llvm=enabled
769      -D microsoft-clc=disabled
770      -D shared-llvm=enabled
771      -D shared-glapi=disabled
772
773windows-msvc:
774  extends:
775    - .build-windows
776    - .use-windows_build_msvc
777    - .windows-build-rules
778  stage: build-for-tests
779  script:
780    - pwsh -ExecutionPolicy RemoteSigned .\.gitlab-ci\windows\mesa_build.ps1
781  artifacts:
782    paths:
783      - _build/meson-logs/*.txt
784      - _install/
785
786debian-vulkan:
787  extends: .meson-build
788  needs:
789    - !reference [.meson-build, needs]
790    - !reference [.build-for-tests-jobs]
791  variables:
792    BUILD_JOB_TIMEOUT: 30m
793    BUILDTYPE: debug
794    UNWIND: "disabled"
795    DRI_LOADERS: >
796      -D glx=disabled
797      -D gbm=disabled
798      -D egl=disabled
799      -D opengl=false
800      -D gles1=disabled
801      -D gles2=disabled
802      -D glvnd=disabled
803      -D platforms=x11,wayland
804      -D osmesa=false
805    GALLIUM_ST: >
806      -D gallium-vdpau=disabled
807      -D gallium-va=disabled
808      -D gallium-xa=disabled
809      -D gallium-nine=false
810      -D gallium-rusticl=false
811      -D b_sanitize=undefined
812      -D c_args=-fno-sanitize-recover=all
813      -D cpp_args=-fno-sanitize-recover=all
814    UBSAN_OPTIONS: "print_stacktrace=1"
815    VULKAN_DRIVERS: amd,asahi,broadcom,freedreno,intel,intel_hasvk,panfrost,virtio,imagination-experimental,microsoft-experimental,nouveau
816    EXTRA_OPTION: >
817      -D vulkan-layers=device-select,overlay
818      -D build-aco-tests=true
819      -D intel-rt=disabled
820      -D imagination-srv=true
821
822debian-x86_32:
823  extends:
824    - .meson-cross
825    - .use-debian/x86_32_build
826  needs:
827    - !reference [.use-debian/x86_32_build, needs]
828    - !reference [.build-for-tests-jobs]
829  variables:
830    BUILDTYPE: debug
831    CROSS: i386
832    VULKAN_DRIVERS: intel,amd,swrast,virtio,panfrost
833    GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,llvmpipe,softpipe,virgl,zink,crocus,d3d12,panfrost"
834    DRI_LOADERS:
835      -D glvnd=disabled
836    EXTRA_OPTION: >
837      -D vulkan-layers=device-select,overlay
838      -D mesa-clc=system
839    C_LINK_ARGS: >
840      -Wl,--no-warn-rwx-segments
841    CPP_LINK_ARGS: >
842      -Wl,--no-warn-rwx-segments
843    HOST_BUILD_OPTIONS: >
844      -D build-tests=false
845      -D enable-glcpp-tests=false
846      -D gallium-opencl=disabled
847      -D gallium-drivers=
848      -D vulkan-drivers=
849      -D video-codecs=
850      -D glx=disabled
851      -D platforms=
852      -D mesa-clc=enabled
853      -D install-mesa-clc=true
854
855# While s390 is dead, s390x is very much alive, and one of the last major
856# big-endian platforms, so it provides useful coverage.
857# In case of issues with this job, contact @ajax
858debian-s390x:
859  extends:
860    - .meson-cross
861    - .use-debian/s390x_build
862  needs:
863    - !reference [.use-debian/s390x_build, needs]
864    - !reference [.build-for-tests-jobs]
865  tags:
866    - kvm
867  variables:
868    BUILDTYPE: debug
869    CROSS: s390x
870    GALLIUM_DRIVERS: "llvmpipe,virgl,zink"
871    VULKAN_DRIVERS: "swrast,virtio"
872    DRI_LOADERS:
873      -D glvnd=disabled
874
875debian-ppc64el:
876  extends:
877    - .meson-cross
878    - .use-debian/ppc64el_build
879  needs:
880    - !reference [.use-debian/ppc64el_build, needs]
881    - !reference [.build-for-tests-jobs]
882  variables:
883    BUILDTYPE: debug
884    CROSS: ppc64el
885    GALLIUM_DRIVERS: "nouveau,radeonsi,llvmpipe,softpipe,virgl,zink"
886    VULKAN_DRIVERS: "amd,swrast"
887    DRI_LOADERS:
888      -D glvnd=disabled
889
890# This job emits our scripts into artifacts so they can be reused for
891# job submission to hardware devices.
892python-artifacts:
893  stage: build-for-tests
894  extends:
895    - .use-debian/x86_64_pyutils
896    - .build-common
897  variables:
898    GIT_STRATEGY: fetch
899    S3_ARTIFACT_NAME: mesa-python-ci-artifacts
900  timeout: 10m
901  script:
902    - .gitlab-ci/prepare-artifacts-python.sh
903  tags:
904    - placeholder-job
905