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

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