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 13KB

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