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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  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-20-2"
  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-12"
  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. cache:
  149. key: ${CI_JOB_NAME}
  150. paths:
  151. - ccache
  152. variables:
  153. CCACHE_COMPILERCHECK: "content"
  154. # Use ccache transparently, and print stats before/after
  155. before_script:
  156. - export PATH="/usr/lib/ccache:$PATH"
  157. - export CCACHE_BASEDIR="$PWD"
  158. - export CCACHE_DIR="$PWD/ccache"
  159. - ccache --max-size=1500M
  160. - ccache --zero-stats || true
  161. - ccache --show-stats || true
  162. after_script:
  163. - export CCACHE_DIR="$PWD/ccache"
  164. - ccache --show-stats
  165. .build-windows:
  166. extends: .build-common
  167. tags:
  168. - mesa-windows
  169. cache:
  170. key: ${CI_JOB_NAME}
  171. paths:
  172. - subprojects/packagecache
  173. .meson-build:
  174. extends:
  175. - .build-linux
  176. - .use-x86_build
  177. script:
  178. - .gitlab-ci/meson-build.sh
  179. .scons-build:
  180. extends:
  181. - .build-linux
  182. - .use-x86_build
  183. variables:
  184. SCONSFLAGS: "-j4"
  185. script:
  186. - .gitlab-ci/scons-build.sh
  187. meson-main:
  188. extends:
  189. - .meson-build
  190. - .ci-deqp-artifacts
  191. variables:
  192. UNWIND: "true"
  193. DRI_LOADERS: >
  194. -D glx=dri
  195. -D gbm=true
  196. -D egl=true
  197. -D platforms=x11,wayland,drm,surfaceless
  198. DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
  199. GALLIUM_ST: >
  200. -D dri3=true
  201. -D gallium-extra-hud=true
  202. -D gallium-vdpau=true
  203. -D gallium-xvmc=true
  204. -D gallium-omx=bellagio
  205. -D gallium-va=true
  206. -D gallium-xa=true
  207. -D gallium-nine=true
  208. -D gallium-opencl=disabled
  209. GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink"
  210. LLVM_VERSION: "7"
  211. EXTRA_OPTION: >
  212. -D osmesa=gallium
  213. -D tools=all
  214. BUILDTYPE: "debugoptimized"
  215. script:
  216. - .gitlab-ci/meson-build.sh
  217. - .gitlab-ci/run-shader-db.sh
  218. - .gitlab-ci/prepare-artifacts.sh
  219. .meson-cross:
  220. extends:
  221. - .meson-build
  222. variables:
  223. UNWIND: "false"
  224. DRI_LOADERS: >
  225. -D glx=disabled
  226. -D gbm=false
  227. -D egl=true
  228. -D platforms=surfaceless
  229. -D osmesa=none
  230. GALLIUM_ST: >
  231. -D dri3=false
  232. -D gallium-vdpau=false
  233. -D gallium-xvmc=false
  234. -D gallium-omx=disabled
  235. -D gallium-va=false
  236. -D gallium-xa=false
  237. -D gallium-nine=false
  238. .meson-arm:
  239. extends:
  240. - .meson-cross
  241. - .use-arm_build
  242. variables:
  243. VULKAN_DRIVERS: freedreno
  244. GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
  245. EXTRA_OPTION: >
  246. -D I-love-half-baked-turnips=true
  247. tags:
  248. - aarch64
  249. meson-armhf:
  250. extends: .meson-arm
  251. variables:
  252. CROSS: armhf
  253. LLVM_VERSION: "7"
  254. meson-arm64:
  255. extends:
  256. - .meson-arm
  257. - .ci-deqp-artifacts
  258. variables:
  259. BUILDTYPE: "debugoptimized"
  260. VULKAN_DRIVERS: "freedreno,amd"
  261. script:
  262. - .gitlab-ci/meson-build.sh
  263. - .gitlab-ci/prepare-artifacts.sh
  264. # NOTE: Building SWR is 2x (yes two) times slower than all the other
  265. # gallium drivers combined.
  266. # Start this early so that it doesn't limit the total run time.
  267. #
  268. # We also stick the glvnd build here, since we want non-glvnd in
  269. # meson-main for actual driver CI.
  270. meson-swr-glvnd:
  271. extends: .meson-build
  272. variables:
  273. UNWIND: "true"
  274. DRI_LOADERS: >
  275. -D glvnd=true
  276. -D egl=true
  277. GALLIUM_ST: >
  278. -D dri3=true
  279. -D gallium-vdpau=false
  280. -D gallium-xvmc=false
  281. -D gallium-omx=disabled
  282. -D gallium-va=false
  283. -D gallium-xa=false
  284. -D gallium-nine=false
  285. -D gallium-opencl=disabled
  286. GALLIUM_DRIVERS: "swr,iris"
  287. LLVM_VERSION: "6.0"
  288. meson-clang:
  289. extends: .meson-build
  290. variables:
  291. UNWIND: "true"
  292. DRI_DRIVERS: "auto"
  293. GALLIUM_DRIVERS: "auto"
  294. VULKAN_DRIVERS: intel,amd,freedreno
  295. CC: "ccache clang-8"
  296. CXX: "ccache clang++-8"
  297. .meson-windows:
  298. extends:
  299. - .build-windows
  300. before_script:
  301. - $ENV:ARCH = "x86"
  302. - $ENV:VERSION = "2019\Community"
  303. script:
  304. - cmd /C .gitlab-ci\meson-build.bat
  305. scons-swr:
  306. extends: .scons-build
  307. variables:
  308. SCONS_TARGET: "swr=1"
  309. SCONS_CHECK_COMMAND: "true"
  310. LLVM_VERSION: "6.0"
  311. scons-win64:
  312. extends: .scons-build
  313. variables:
  314. SCONS_TARGET: platform=windows machine=x86_64
  315. SCONS_CHECK_COMMAND: "true"
  316. meson-clover:
  317. extends: .meson-build
  318. variables:
  319. UNWIND: "true"
  320. DRI_LOADERS: >
  321. -D glx=disabled
  322. -D egl=false
  323. -D gbm=false
  324. GALLIUM_ST: >
  325. -D dri3=false
  326. -D gallium-vdpau=false
  327. -D gallium-xvmc=false
  328. -D gallium-omx=disabled
  329. -D gallium-va=false
  330. -D gallium-xa=false
  331. -D gallium-nine=false
  332. -D gallium-opencl=icd
  333. script:
  334. - export GALLIUM_DRIVERS="r600,radeonsi"
  335. - .gitlab-ci/meson-build.sh
  336. - LLVM_VERSION=8 .gitlab-ci/meson-build.sh
  337. - export GALLIUM_DRIVERS="i915,r600"
  338. - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh
  339. - LLVM_VERSION=7 .gitlab-ci/meson-build.sh
  340. meson-clover-old-llvm:
  341. extends:
  342. - meson-clover
  343. - .use-x86_build_old
  344. variables:
  345. UNWIND: "false"
  346. DRI_LOADERS: >
  347. -D glx=disabled
  348. -D egl=false
  349. -D gbm=false
  350. -D platforms=drm,surfaceless
  351. GALLIUM_DRIVERS: "i915,r600"
  352. script:
  353. - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh
  354. - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh
  355. - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh
  356. meson-vulkan:
  357. extends: .meson-build
  358. variables:
  359. UNWIND: "false"
  360. DRI_LOADERS: >
  361. -D glx=disabled
  362. -D gbm=false
  363. -D egl=false
  364. -D platforms=x11,wayland,drm
  365. -D osmesa=none
  366. GALLIUM_ST: >
  367. -D dri3=true
  368. -D gallium-vdpau=false
  369. -D gallium-xvmc=false
  370. -D gallium-omx=disabled
  371. -D gallium-va=false
  372. -D gallium-xa=false
  373. -D gallium-nine=false
  374. -D gallium-opencl=disabled
  375. -D b_sanitize=undefined
  376. -D c_args=-fno-sanitize-recover=all
  377. -D cpp_args=-fno-sanitize-recover=all
  378. UBSAN_OPTIONS: "print_stacktrace=1"
  379. VULKAN_DRIVERS: intel,amd,freedreno
  380. LLVM_VERSION: "8"
  381. EXTRA_OPTION: >
  382. -D vulkan-overlay-layer=true
  383. # While the main point of this build is testing the i386 cross build,
  384. # we also use this one to test some other options that are exclusive
  385. # with meson-main's choices (classic swrast and osmesa)
  386. meson-i386:
  387. extends: .meson-cross
  388. variables:
  389. CROSS: i386
  390. VULKAN_DRIVERS: intel
  391. DRI_DRIVERS: "swrast"
  392. GALLIUM_DRIVERS: "iris"
  393. EXTRA_OPTION: >
  394. -D vulkan-overlay-layer=true
  395. -D llvm=false
  396. -D osmesa=classic
  397. meson-mingw32-x86_64:
  398. extends: .meson-build
  399. variables:
  400. UNWIND: "false"
  401. DRI_DRIVERS: ""
  402. GALLIUM_DRIVERS: "swrast"
  403. EXTRA_OPTION: >
  404. -Dllvm=false
  405. -Dosmesa=gallium
  406. --cross-file=.gitlab-ci/x86_64-w64-mingw32
  407. scons:
  408. extends: .scons-build
  409. variables:
  410. SCONS_TARGET: "llvm=1"
  411. SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
  412. script:
  413. - SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
  414. - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
  415. - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
  416. - LLVM_VERSION=8 .gitlab-ci/scons-build.sh
  417. scons-old-llvm:
  418. extends:
  419. - scons
  420. - .use-x86_build_old
  421. script:
  422. - LLVM_VERSION=3.9 .gitlab-ci/scons-build.sh
  423. - LLVM_VERSION=4.0 .gitlab-ci/scons-build.sh
  424. - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
  425. .test:
  426. extends:
  427. - .ci-run-policy
  428. stage: test
  429. variables:
  430. GIT_STRATEGY: none # testing doesn't build anything from source
  431. TAG: *x86_test
  432. image: "$CI_REGISTRY_IMAGE/debian/x86_test:$TAG"
  433. before_script:
  434. # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
  435. - rm -rf install
  436. - tar -xf artifacts/install.tar
  437. - LD_LIBRARY_PATH=install/lib ldd install/lib/{*,dri/swrast_dri}.so
  438. artifacts:
  439. when: on_failure
  440. name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
  441. paths:
  442. - results/
  443. dependencies:
  444. - meson-main
  445. needs:
  446. - meson-main
  447. - x86_test
  448. .piglit-test:
  449. extends: .test
  450. artifacts:
  451. reports:
  452. junit: results/results.xml
  453. variables:
  454. LIBGL_ALWAYS_SOFTWARE: 1
  455. PIGLIT_NO_WINDOW: 1
  456. script:
  457. - artifacts/piglit/run.sh
  458. piglit-quick_gl:
  459. extends: .piglit-test
  460. variables:
  461. LP_NUM_THREADS: 0
  462. PIGLIT_OPTIONS: >
  463. -x arb_gpu_shader5
  464. -x glx-multithread-clearbuffer
  465. -x glx-multithread-shader-compile
  466. -x max-texture-size
  467. -x maxsize
  468. PIGLIT_PROFILES: quick_gl
  469. piglit-glslparser+quick_shader:
  470. extends: .piglit-test
  471. variables:
  472. LP_NUM_THREADS: 1
  473. PIGLIT_OPTIONS: >
  474. -x spec@arb_arrays_of_arrays@execution@ubo
  475. -x spec@arb_gpu_shader_int64@execution$$
  476. -x spec@arb_separate_shader_objects@execution
  477. -x spec@arb_separate_shader_objects@linker
  478. -x spec@arb_shader_storage_buffer_object@execution
  479. -x spec@glsl-1.50@execution@built-in-functions
  480. PIGLIT_PROFILES: "glslparser quick_shader"
  481. PIGLIT_RESULTS: "glslparser+quick_shader"
  482. .deqp-test:
  483. extends: .test
  484. variables:
  485. DEQP_SKIPS: deqp-default-skips.txt
  486. script:
  487. - ./artifacts/deqp-runner.sh
  488. test-llvmpipe-gles2:
  489. variables:
  490. DEQP_VER: gles2
  491. DEQP_PARALLEL: 4
  492. # Don't use threads inside llvmpipe, we've already got all 4 cores
  493. # busy with DEQP_PARALLEL.
  494. LP_NUM_THREADS: 0
  495. DEQP_EXPECTED_FAILS: deqp-llvmpipe-fails.txt
  496. LIBGL_ALWAYS_SOFTWARE: "true"
  497. extends: .deqp-test
  498. test-softpipe-gles2:
  499. extends: test-llvmpipe-gles2
  500. variables:
  501. DEQP_EXPECTED_FAILS: deqp-softpipe-fails.txt
  502. DEQP_SKIPS: deqp-softpipe-skips.txt
  503. GALLIUM_DRIVER: "softpipe"
  504. test-softpipe-gles3:
  505. parallel: 2
  506. variables:
  507. DEQP_VER: gles3
  508. extends: test-softpipe-gles2
  509. test-softpipe-gles31:
  510. parallel: 4
  511. variables:
  512. DEQP_VER: gles31
  513. extends: test-softpipe-gles2
  514. arm64_a630_gles2:
  515. extends:
  516. - .deqp-test
  517. - .use-arm_test
  518. variables:
  519. DEQP_VER: gles2
  520. DEQP_EXPECTED_FAILS: deqp-freedreno-a630-fails.txt
  521. DEQP_SKIPS: deqp-freedreno-a630-skips.txt
  522. NIR_VALIDATE: 0
  523. tags:
  524. - mesa-cheza
  525. dependencies:
  526. - meson-arm64
  527. arm64_a630_gles31:
  528. extends: arm64_a630_gles2
  529. parallel: 4
  530. variables:
  531. DEQP_VER: gles31
  532. arm64_a630_gles3:
  533. parallel: 6
  534. extends: arm64_a630_gles2
  535. variables:
  536. DEQP_VER: gles3
  537. arm64_a306_gles2:
  538. parallel: 4
  539. extends: arm64_a630_gles2
  540. variables:
  541. DEQP_EXPECTED_FAILS: deqp-freedreno-a307-fails.txt
  542. DEQP_SKIPS: deqp-default-skips.txt
  543. tags:
  544. - db410c