Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.gitlab-ci.yml 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. variables:
  2. UPSTREAM_REPO: mesa/mesa
  3. include:
  4. - project: 'wayland/ci-templates'
  5. # Must be the same as in .gitlab-ci/lava-gitlab-ci.yml
  6. ref: 0a9bdd33a98f05af6761ab118b5074952242aab0
  7. file: '/templates/debian.yml'
  8. include:
  9. - local: '.gitlab-ci/lava-gitlab-ci.yml'
  10. stages:
  11. - container
  12. - build
  13. - test
  14. # When to automatically run the CI
  15. .ci-run-policy:
  16. rules:
  17. - when: on_success
  18. retry:
  19. max: 2
  20. when:
  21. - runner_system_failure
  22. # Cancel CI run if a newer commit is pushed to the same branch
  23. interruptible: true
  24. .ci-deqp-artifacts:
  25. artifacts:
  26. when: always
  27. untracked: false
  28. paths:
  29. # Watch out! Artifacts are relative to the build dir.
  30. # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
  31. - artifacts
  32. # Build the "normal" (non-LAVA) CI docker images.
  33. #
  34. # DEBIAN_TAG is the tag of the docker image used by later stage jobs. If the
  35. # image doesn't exist yet, the container stage job generates it.
  36. #
  37. # In order to generate a new image, one should generally change the tag.
  38. # While removing the image from the registry would also work, that's not
  39. # recommended except for ephemeral images during development: Replacing
  40. # an image after a significant amount of time might pull in newer
  41. # versions of gcc/clang or other packages, which might break the build
  42. # with older commits using the same tag.
  43. #
  44. # After merging a change resulting in generating a new image to the
  45. # main repository, it's recommended to remove the image from the source
  46. # repository's container registry, so that the image from the main
  47. # repository's registry will be used there as well.
  48. .container:
  49. stage: container
  50. extends:
  51. - .ci-run-policy
  52. rules:
  53. # Run pipeline by default for merge requests changing files affecting it
  54. - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
  55. changes:
  56. - VERSION
  57. - bin/**/*
  58. # GitLab CI
  59. - .gitlab-ci.yml
  60. - .gitlab-ci/**/*
  61. # Meson
  62. - meson*
  63. - build-support/**/*
  64. - subprojects/**/*
  65. # SCons
  66. - SConstruct
  67. - scons/**/*
  68. - common.py
  69. # Source code
  70. - include/**/*
  71. - src/**/*
  72. when: on_success
  73. # Always run pipeline by default in the main project
  74. - if: '$CI_PROJECT_PATH == "mesa/mesa"'
  75. when: on_success
  76. # Otherwise, allow triggering jobs manually
  77. - when: manual
  78. variables:
  79. DEBIAN_VERSION: buster-slim
  80. REPO_SUFFIX: $CI_JOB_NAME
  81. DEBIAN_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
  82. # no need to pull the whole repo to build the container image
  83. GIT_STRATEGY: none
  84. # Debian 10 based x86 build image
  85. x86_build:
  86. extends:
  87. - .debian@container-ifnot-exists
  88. - .container
  89. variables:
  90. DEBIAN_TAG: &x86_build "2019-11-13"
  91. .use-x86_build:
  92. variables:
  93. TAG: *x86_build
  94. image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
  95. needs:
  96. - x86_build
  97. # Debian 10 based x86 test image for GL
  98. x86_test-gl:
  99. extends: x86_build
  100. variables:
  101. DEBIAN_TAG: &x86_test-gl "2019-12-05"
  102. # Debian 10 based x86 test image for VK
  103. x86_test-vk:
  104. extends: x86_build
  105. variables:
  106. DEBIAN_TAG: &x86_test-vk "2019-11-22"
  107. # Can only be triggered manually on personal branches because RADV is the only
  108. # driver that does Vulkan testing at the moment.
  109. rules:
  110. # Never build the test image for VK by default in the main project.
  111. - if: '$CI_PROJECT_PATH == "mesa/mesa"'
  112. when: never
  113. # Never build the test image for VK by default for merge requests.
  114. - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
  115. when: never
  116. # Otherwise, allow building it manually for personal branches.
  117. - when: manual
  118. # Debian 9 based x86 build image (old LLVM)
  119. x86_build_old:
  120. extends: x86_build
  121. variables:
  122. DEBIAN_TAG: &x86_build_old "2019-09-18"
  123. DEBIAN_VERSION: stretch-slim
  124. .use-x86_build_old:
  125. variables:
  126. TAG: *x86_build_old
  127. image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
  128. needs:
  129. - x86_build_old
  130. # Debian 10 based ARM build image
  131. arm_build:
  132. extends:
  133. - .debian@container-ifnot-exists@arm64v8
  134. - .container
  135. variables:
  136. DEBIAN_TAG: &arm_build "2019-11-13"
  137. .use-arm_build:
  138. variables:
  139. TAG: *arm_build
  140. image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
  141. needs:
  142. - arm_build
  143. # Debian 10 based ARM test image
  144. arm_test:
  145. extends: arm_build
  146. variables:
  147. DEBIAN_TAG: &arm_test "2019-11-22"
  148. .use-arm_test:
  149. variables:
  150. TAG: *arm_test
  151. image: "$CI_REGISTRY_IMAGE/debian/arm_test:$TAG"
  152. needs:
  153. - meson-arm64
  154. - arm_test
  155. # BUILD
  156. # Shared between windows and Linux
  157. .build-common:
  158. extends: .ci-run-policy
  159. stage: build
  160. artifacts:
  161. when: always
  162. paths:
  163. - _build/meson-logs/*.txt
  164. # scons:
  165. - build/*/config.log
  166. - shader-db
  167. # Just Linux
  168. .build-linux:
  169. extends: .build-common
  170. variables:
  171. CCACHE_COMPILERCHECK: "content"
  172. CCACHE_COMPRESS: "true"
  173. CCACHE_DIR: /cache/mesa/ccache
  174. # Use ccache transparently, and print stats before/after
  175. before_script:
  176. - export PATH="/usr/lib/ccache:$PATH"
  177. - export CCACHE_BASEDIR="$PWD"
  178. - ccache --show-stats
  179. after_script:
  180. - ccache --show-stats
  181. .build-windows:
  182. extends: .build-common
  183. tags:
  184. - mesa-windows
  185. cache:
  186. key: ${CI_JOB_NAME}
  187. paths:
  188. - subprojects/packagecache
  189. .meson-build:
  190. extends:
  191. - .build-linux
  192. - .use-x86_build
  193. script:
  194. - .gitlab-ci/meson-build.sh
  195. .scons-build:
  196. extends:
  197. - .build-linux
  198. - .use-x86_build
  199. variables:
  200. SCONSFLAGS: "-j4"
  201. script:
  202. - .gitlab-ci/scons-build.sh
  203. meson-testing:
  204. extends:
  205. - .meson-build
  206. - .ci-deqp-artifacts
  207. variables:
  208. UNWIND: "true"
  209. DRI_LOADERS: >
  210. -D glx=dri
  211. -D gbm=true
  212. -D egl=true
  213. -D platforms=x11,drm,surfaceless
  214. GALLIUM_ST: >
  215. -D dri3=true
  216. GALLIUM_DRIVERS: "swrast"
  217. VULKAN_DRIVERS: amd
  218. BUILDTYPE: "debugoptimized"
  219. script:
  220. - .gitlab-ci/meson-build.sh
  221. - .gitlab-ci/prepare-artifacts.sh
  222. meson-main:
  223. extends: .meson-build
  224. variables:
  225. UNWIND: "true"
  226. DRI_LOADERS: >
  227. -D glx=dri
  228. -D gbm=true
  229. -D egl=true
  230. -D platforms=x11,wayland,drm,surfaceless
  231. DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
  232. GALLIUM_ST: >
  233. -D dri3=true
  234. -D gallium-extra-hud=true
  235. -D gallium-vdpau=true
  236. -D gallium-xvmc=true
  237. -D gallium-omx=bellagio
  238. -D gallium-va=true
  239. -D gallium-xa=true
  240. -D gallium-nine=true
  241. -D gallium-opencl=disabled
  242. GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
  243. LLVM_VERSION: "7"
  244. EXTRA_OPTION: >
  245. -D osmesa=gallium
  246. -D tools=all
  247. script:
  248. - .gitlab-ci/meson-build.sh
  249. - .gitlab-ci/run-shader-db.sh
  250. .meson-cross:
  251. extends:
  252. - .meson-build
  253. variables:
  254. UNWIND: "false"
  255. DRI_LOADERS: >
  256. -D glx=disabled
  257. -D gbm=false
  258. -D egl=true
  259. -D platforms=surfaceless
  260. -D osmesa=none
  261. GALLIUM_ST: >
  262. -D dri3=false
  263. -D gallium-vdpau=false
  264. -D gallium-xvmc=false
  265. -D gallium-omx=disabled
  266. -D gallium-va=false
  267. -D gallium-xa=false
  268. -D gallium-nine=false
  269. .meson-arm:
  270. extends:
  271. - .meson-cross
  272. - .use-arm_build
  273. variables:
  274. VULKAN_DRIVERS: freedreno
  275. GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
  276. EXTRA_OPTION: >
  277. -D I-love-half-baked-turnips=true
  278. tags:
  279. - aarch64
  280. meson-armhf:
  281. extends: .meson-arm
  282. variables:
  283. CROSS: armhf
  284. LLVM_VERSION: "7"
  285. meson-arm64:
  286. extends:
  287. - .meson-arm
  288. - .ci-deqp-artifacts
  289. variables:
  290. BUILDTYPE: "debugoptimized"
  291. VULKAN_DRIVERS: "freedreno,amd"
  292. script:
  293. - .gitlab-ci/meson-build.sh
  294. - .gitlab-ci/prepare-artifacts.sh
  295. meson-clang:
  296. extends: .meson-build
  297. variables:
  298. UNWIND: "true"
  299. DRI_LOADERS: >
  300. -D glvnd=true
  301. DRI_DRIVERS: "auto"
  302. GALLIUM_DRIVERS: "auto"
  303. VULKAN_DRIVERS: intel,amd,freedreno
  304. CC: "ccache clang-8"
  305. CXX: "ccache clang++-8"
  306. .meson-windows:
  307. extends:
  308. - .build-windows
  309. before_script:
  310. - $ENV:ARCH = "x86"
  311. - $ENV:VERSION = "2019\Community"
  312. script:
  313. - cmd /C .gitlab-ci\meson-build.bat
  314. scons-swr:
  315. extends: .scons-build
  316. variables:
  317. SCONS_TARGET: "swr=1"
  318. SCONS_CHECK_COMMAND: "true"
  319. LLVM_VERSION: "6.0"
  320. scons-win64:
  321. extends: .scons-build
  322. variables:
  323. SCONS_TARGET: platform=windows machine=x86_64
  324. SCONS_CHECK_COMMAND: "true"
  325. meson-clover:
  326. extends: .meson-build
  327. variables:
  328. UNWIND: "true"
  329. DRI_LOADERS: >
  330. -D glx=disabled
  331. -D egl=false
  332. -D gbm=false
  333. GALLIUM_ST: >
  334. -D dri3=false
  335. -D gallium-vdpau=false
  336. -D gallium-xvmc=false
  337. -D gallium-omx=disabled
  338. -D gallium-va=false
  339. -D gallium-xa=false
  340. -D gallium-nine=false
  341. -D gallium-opencl=icd
  342. script:
  343. - export GALLIUM_DRIVERS="r600,radeonsi"
  344. - .gitlab-ci/meson-build.sh
  345. - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
  346. - export GALLIUM_DRIVERS="i915,r600"
  347. - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
  348. - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
  349. meson-clover-old-llvm:
  350. extends:
  351. - meson-clover
  352. - .use-x86_build_old
  353. variables:
  354. UNWIND: "false"
  355. DRI_LOADERS: >
  356. -D glx=disabled
  357. -D egl=false
  358. -D gbm=false
  359. -D platforms=drm,surfaceless
  360. GALLIUM_DRIVERS: "i915,r600"
  361. script:
  362. - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
  363. - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
  364. - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
  365. meson-vulkan:
  366. extends: .meson-build
  367. variables:
  368. UNWIND: "false"
  369. DRI_LOADERS: >
  370. -D glx=disabled
  371. -D gbm=false
  372. -D egl=false
  373. -D platforms=x11,wayland,drm
  374. -D osmesa=none
  375. GALLIUM_ST: >
  376. -D dri3=true
  377. -D gallium-vdpau=false
  378. -D gallium-xvmc=false
  379. -D gallium-omx=disabled
  380. -D gallium-va=false
  381. -D gallium-xa=false
  382. -D gallium-nine=false
  383. -D gallium-opencl=disabled
  384. -D b_sanitize=undefined
  385. -D c_args=-fno-sanitize-recover=all
  386. -D cpp_args=-fno-sanitize-recover=all
  387. UBSAN_OPTIONS: "print_stacktrace=1"
  388. VULKAN_DRIVERS: intel,amd,freedreno
  389. LLVM_VERSION: "8"
  390. EXTRA_OPTION: >
  391. -D vulkan-overlay-layer=true
  392. # While the main point of this build is testing the i386 cross build,
  393. # we also use this one to test some other options that are exclusive
  394. # with meson-main's choices (classic swrast and osmesa)
  395. meson-i386:
  396. extends: .meson-cross
  397. variables:
  398. CROSS: i386
  399. VULKAN_DRIVERS: intel
  400. DRI_DRIVERS: "swrast"
  401. GALLIUM_DRIVERS: "iris"
  402. EXTRA_OPTION: >
  403. -D vulkan-overlay-layer=true
  404. -D llvm=false
  405. -D osmesa=classic
  406. meson-mingw32-x86_64:
  407. extends: .meson-build
  408. variables:
  409. UNWIND: "false"
  410. DRI_DRIVERS: ""
  411. GALLIUM_DRIVERS: "swrast"
  412. EXTRA_OPTION: >
  413. -Dllvm=false
  414. -Dosmesa=gallium
  415. --cross-file=.gitlab-ci/x86_64-w64-mingw32
  416. scons:
  417. extends: .scons-build
  418. variables:
  419. SCONS_TARGET: "llvm=1"
  420. SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
  421. script:
  422. - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
  423. - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
  424. scons-old-llvm:
  425. extends:
  426. - scons
  427. - .use-x86_build_old
  428. script:
  429. - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
  430. .test:
  431. extends:
  432. - .ci-run-policy
  433. stage: test
  434. variables:
  435. GIT_STRATEGY: none # testing doesn't build anything from source
  436. before_script:
  437. # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
  438. - rm -rf install
  439. - tar -xf artifacts/install.tar
  440. - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
  441. artifacts:
  442. when: always
  443. name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
  444. paths:
  445. - results/
  446. dependencies:
  447. - meson-testing
  448. .test-gl:
  449. extends:
  450. - .test
  451. variables:
  452. TAG: *x86_test-gl
  453. image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
  454. needs:
  455. - meson-testing
  456. - x86_test-gl
  457. .test-vk:
  458. extends:
  459. - .test
  460. variables:
  461. TAG: *x86_test-vk
  462. image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
  463. needs:
  464. - meson-testing
  465. - x86_test-vk
  466. .piglit-test:
  467. extends: .test-gl
  468. artifacts:
  469. when: on_failure
  470. name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
  471. paths:
  472. - summary/
  473. variables:
  474. LIBGL_ALWAYS_SOFTWARE: 1
  475. PIGLIT_NO_WINDOW: 1
  476. script:
  477. - artifacts/piglit/run.sh
  478. piglit-quick_gl:
  479. extends: .piglit-test
  480. variables:
  481. LP_NUM_THREADS: 0
  482. NIR_VALIDATE: 0
  483. PIGLIT_OPTIONS: >
  484. --process-isolation false
  485. -x arb_gpu_shader5
  486. -x egl_ext_device_
  487. -x egl_ext_platform_device
  488. -x glx-multithread-clearbuffer
  489. -x glx-multithread-shader-compile
  490. -x max-texture-size
  491. -x maxsize
  492. PIGLIT_PROFILES: quick_gl
  493. piglit-glslparser:
  494. extends: .piglit-test
  495. variables:
  496. LP_NUM_THREADS: 0
  497. NIR_VALIDATE: 0
  498. PIGLIT_PROFILES: glslparser
  499. piglit-quick_shader:
  500. extends: .piglit-test
  501. variables:
  502. LP_NUM_THREADS: 1
  503. NIR_VALIDATE: 0
  504. PIGLIT_PROFILES: quick_shader
  505. .deqp-test:
  506. variables:
  507. DEQP_SKIPS: deqp-default-skips.txt
  508. script:
  509. - ./artifacts/deqp-runner.sh
  510. .deqp-test-gl:
  511. extends:
  512. - .test-gl
  513. - .deqp-test
  514. .deqp-test-vk:
  515. extends:
  516. - .test-vk
  517. - .deqp-test
  518. variables:
  519. DEQP_VER: vk
  520. test-llvmpipe-gles2:
  521. variables:
  522. DEQP_VER: gles2
  523. DEQP_PARALLEL: 4
  524. NIR_VALIDATE: 0
  525. # Don't use threads inside llvmpipe, we've already got all 4 cores
  526. # busy with DEQP_PARALLEL.
  527. LP_NUM_THREADS: 0
  528. DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
  529. LIBGL_ALWAYS_SOFTWARE: "true"
  530. extends: .deqp-test-gl
  531. test-softpipe-gles2:
  532. extends: test-llvmpipe-gles2
  533. variables:
  534. DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
  535. DEQP_SKIPS: deqp-softpipe-skips.txt
  536. GALLIUM_DRIVER: "softpipe"
  537. test-softpipe-gles3:
  538. parallel: 2
  539. variables:
  540. DEQP_VER: gles3
  541. extends: test-softpipe-gles2
  542. test-softpipe-gles31:
  543. parallel: 4
  544. variables:
  545. DEQP_VER: gles31
  546. extends: test-softpipe-gles2
  547. arm64_a630_gles2:
  548. extends:
  549. - .deqp-test-gl
  550. - .use-arm_test
  551. variables:
  552. DEQP_VER: gles2
  553. DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
  554. DEQP_SKIPS: deqp-freedreno-a630-skips.txt
  555. NIR_VALIDATE: 0
  556. DEQP_PARALLEL: 4
  557. FLAKES_CHANNEL: "#freedreno-ci"
  558. tags:
  559. - mesa-cheza
  560. dependencies:
  561. - meson-arm64
  562. arm64_a630_gles31:
  563. extends: arm64_a630_gles2
  564. variables:
  565. DEQP_VER: gles31
  566. arm64_a630_gles3:
  567. extends: arm64_a630_gles2
  568. variables:
  569. DEQP_VER: gles3
  570. arm64_a306_gles2:
  571. extends: arm64_a630_gles2
  572. variables:
  573. DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
  574. DEQP_SKIPS: deqp-default-skips.txt
  575. tags:
  576. - db410c
  577. # RADV CI
  578. .test-radv:
  579. variables:
  580. VK_DRIVER: radeon
  581. RADV_DEBUG: checkir
  582. # Can only be triggered manually on personal branches because RADV is the only
  583. # driver that does Vulkan testing at the moment.
  584. rules:
  585. # Never test RADV by default in the main project.
  586. - if: '$CI_PROJECT_PATH == "mesa/mesa"'
  587. when: never
  588. # Never test RADV by default for merge requests.
  589. - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
  590. when: never
  591. # Otherwise, allow testing RADV if the test image for VK has been manually
  592. # started.
  593. - when: on_success
  594. radv_polaris10_vkcts:
  595. extends:
  596. - .deqp-test-vk
  597. - .test-radv
  598. variables:
  599. DEQP_PARALLEL: 4
  600. DEQP_SKIPS: deqp-radv-polaris10-skips.txt
  601. tags:
  602. - polaris10