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

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