Clone of mesa.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

.gitlab-ci.yml 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. # This is the tag of the docker image used for the build jobs. If the
  2. # image doesn't exist yet, the containers-build 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. #
  16. # The format of the tag is "%Y-%m-%d-${counter}" where ${counter} stays
  17. # at "01" unless you have multiple updates on the same day :)
  18. variables:
  19. UBUNTU_TAG: 2019-03-05-01
  20. UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu:$UBUNTU_TAG"
  21. UBUNTU_IMAGE_MAIN: "registry.freedesktop.org/mesa/mesa/ubuntu:$UBUNTU_TAG"
  22. cache:
  23. paths:
  24. - ccache
  25. stages:
  26. - containers-build
  27. - build+test
  28. # When to automatically run the CI
  29. .ci-run-policy:
  30. only:
  31. - master
  32. - merge_requests
  33. - /^ci([-/].*)?$/
  34. # CONTAINERS
  35. ubuntu:
  36. extends: .ci-run-policy
  37. stage: containers-build
  38. image: docker:stable
  39. services:
  40. - docker:dind
  41. variables:
  42. DOCKER_HOST: tcp://docker:2375
  43. DOCKER_DRIVER: overlay2
  44. script:
  45. # Enable experimental features such as `docker manifest inspect`
  46. - mkdir -p ~/.docker
  47. - "echo '{\"experimental\": \"enabled\"}' > ~/.docker/config.json"
  48. - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
  49. # Check if the image (with the specific tag) already exists
  50. - docker manifest inspect $UBUNTU_IMAGE && exit || true
  51. # Try to re-use the image from the main repository's registry
  52. - docker image pull $UBUNTU_IMAGE_MAIN &&
  53. docker image tag $UBUNTU_IMAGE_MAIN $UBUNTU_IMAGE &&
  54. docker image push $UBUNTU_IMAGE && exit || true
  55. - docker build -t $UBUNTU_IMAGE -f .gitlab-ci/Dockerfile.ubuntu .
  56. - docker push $UBUNTU_IMAGE
  57. # BUILD
  58. .build:
  59. extends: .ci-run-policy
  60. image: $UBUNTU_IMAGE
  61. stage: build+test
  62. artifacts:
  63. when: on_failure
  64. untracked: true
  65. # Use ccache transparently, and print stats before/after
  66. before_script:
  67. - export PATH="/usr/lib/ccache:$PATH"
  68. - export CCACHE_BASEDIR="$PWD"
  69. - export CCACHE_DIR="$PWD/ccache"
  70. - export CCACHE_COMPILERCHECK=content
  71. - ccache --zero-stats || true
  72. - ccache --show-stats || true
  73. after_script:
  74. - export CCACHE_DIR="$PWD/ccache"
  75. - ccache --show-stats
  76. .meson-build:
  77. extends: .build
  78. script:
  79. # We need to control the version of llvm-config we're using, so we'll
  80. # generate a native file to do so. This requires meson >=0.49
  81. - if test -n "$LLVM_VERSION"; then
  82. LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
  83. echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file;
  84. $LLVM_CONFIG --version;
  85. else
  86. touch native.file;
  87. fi
  88. - meson --version
  89. - meson _build
  90. --native-file=native.file
  91. -D build-tests=true
  92. -D libunwind=${UNWIND}
  93. ${DRI_LOADERS}
  94. -D dri-drivers=${DRI_DRIVERS:-[]}
  95. ${GALLIUM_ST}
  96. -D gallium-drivers=${GALLIUM_DRIVERS:-[]}
  97. -D vulkan-drivers=${VULKAN_DRIVERS:-[]}
  98. - cd _build
  99. - meson configure
  100. - ninja -j4
  101. - ninja test
  102. .make-build:
  103. extends: .build
  104. variables:
  105. MAKEFLAGS: "-j4"
  106. script:
  107. - if test -n "$LLVM_VERSION"; then
  108. export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
  109. fi
  110. - mkdir build
  111. - cd build
  112. - ../autogen.sh
  113. --enable-autotools
  114. --enable-debug
  115. $LIBUNWIND_FLAGS
  116. $DRI_LOADERS
  117. --with-dri-drivers=$DRI_DRIVERS
  118. $GALLIUM_ST
  119. --with-gallium-drivers=$GALLIUM_DRIVERS
  120. --with-vulkan-drivers=$VULKAN_DRIVERS
  121. --disable-llvm-shared-libs
  122. - make
  123. - eval $MAKE_CHECK_COMMAND
  124. .scons-build:
  125. extends: .build
  126. variables:
  127. SCONSFLAGS: "-j4"
  128. script:
  129. - if test -n "$LLVM_VERSION"; then
  130. export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
  131. fi
  132. - scons $SCONS_TARGET
  133. - eval $SCONS_CHECK_COMMAND
  134. meson-vulkan:
  135. extends: .meson-build
  136. variables:
  137. UNWIND: "false"
  138. DRI_LOADERS: >
  139. -D glx=disabled
  140. -D gbm=false
  141. -D egl=false
  142. -D platforms=x11,wayland,drm
  143. -D osmesa=none
  144. GALLIUM_ST: >
  145. -D dri3=true
  146. -D gallium-vdpau=false
  147. -D gallium-xvmc=false
  148. -D gallium-omx=disabled
  149. -D gallium-va=false
  150. -D gallium-xa=false
  151. -D gallium-nine=false
  152. -D gallium-opencl=disabled
  153. VULKAN_DRIVERS: intel,amd
  154. LLVM_VERSION: "7"
  155. meson-loader-classic-dri:
  156. extends: .meson-build
  157. variables:
  158. UNWIND: "false"
  159. DRI_LOADERS: >
  160. -D glx=dri
  161. -D gbm=true
  162. -D egl=true
  163. -D platforms=x11,wayland,drm,surfaceless
  164. -D osmesa=classic
  165. DRI_DRIVERS: "i915,i965,r100,r200,swrast,nouveau"
  166. GALLIUM_ST: >
  167. -D dri3=true
  168. -D gallium-vdpau=false
  169. -D gallium-xvmc=false
  170. -D gallium-omx=disabled
  171. -D gallium-va=false
  172. -D gallium-xa=false
  173. -D gallium-nine=false
  174. -D gallium-opencl=disabled
  175. meson-glvnd:
  176. extends: .meson-build
  177. variables:
  178. UNWIND: "true"
  179. DRI_LOADERS: >
  180. -D glvnd=true
  181. -D egl=true
  182. -D gbm=true
  183. -D glx=dri
  184. DRI_DRIVERS: "i965"
  185. GALLIUM_ST: >
  186. -D gallium-vdpau=false
  187. -D gallium-xvmc=false
  188. -D gallium-omx=disabled
  189. -D gallium-va=false
  190. -D gallium-xa=false
  191. -D gallium-nine=false
  192. -D gallium-opencl=disabled
  193. # NOTE: Building SWR is 2x (yes two) times slower than all the other
  194. # gallium drivers combined.
  195. # Start this early so that it doesn't hunder the run time.
  196. meson-gallium-swr:
  197. extends: .meson-build
  198. variables:
  199. UNWIND: "true"
  200. DRI_LOADERS: >
  201. -D glx=disabled
  202. -D egl=false
  203. -D gbm=false
  204. GALLIUM_ST: >
  205. -D dri3=false
  206. -D gallium-vdpau=false
  207. -D gallium-xvmc=false
  208. -D gallium-omx=disabled
  209. -D gallium-va=false
  210. -D gallium-xa=false
  211. -D gallium-nine=false
  212. -D gallium-opencl=disabled
  213. GALLIUM_DRIVERS: "swr"
  214. LLVM_VERSION: "6.0"
  215. meson-gallium-radeonsi:
  216. extends: .meson-build
  217. variables:
  218. UNWIND: "true"
  219. DRI_LOADERS: >
  220. -D glx=disabled
  221. -D egl=false
  222. -D gbm=false
  223. GALLIUM_ST: >
  224. -D dri3=false
  225. -D gallium-vdpau=false
  226. -D gallium-xvmc=false
  227. -D gallium-omx=disabled
  228. -D gallium-va=false
  229. -D gallium-xa=false
  230. -D gallium-nine=false
  231. -D gallium-opencl=disabled
  232. GALLIUM_DRIVERS: "radeonsi"
  233. LLVM_VERSION: "7"
  234. meson-gallium-drivers-other:
  235. extends: .meson-build
  236. variables:
  237. UNWIND: "true"
  238. DRI_LOADERS: >
  239. -D glx=disabled
  240. -D egl=false
  241. -D gbm=false
  242. GALLIUM_ST: >
  243. -D dri3=false
  244. -D gallium-vdpau=false
  245. -D gallium-xvmc=false
  246. -D gallium-omx=disabled
  247. -D gallium-va=false
  248. -D gallium-xa=false
  249. -D gallium-nine=false
  250. -D gallium-opencl=disabled
  251. GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
  252. LLVM_VERSION: "5.0"
  253. meson-gallium-clover-llvm5:
  254. extends: .meson-build
  255. variables:
  256. UNWIND: "true"
  257. DRI_LOADERS: >
  258. -D glx=disabled
  259. -D egl=false
  260. -D gbm=false
  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. -D gallium-opencl=icd
  270. GALLIUM_DRIVERS: "r600"
  271. LLVM_VERSION: "5.0"
  272. meson-gallium-clover-llvm6:
  273. extends: meson-gallium-clover-llvm5
  274. variables:
  275. LLVM_VERSION: "6.0"
  276. meson-gallium-clover-llvm7:
  277. extends: meson-gallium-clover-llvm5
  278. variables:
  279. GALLIUM_DRIVERS: "r600,radeonsi"
  280. LLVM_VERSION: "7"
  281. meson-gallium-st-other:
  282. extends: .meson-build
  283. variables:
  284. UNWIND: "true"
  285. DRI_LOADERS: >
  286. -D glx=disabled
  287. -D egl=false
  288. -D gbm=false
  289. GALLIUM_ST: >
  290. -D dri3=true
  291. -D gallium-vdpau=true
  292. -D gallium-xvmc=true
  293. -D gallium-omx=bellagio
  294. -D gallium-va=true
  295. -D gallium-xa=true
  296. -D gallium-nine=true
  297. -D gallium-opencl=disabled
  298. -D osmesa=gallium
  299. GALLIUM_DRIVERS: "nouveau,swrast"
  300. LLVM_VERSION: "5.0"
  301. make-vulkan:
  302. extends: .make-build
  303. variables:
  304. MAKE_CHECK_COMMAND: "make -C src/gtest check && make -C src/intel check"
  305. LLVM_VERSION: "7"
  306. DRI_LOADERS: >
  307. --disable-glx
  308. --disable-gbm
  309. --disable-egl
  310. --with-platforms=x11,wayland,drm
  311. DRI_DRIVERS: ""
  312. GALLIUM_ST: >
  313. --enable-dri
  314. --enable-dri3
  315. --disable-opencl
  316. --disable-xa
  317. --disable-nine
  318. --disable-xvmc
  319. --disable-vdpau
  320. --disable-va
  321. --disable-omx-bellagio
  322. --disable-gallium-osmesa
  323. VULKAN_DRIVERS: intel,radeon
  324. LIBUNWIND_FLAGS: --disable-libunwind
  325. make-loader-classic-dri:
  326. extends: .make-build
  327. variables:
  328. MAKE_CHECK_COMMAND: "make check"
  329. DRI_LOADERS: >
  330. --enable-glx
  331. --enable-gbm
  332. --enable-egl
  333. --with-platforms=x11,wayland,drm,surfaceless
  334. --enable-osmesa
  335. DRI_DRIVERS: "i915,i965,radeon,r200,swrast,nouveau"
  336. GALLIUM_ST: >
  337. --enable-dri
  338. --disable-opencl
  339. --disable-xa
  340. --disable-nine
  341. --disable-xvmc
  342. --disable-vdpau
  343. --disable-va
  344. --disable-omx-bellagio
  345. --disable-gallium-osmesa
  346. LIBUNWIND_FLAGS: --disable-libunwind
  347. # NOTE: Building SWR is 2x (yes two) times slower than all the other
  348. # gallium drivers combined.
  349. # Start this early so that it doesn't hunder the run time.
  350. make-gallium-drivers-swr:
  351. extends: .make-build
  352. variables:
  353. MAKE_CHECK_COMMAND: "true"
  354. LLVM_VERSION: "6.0"
  355. DRI_LOADERS: >
  356. --disable-glx
  357. --disable-gbm
  358. --disable-egl
  359. GALLIUM_ST: >
  360. --enable-dri
  361. --disable-opencl
  362. --disable-xa
  363. --disable-nine
  364. --disable-xvmc
  365. --disable-vdpau
  366. --disable-va
  367. --disable-omx-bellagio
  368. --disable-gallium-osmesa
  369. GALLIUM_DRIVERS: "swr"
  370. LIBUNWIND_FLAGS: --enable-libunwind
  371. make-gallium-drivers-radeonsi:
  372. extends: make-gallium-drivers-swr
  373. variables:
  374. LLVM_VERSION: "7"
  375. GALLIUM_DRIVERS: "radeonsi"
  376. make-gallium-drivers-other:
  377. extends: make-gallium-drivers-swr
  378. variables:
  379. LLVM_VERSION: "3.9"
  380. GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
  381. make-gallium-st-clover-llvm-39:
  382. extends: .make-build
  383. variables:
  384. MAKE_CHECK_COMMAND: "true"
  385. LLVM_VERSION: "3.9"
  386. DRI_LOADERS: >
  387. --disable-glx
  388. --disable-gbm
  389. --disable-egl
  390. GALLIUM_ST: >
  391. --disable-dri
  392. --enable-opencl
  393. --enable-opencl-icd
  394. --enable-llvm
  395. --disable-xa
  396. --disable-nine
  397. --disable-xvmc
  398. --disable-vdpau
  399. --disable-va
  400. --disable-omx-bellagio
  401. --disable-gallium-osmesa
  402. GALLIUM_DRIVERS: "r600"
  403. LIBUNWIND_FLAGS: --enable-libunwind
  404. make-gallium-st-clover-llvm-4:
  405. extends: make-gallium-st-clover-llvm-39
  406. variables:
  407. LLVM_VERSION: "4.0"
  408. make-gallium-st-clover-llvm-5:
  409. extends: make-gallium-st-clover-llvm-39
  410. variables:
  411. LLVM_VERSION: "5.0"
  412. make-gallium-st-clover-llvm-6:
  413. extends: make-gallium-st-clover-llvm-39
  414. variables:
  415. LLVM_VERSION: "6.0"
  416. make-gallium-st-clover-llvm-7:
  417. extends: make-gallium-st-clover-llvm-39
  418. variables:
  419. LLVM_VERSION: "7"
  420. GALLIUM_DRIVERS: "r600,radeonsi"
  421. make-gallium-st-other:
  422. extends: .make-build
  423. variables:
  424. MAKE_CHECK_COMMAND: "true"
  425. # We should be testing 3.3, but 3.9 is the oldest that still exists in ubuntu
  426. LLVM_VERSION: "3.9"
  427. DRI_LOADERS: >
  428. --disable-glx
  429. --disable-gbm
  430. --disable-egl
  431. GALLIUM_ST: >
  432. --enable-dri
  433. --disable-opencl
  434. --enable-xa
  435. --enable-nine
  436. --enable-xvmc
  437. --enable-vdpau
  438. --enable-va
  439. --enable-omx-bellagio
  440. --enable-gallium-osmesa
  441. # We need swrast for osmesa and nine.
  442. # i915 most likely doesn't work with most ST.
  443. # Regardless - we're doing a quick build test here.
  444. GALLIUM_DRIVERS: "i915,swrast"
  445. LIBUNWIND_FLAGS: --enable-libunwind
  446. scons-nollvm:
  447. extends: .scons-build
  448. variables:
  449. SCONS_TARGET: "llvm=0"
  450. SCONS_CHECK_COMMAND: "scons llvm=0 check"
  451. scons-llvm:
  452. extends: .scons-build
  453. variables:
  454. SCONS_TARGET: "llvm=1"
  455. SCONS_CHECK_COMMAND: "scons llvm=1 check"
  456. LLVM_VERSION: "3.9"
  457. scons-swr:
  458. extends: .scons-build
  459. variables:
  460. SCONS_TARGET: "swr=1"
  461. SCONS_CHECK_COMMAND: "true"
  462. LLVM_VERSION: "6.0"