1# Shared between windows and Linux 2.build-common: 3 extends: .build-rules 4 # Cancel job if a newer commit is pushed to the same branch 5 interruptible: true 6 artifacts: 7 name: "mesa_${CI_JOB_NAME}" 8 when: always 9 paths: 10 - _build/meson-logs/*.txt 11 - _build/meson-logs/strace 12 - shader-db 13 14# Just Linux 15.build-linux: 16 extends: .build-common 17 variables: 18 CCACHE_COMPILERCHECK: "content" 19 CCACHE_COMPRESS: "true" 20 CCACHE_DIR: /cache/mesa/ccache 21 # Use ccache transparently, and print stats before/after 22 before_script: 23 - !reference [default, before_script] 24 - export PATH="/usr/lib/ccache:$PATH" 25 - export CCACHE_BASEDIR="$PWD" 26 - echo -e "\e[0Ksection_start:$(date +%s):ccache_before[collapsed=true]\r\e[0Kccache stats before build" 27 - ccache --show-stats 28 - echo -e "\e[0Ksection_end:$(date +%s):ccache_before\r\e[0K" 29 after_script: 30 - echo -e "\e[0Ksection_start:$(date +%s):ccache_after[collapsed=true]\r\e[0Kccache stats after build" 31 - ccache --show-stats 32 - echo -e "\e[0Ksection_end:$(date +%s):ccache_after\r\e[0K" 33 - !reference [default, after_script] 34 35.build-windows: 36 extends: .build-common 37 tags: 38 - windows 39 - docker 40 - "2022" 41 - mesa 42 cache: 43 key: ${CI_JOB_NAME} 44 paths: 45 - subprojects/packagecache 46 47.meson-build: 48 extends: 49 - .build-linux 50 - .use-debian/x86_build 51 stage: build-x86_64 52 variables: 53 LLVM_VERSION: 11 54 script: 55 - .gitlab-ci/meson/build.sh 56 57.meson-build_mingw: 58 extends: 59 - .build-linux 60 - .use-debian/x86_build_mingw 61 - .use-wine 62 stage: build-x86_64 63 script: 64 - .gitlab-ci/meson/build.sh 65 66debian-testing: 67 extends: 68 - .meson-build 69 - .ci-deqp-artifacts 70 variables: 71 UNWIND: "enabled" 72 DRI_LOADERS: > 73 -D glx=dri 74 -D gbm=enabled 75 -D egl=enabled 76 -D platforms=x11 77 GALLIUM_ST: > 78 -D dri3=enabled 79 -D gallium-va=enabled 80 GALLIUM_DRIVERS: "swrast,virgl,radeonsi,zink,crocus,iris,i915" 81 VULKAN_DRIVERS: "swrast,amd,intel" 82 BUILDTYPE: "debugoptimized" 83 EXTRA_OPTION: > 84 -D spirv-to-dxil=true 85 -D valgrind=false 86 MINIO_ARTIFACT_NAME: mesa-amd64 87 LLVM_VERSION: "13" 88 script: 89 - .gitlab-ci/lava/lava-pytest.sh 90 - .gitlab-ci/meson/build.sh 91 - .gitlab-ci/prepare-artifacts.sh 92 artifacts: 93 reports: 94 junit: artifacts/ci_scripts_report.xml 95 96debian-testing-asan: 97 extends: 98 - debian-testing 99 variables: 100 C_ARGS: > 101 -Wno-error=stringop-truncation 102 EXTRA_OPTION: > 103 -D b_sanitize=address 104 -D valgrind=false 105 -D tools=dlclose-skip 106 MINIO_ARTIFACT_NAME: "" 107 ARTIFACTS_DEBUG_SYMBOLS: 1 108 109debian-testing-msan: 110 extends: 111 - debian-clang 112 variables: 113 # l_undef is incompatible with msan 114 EXTRA_OPTION: 115 -D b_sanitize=memory 116 -D b_lundef=false 117 MINIO_ARTIFACT_NAME: "" 118 ARTIFACTS_DEBUG_SYMBOLS: 1 119 # Don't run all the tests yet: 120 # GLSL has some issues in sexpression reading. 121 # gtest has issues in its test initialization. 122 MESON_TEST_ARGS: "--suite glcpp --suite gallium --suite format" 123 # Freedreno dropped because freedreno tools fail at msan. 124 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus" 125 VULKAN_DRIVERS: intel,amd,broadcom,virtio-experimental 126 127debian-clover-testing: 128 extends: 129 - .meson-build 130 - .ci-deqp-artifacts 131 variables: 132 UNWIND: "enabled" 133 DRI_LOADERS: > 134 -D glx=disabled 135 -D egl=disabled 136 -D gbm=disabled 137 GALLIUM_ST: > 138 -D gallium-opencl=icd 139 -D opencl-spirv=true 140 GALLIUM_DRIVERS: "swrast" 141 BUILDTYPE: "debugoptimized" 142 EXTRA_OPTION: > 143 -D valgrind=false 144 script: 145 - .gitlab-ci/meson/build.sh 146 - .gitlab-ci/prepare-artifacts.sh 147 148debian-gallium: 149 extends: .meson-build 150 variables: 151 UNWIND: "enabled" 152 DRI_LOADERS: > 153 -D glx=dri 154 -D gbm=enabled 155 -D egl=enabled 156 -D platforms=x11,wayland 157 GALLIUM_ST: > 158 -D dri3=enabled 159 -D gallium-extra-hud=true 160 -D gallium-vdpau=enabled 161 -D gallium-xvmc=enabled 162 -D gallium-omx=bellagio 163 -D gallium-va=enabled 164 -D gallium-xa=enabled 165 -D gallium-nine=true 166 -D gallium-opencl=disabled 167 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus" 168 VULKAN_DRIVERS: swrast 169 EXTRA_OPTION: > 170 -D spirv-to-dxil=true 171 -D osmesa=true 172 -D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,xvmc,lima,panfrost,asahi 173 script: 174 - .gitlab-ci/meson/build.sh 175 - .gitlab-ci/run-shader-db.sh 176 177# Test a release build with -Werror so new warnings don't sneak in. 178debian-release: 179 extends: .meson-build 180 variables: 181 UNWIND: "enabled" 182 DRI_LOADERS: > 183 -D glx=dri 184 -D gbm=enabled 185 -D egl=enabled 186 -D platforms=x11,wayland 187 GALLIUM_ST: > 188 -D dri3=enabled 189 -D gallium-extra-hud=true 190 -D gallium-vdpau=enabled 191 -D gallium-xvmc=disabled 192 -D gallium-omx=disabled 193 -D gallium-va=enabled 194 -D gallium-xa=enabled 195 -D gallium-nine=false 196 -D gallium-opencl=disabled 197 -D llvm=enabled 198 GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,freedreno,r300,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,crocus" 199 VULKAN_DRIVERS: "amd,imagination-experimental,microsoft-experimental" 200 BUILDTYPE: "release" 201 EXTRA_OPTION: > 202 -D spirv-to-dxil=true 203 -D osmesa=true 204 -D tools=all 205 -D intel-clc=enabled 206 -D imagination-srv=true 207 script: 208 - .gitlab-ci/meson/build.sh 209 210fedora-release: 211 extends: 212 - .meson-build 213 - .use-fedora/x86_build 214 variables: 215 BUILDTYPE: "release" 216 C_ARGS: > 217 -Wno-error=array-bounds 218 -Wno-error=stringop-overread 219 -Wno-error=uninitialized 220 CPP_ARGS: > 221 -Wno-error=array-bounds 222 DRI_LOADERS: > 223 -D glx=dri 224 -D gbm=enabled 225 -D egl=enabled 226 -D glvnd=true 227 -D platforms=x11,wayland 228 EXTRA_OPTION: > 229 -D osmesa=true 230 -D selinux=true 231 -D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,imagination 232 -D intel-clc=enabled 233 -D imagination-srv=true 234 GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,iris,kmsro,lima,nouveau,panfrost,r300,r600,radeonsi,svga,swrast,tegra,v3d,vc4,virgl,zink" 235 GALLIUM_ST: > 236 -D dri3=enabled 237 -D gallium-extra-hud=true 238 -D gallium-vdpau=enabled 239 -D gallium-xvmc=disabled 240 -D gallium-omx=disabled 241 -D gallium-va=enabled 242 -D gallium-xa=enabled 243 -D gallium-nine=false 244 -D gallium-opencl=icd 245 -D gles1=disabled 246 -D gles2=enabled 247 -D llvm=enabled 248 -D microsoft-clc=disabled 249 -D shared-llvm=enabled 250 -D vulkan-device-select-layer=true 251 LLVM_VERSION: "" 252 UNWIND: "disabled" 253 VULKAN_DRIVERS: "amd,broadcom,freedreno,intel,imagination-experimental" 254 script: 255 - .gitlab-ci/meson/build.sh 256 257debian-android: 258 extends: 259 - .meson-cross 260 - .use-debian/android_build 261 variables: 262 UNWIND: "disabled" 263 C_ARGS: > 264 -Wno-error=asm-operand-widths 265 -Wno-error=constant-conversion 266 -Wno-error=enum-conversion 267 -Wno-error=initializer-overrides 268 -Wno-error=missing-braces 269 -Wno-error=sometimes-uninitialized 270 -Wno-error=unused-function 271 CPP_ARGS: > 272 -Wno-error=deprecated-declarations 273 DRI_LOADERS: > 274 -D glx=disabled 275 -D gbm=disabled 276 -D egl=enabled 277 -D platforms=android 278 EXTRA_OPTION: > 279 -D android-stub=true 280 -D llvm=disabled 281 -D platform-sdk-version=29 282 -D valgrind=false 283 GALLIUM_ST: > 284 -D dri3=disabled 285 -D gallium-vdpau=disabled 286 -D gallium-xvmc=disabled 287 -D gallium-omx=disabled 288 -D gallium-va=disabled 289 -D gallium-xa=disabled 290 -D gallium-nine=false 291 -D gallium-opencl=disabled 292 LLVM_VERSION: "" 293 PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files" 294 script: 295 - PKG_CONFIG_PATH=/usr/local/lib/aarch64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/pkgconfig/ CROSS=aarch64-linux-android GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d VULKAN_DRIVERS=freedreno,broadcom,virtio-experimental .gitlab-ci/meson/build.sh 296 # x86_64 build: 297 # Can't do Intel because gen_decoder.c currently requires libexpat, which 298 # is not a dependency that AOSP wants to accept. Can't do Radeon Gallium 299 # drivers because they requires LLVM, which we don't have an Android build 300 # of. 301 - PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/pkgconfig/ CROSS=x86_64-linux-android GALLIUM_DRIVERS=iris VULKAN_DRIVERS=amd,intel .gitlab-ci/meson/build.sh 302 303.meson-cross: 304 extends: 305 - .meson-build 306 stage: build-misc 307 variables: 308 UNWIND: "disabled" 309 DRI_LOADERS: > 310 -D glx=dri 311 -D gbm=enabled 312 -D egl=enabled 313 -D platforms=x11 314 -D osmesa=false 315 GALLIUM_ST: > 316 -D dri3=enabled 317 -D gallium-vdpau=disabled 318 -D gallium-xvmc=disabled 319 -D gallium-omx=disabled 320 -D gallium-va=disabled 321 -D gallium-xa=disabled 322 -D gallium-nine=false 323 324.meson-arm: 325 extends: 326 - .meson-cross 327 - .use-debian/arm_build 328 needs: 329 - debian/arm_build 330 variables: 331 VULKAN_DRIVERS: freedreno,broadcom 332 GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4,zink" 333 BUILDTYPE: "debugoptimized" 334 tags: 335 - aarch64 336 337debian-armhf: 338 extends: 339 - .meson-arm 340 - .ci-deqp-artifacts 341 variables: 342 CROSS: armhf 343 EXTRA_OPTION: > 344 -D llvm=disabled 345 -D valgrind=false 346 MINIO_ARTIFACT_NAME: mesa-armhf 347 script: 348 - .gitlab-ci/meson/build.sh 349 - .gitlab-ci/prepare-artifacts.sh 350 351debian-arm64: 352 extends: 353 - .meson-arm 354 - .ci-deqp-artifacts 355 variables: 356 VULKAN_DRIVERS: "freedreno,broadcom,panfrost,imagination-experimental" 357 EXTRA_OPTION: > 358 -D llvm=disabled 359 -D valgrind=false 360 -D imagination-srv=true 361 MINIO_ARTIFACT_NAME: mesa-arm64 362 script: 363 - .gitlab-ci/meson/build.sh 364 - .gitlab-ci/prepare-artifacts.sh 365 366debian-arm64-asan: 367 extends: 368 - debian-arm64 369 variables: 370 C_ARGS: > 371 -Wno-error=stringop-truncation 372 EXTRA_OPTION: > 373 -D llvm=disabled 374 -D b_sanitize=address 375 -D valgrind=false 376 -D tools=dlclose-skip 377 ARTIFACTS_DEBUG_SYMBOLS: 1 378 MINIO_ARTIFACT_NAME: mesa-arm64-asan 379 MESON_TEST_ARGS: "--no-suite mesa:compiler" 380 381debian-arm64-build-test: 382 extends: 383 - .meson-arm 384 - .ci-deqp-artifacts 385 variables: 386 VULKAN_DRIVERS: "amd" 387 EXTRA_OPTION: > 388 -Dtools=panfrost,imagination 389 script: 390 - .gitlab-ci/meson/build.sh 391 392debian-clang: 393 extends: .meson-build 394 variables: 395 UNWIND: "enabled" 396 C_ARGS: > 397 -Wno-error=constant-conversion 398 -Wno-error=enum-conversion 399 -Wno-error=implicit-const-int-float-conversion 400 -Wno-error=initializer-overrides 401 -Wno-error=sometimes-uninitialized 402 -Wno-error=unused-function 403 CPP_ARGS: > 404 -Wno-error=c99-designator 405 -Wno-error=deprecated-declarations 406 -Wno-error=implicit-const-int-float-conversion 407 -Wno-error=missing-braces 408 -Wno-error=overloaded-virtual 409 -Wno-error=tautological-constant-out-of-range-compare 410 -Wno-error=unused-const-variable 411 -Wno-error=unused-private-field 412 DRI_LOADERS: > 413 -D glvnd=true 414 GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus,i915,asahi" 415 VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental,swrast,panfrost,imagination-experimental,microsoft-experimental 416 EXTRA_OPTIONS: 417 -D spirv-to-dxil=true 418 -D imagination-srv=true 419 CC: clang 420 CXX: clang++ 421 422windows-vs2019: 423 extends: 424 - .build-windows 425 - .use-windows_build_vs2019 426 - .windows-build-rules 427 stage: build-misc 428 script: 429 - pwsh -ExecutionPolicy RemoteSigned .\.gitlab-ci\windows\mesa_build.ps1 430 artifacts: 431 paths: 432 - _build/meson-logs/*.txt 433 - _install/ 434 435debian-clover: 436 extends: .meson-build 437 variables: 438 UNWIND: "enabled" 439 DRI_LOADERS: > 440 -D glx=disabled 441 -D egl=disabled 442 -D gbm=disabled 443 GALLIUM_DRIVERS: "r600,radeonsi" 444 GALLIUM_ST: > 445 -D dri3=disabled 446 -D gallium-vdpau=disabled 447 -D gallium-xvmc=disabled 448 -D gallium-omx=disabled 449 -D gallium-va=disabled 450 -D gallium-xa=disabled 451 -D gallium-nine=false 452 -D gallium-opencl=icd 453 EXTRA_OPTION: > 454 -D valgrind=false 455 script: 456 - LLVM_VERSION=9 GALLIUM_DRIVERS=r600,swrast .gitlab-ci/meson/build.sh 457 - .gitlab-ci/meson/build.sh 458 459debian-vulkan: 460 extends: .meson-build 461 variables: 462 UNWIND: "disabled" 463 DRI_LOADERS: > 464 -D glx=disabled 465 -D gbm=disabled 466 -D egl=disabled 467 -D platforms=x11,wayland 468 -D osmesa=false 469 GALLIUM_ST: > 470 -D dri3=enabled 471 -D gallium-vdpau=disabled 472 -D gallium-xvmc=disabled 473 -D gallium-omx=disabled 474 -D gallium-va=disabled 475 -D gallium-xa=disabled 476 -D gallium-nine=false 477 -D gallium-opencl=disabled 478 -D b_sanitize=undefined 479 -D c_args=-fno-sanitize-recover=all 480 -D cpp_args=-fno-sanitize-recover=all 481 UBSAN_OPTIONS: "print_stacktrace=1" 482 VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental,imagination-experimental,microsoft-experimental 483 EXTRA_OPTION: > 484 -D vulkan-layers=device-select,overlay 485 -D build-aco-tests=true 486 -D intel-clc=enabled 487 -D imagination-srv=true 488 489debian-i386: 490 extends: 491 - .meson-cross 492 - .use-debian/i386_build 493 variables: 494 CROSS: i386 495 VULKAN_DRIVERS: intel,amd,swrast,virtio-experimental 496 GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,swrast,virgl,zink,crocus" 497 EXTRA_OPTION: > 498 -D vulkan-layers=device-select,overlay 499 500debian-s390x: 501 extends: 502 - debian-ppc64el 503 - .use-debian/s390x_build 504 - .s390x-rules 505 tags: 506 - kvm 507 variables: 508 CROSS: s390x 509 GALLIUM_DRIVERS: "swrast,zink" 510 # The lp_test_blend test times out with LLVM 11 511 LLVM_VERSION: 9 512 VULKAN_DRIVERS: "swrast" 513 514debian-ppc64el: 515 extends: 516 - .meson-cross 517 - .use-debian/ppc64el_build 518 - .ppc64el-rules 519 variables: 520 CROSS: ppc64el 521 GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl,zink" 522 VULKAN_DRIVERS: "amd,swrast" 523 524debian-mingw32-x86_64: 525 extends: .meson-build_mingw 526 stage: build-misc 527 variables: 528 UNWIND: "disabled" 529 C_ARGS: > 530 -Wno-error=format 531 -Wno-error=format-extra-args 532 -Wno-error=deprecated-declarations 533 -Wno-error=unused-function 534 -Wno-error=unused-variable 535 -Wno-error=unused-but-set-variable 536 -Wno-error=unused-value 537 -Wno-error=switch 538 -Wno-error=parentheses 539 -Wno-error=missing-prototypes 540 -Wno-error=sign-compare 541 -Wno-error=narrowing 542 -Wno-error=overflow 543 CPP_ARGS: $C_ARGS 544 GALLIUM_DRIVERS: "swrast,d3d12,zink" 545 VULKAN_DRIVERS: "swrast,amd,microsoft-experimental" 546 GALLIUM_ST: > 547 -D gallium-opencl=icd 548 -D opencl-native=false 549 -D opencl-spirv=true 550 -D microsoft-clc=enabled 551 -D static-libclc=all 552 -D llvm=enabled 553 EXTRA_OPTION: > 554 -D spirv-to-dxil=true 555 -D gles1=enabled 556 -D gles2=enabled 557 -D osmesa=true 558 -D cpp_rtti=true 559 -D shared-glapi=enabled 560 -D zlib=enabled 561 --cross-file=.gitlab-ci/x86_64-w64-mingw32 562