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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. # DEBIAN_TAG is the tag of the docker image used for the build jobs. If the
  2. # image doesn't exist yet, the docker-image 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 an
  7. # image after a significant amount of time might pull in newer versions of
  8. # gcc/clang or other packages, which might break the build with older commits
  9. # using the same tag.
  10. #
  11. # After merging a change resulting in generating a new image to the main
  12. # repository, it's recommended to remove the image from the source repository's
  13. # container registry, so that the image from the main repository's registry
  14. # will be used there as well. You can manage your images on your fork of:
  15. # https://gitlab.freedesktop.org/xorg/xserver/container_registry
  16. variables:
  17. UPSTREAM_REPO: mesa/mesa
  18. DEBIAN_VERSION: testing-slim
  19. DEBIAN_TAG: "2019-06-07-1"
  20. include:
  21. - project: 'wayland/ci-templates'
  22. ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
  23. file: '/templates/debian.yml'
  24. stages:
  25. - containers
  26. - build
  27. - test
  28. # Retry jobs after runner system failures
  29. .retry: &retry
  30. retry:
  31. max: 2
  32. when:
  33. - runner_system_failure
  34. # Build Docker image with deqp, the rootfs and the build deps for Mesa
  35. .container:
  36. extends: .debian@container-ifnot-exists
  37. stage: containers
  38. <<: *retry
  39. variables:
  40. GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
  41. IMAGE_LOCAL: "$CI_REGISTRY/$CI_PROJECT_PATH/${DEBIAN_ARCH}:latest"
  42. DEBIAN_EXEC: 'DEBIAN_ARCH=${DEBIAN_ARCH}
  43. GCC_ARCH=${GCC_ARCH}
  44. KERNEL_ARCH=${KERNEL_ARCH}
  45. DEFCONFIG=${DEFCONFIG}
  46. DEVICE_TREES=${DEVICE_TREES}
  47. KERNEL_IMAGE_NAME=${KERNEL_IMAGE_NAME}
  48. bash src/gallium/drivers/panfrost/ci/debian-install.sh'
  49. container:armhf:
  50. extends: .container
  51. variables:
  52. DEBIAN_ARCH: "armhf"
  53. GCC_ARCH: "arm-linux-gnueabihf"
  54. KERNEL_ARCH: "arm"
  55. DEFCONFIG: "arch/arm/configs/multi_v7_defconfig"
  56. DEVICE_TREES: "arch/arm/boot/dts/rk3288-veyron-jaq.dtb"
  57. KERNEL_IMAGE_NAME: "zImage"
  58. container:arm64:
  59. extends: .container
  60. variables:
  61. DEBIAN_ARCH: "arm64"
  62. GCC_ARCH: "aarch64-linux-gnu"
  63. KERNEL_ARCH: "arm64"
  64. DEFCONFIG: "arch/arm64/configs/defconfig"
  65. DEVICE_TREES: "arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb"
  66. KERNEL_IMAGE_NAME: "Image"
  67. .build:
  68. stage: build
  69. image: $CI_REGISTRY/$CI_PROJECT_PATH/${DEBIAN_ARCH}:latest
  70. cache:
  71. paths:
  72. - ccache
  73. before_script:
  74. - mkdir -p results mesa-build
  75. - mkdir -p ccache
  76. script:
  77. - export CCACHE_BASEDIR=$CI_PROJECT_DIR
  78. - export CCACHE_DIR=$CI_PROJECT_DIR/ccache
  79. - export PATH="/usr/lib/ccache:$PATH"
  80. - ccache -s
  81. # Build Mesa
  82. - /usr/share/meson/debcrossgen --arch ${DEBIAN_ARCH} -o /tmp/cross_file.txt
  83. - meson . mesa-build
  84. --cross-file /tmp/cross_file.txt
  85. --libdir /artifacts/rootfs/mesa/lib/
  86. --buildtype release
  87. -Dgallium-drivers=kmsro,panfrost
  88. -Ddri-drivers=
  89. -Dprefix=/artifacts/rootfs/mesa
  90. - ninja -C mesa-build install
  91. - du -sh /artifacts/rootfs/mesa/*
  92. - rm -rf /artifacts/rootfs/mesa/include
  93. # Pack rootfs
  94. - cp src/gallium/drivers/panfrost/ci/deqp-runner.sh /artifacts/rootfs/deqp/.
  95. - du -sh /artifacts/rootfs/deqp/*
  96. - find /artifacts/rootfs/ -type f -printf "%s\t%p\n" | sort -n
  97. - cd /artifacts/rootfs/ ; find -H | cpio -H newc -v -o | gzip -c - > $CI_PROJECT_DIR/results/panfrost-rootfs-${DEBIAN_ARCH}.cpio.gz
  98. # Copy kernel and DT
  99. - cp /artifacts/${KERNEL_IMAGE_NAME} /artifacts/*.dtb $CI_PROJECT_DIR/results/.
  100. # Generate LAVA job
  101. - cd $CI_PROJECT_DIR
  102. - src/gallium/drivers/panfrost/ci/generate_lava.py
  103. --template src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2
  104. --arch ${DEBIAN_ARCH}
  105. --base-artifacts-url $CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/results
  106. --device-type ${DEVICE_TYPE}
  107. --kernel-image-name ${KERNEL_IMAGE_NAME}
  108. > results/lava-deqp.yml
  109. - cp src/gallium/drivers/panfrost/ci/expected-failures.txt results/.
  110. artifacts:
  111. when: always
  112. paths:
  113. - results/
  114. build:armhf:
  115. extends: .build
  116. variables:
  117. DEBIAN_ARCH: "armhf"
  118. GCC_ARCH: "arm-linux-gnueabihf"
  119. DEVICE_TYPE: "rk3288-veyron-jaq"
  120. KERNEL_IMAGE_NAME: "zImage"
  121. build:arm64:
  122. extends: .build
  123. variables:
  124. DEBIAN_ARCH: "arm64"
  125. GCC_ARCH: "aarch64-linux-gnu"
  126. DEVICE_TYPE: "rk3399-gru-kevin"
  127. KERNEL_IMAGE_NAME: "Image"
  128. .test:
  129. stage: test
  130. tags:
  131. - idle-jobs
  132. image: $CI_REGISTRY/$CI_PROJECT_PATH/arm64:latest # Any of the images will be fine
  133. variables:
  134. GIT_STRATEGY: none # no need to pull the whole tree for submitting the job
  135. script:
  136. - mkdir -p ~/.config/
  137. - |
  138. echo "default:
  139. uri: https://lava.collabora.co.uk/RPC2
  140. timeout: 120
  141. username: jenkins-fdo
  142. token: $LAVA_TOKEN
  143. " > ~/.config/lavacli.yaml
  144. - lava_job_id=`lavacli jobs submit $CI_PROJECT_DIR/results/lava-deqp.yml` || echo $lava_job_id
  145. - lavacli jobs logs $lava_job_id | grep -a -v "{'case':" | tee results/lava-deqp-$lava_job_id.log
  146. - lavacli jobs show $lava_job_id
  147. - curl "https://lava.collabora.co.uk/results/$lava_job_id/csv?user=jenkins-fdo&token=$LAVA_TOKEN" > raw_results.csv
  148. - cat raw_results.csv | csvcut -c 12,3 | grep dEQP-GLES2 | sort > results/results-$lava_job_id.csv
  149. # FIXME: Remove flip-flops from comparison files
  150. - |
  151. FLIP_FLOPS="
  152. dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_neg_x_neg_z_and_pos_x_pos_z_and_neg_x_neg_y_pos_z
  153. dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_pos_y_pos_z_and_neg_x_neg_y_pos_z_and_pos_x_pos_y_neg_z
  154. dEQP-GLES2.functional.fbo.render.color.blend_rbo_rgb5_a1
  155. dEQP-GLES2.functional.fbo.render.color.blend_rbo_rgb5_a1_depth_component16
  156. dEQP-GLES2.functional.fbo.render.color.blend_rbo_rgba4
  157. dEQP-GLES2.functional.fbo.render.color.blend_rbo_rgba4_depth_component16
  158. dEQP-GLES2.functional.fbo.render.color.blend_npot_rbo_rgb5_a1
  159. dEQP-GLES2.functional.fbo.render.color.blend_npot_rbo_rgb5_a1_depth_component16
  160. dEQP-GLES2.functional.fbo.render.color.blend_npot_rbo_rgba4
  161. dEQP-GLES2.functional.fbo.render.color.blend_npot_rbo_rgba4_depth_component16
  162. dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgb5_a1
  163. dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgb5_a1_depth_component16
  164. dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgb5_a1_stencil_index8
  165. dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgba4_depth_component16
  166. dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgba4_stencil_index8
  167. dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.
  168. dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.
  169. dEQP-GLES2.functional.fbo.render.shared_colorbuffer_clear.rbo_rgb5_a1
  170. dEQP-GLES2.functional.fbo.render.shared_colorbuffer_clear.rbo_rgba4
  171. dEQP-GLES2.functional.fbo.render.shared_colorbuffer_clear.tex2d_rgb
  172. dEQP-GLES2.functional.fbo.render.shared_colorbuffer_clear.tex2d_rgba
  173. dEQP-GLES2.functional.fbo.render.shared_colorbuffer.rbo_rgb5_a1
  174. dEQP-GLES2.functional.fbo.render.shared_colorbuffer.rbo_rgba4
  175. dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgb5_a1_depth_component16
  176. dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgba4_depth_component16
  177. dEQP-GLES2.functional.fbo.render.stencil_clear.rbo_rgb5_a1_stencil_index8
  178. dEQP-GLES2.functional.fbo.render.stencil.npot_rbo_rgb5_a1_stencil_index8
  179. dEQP-GLES2.functional.fbo.render.stencil.npot_rbo_rgba4_stencil_index8
  180. dEQP-GLES2.functional.fbo.render.stencil.rbo_rgb5_a1_stencil_index8
  181. dEQP-GLES2.functional.fbo.render.stencil.rbo_rgba4_stencil_index8
  182. dEQP-GLES2.functional.lifetime.attach.deleted_input.renderbuffer_framebuffer
  183. dEQP-GLES2.functional.lifetime.attach.deleted_output.renderbuffer_framebuffer
  184. dEQP-GLES2.functional.polygon_offset.fixed16_factor_0_slope
  185. dEQP-GLES2.functional.polygon_offset.fixed16_factor_1_slope
  186. dEQP-GLES2.functional.shaders.invariance.highp.loop_4
  187. dEQP-GLES2.functional.shaders.matrix.mul.dynamic_highp_mat4_vec4_vertex
  188. dEQP-GLES2.functional.shaders.matrix.mul.dynamic_highp_vec4_mat4_fragment
  189. dEQP-GLES2.functional.shaders.operator.common_functions.smoothstep.mediump_vec3_vertex
  190. dEQP-GLES2.functional.shaders.random.all_features.fragment.12
  191. dEQP-GLES2.functional.shaders.random.all_features.fragment.37
  192. dEQP-GLES2.functional.texture.units.2_units.mixed.1
  193. dEQP-GLES2.functional.texture.units.2_units.mixed.3
  194. dEQP-GLES2.functional.texture.units.2_units.only_2d.2
  195. dEQP-GLES2.functional.texture.units.4_units.mixed.5
  196. dEQP-GLES2.functional.texture.units.4_units.only_2d.0
  197. dEQP-GLES2.functional.texture.units.8_units.only_cube.2
  198. dEQP-GLES2.functional.texture.units.all_units.mixed.6
  199. dEQP-GLES2.functional.texture.units.all_units.only_cube.4
  200. dEQP-GLES2.functional.texture.units.all_units.only_cube.7
  201. dEQP-GLES2.functional.texture.units.all_units.only_cube.8
  202. "
  203. # FIXME: These tests fail in RK3288 but pass on RK3399
  204. - |
  205. FLIP_FLOPS="$FLIP_FLOPS
  206. dEQP-GLES2.functional.fragment_ops.blend.*
  207. dEQP-GLES2.functional.shaders.builtin_variable.max_draw_buffers_vertex
  208. dEQP-GLES2.functional.shaders.matrix.div.const_lowp_mat2_mat2_vertex
  209. dEQP-GLES2.functional.shaders.operator.unary_operator.pre_increment_effect.highp_ivec4_vertex
  210. dEQP-GLES2.functional.shaders.texture_functions.vertex.texture2dprojlod_vec3
  211. dEQP-GLES2.functional.shaders.swizzles.vector_swizzles.mediump_ivec3_stts_fragment
  212. dEQP-GLES2.functional.texture.filtering.2d.nearest_mipmap_nearest_linear_repeat_rgba8888
  213. dEQP-GLES2.functional.shaders.swizzles.vector_swizzles.mediump_ivec3_stts_fragment
  214. dEQP-GLES2.functional.shaders.loops.do_while_constant_iterations.only_continue_vertex
  215. dEQP-GLES2.functional.fbo.render.resize.tex2d_rgb_depth_component16
  216. dEQP-GLES2.functional.fbo.render.resize.tex2d_rgba_depth_component16
  217. "
  218. - for test in $FLIP_FLOPS; do sed -i "/$test/d" results/expected-failures.txt results/results-$lava_job_id.csv; done
  219. - PASSED=$(grep pass$ results/results-$lava_job_id.csv | wc -l)
  220. - FAILED=$(grep fail$ results/results-$lava_job_id.csv | wc -l)
  221. - TOTAL=$(wc -l < results/results-$lava_job_id.csv)
  222. - 'echo "Passed: $PASSED ($(expr $PASSED \* 100 / $TOTAL)%)"'
  223. - 'echo "Failed: $FAILED ($(expr $FAILED \* 100 / $TOTAL)%)"'
  224. - 'echo "Total: $TOTAL"'
  225. - 'if [ $TOTAL != 16374 ]; then echo "WARNING: Unexpected count of results. Incomplete run?"; fi'
  226. - sed '/,pass/d' results/results-$lava_job_id.csv | sed 's/,fail//' > results/failures-$lava_job_id.txt
  227. - diff -u results/expected-failures.txt results/failures-$lava_job_id.txt
  228. artifacts:
  229. when: always
  230. paths:
  231. - results/
  232. test:armhf:
  233. extends: .test
  234. dependencies:
  235. - build:armhf
  236. test:arm64:
  237. extends: .test
  238. dependencies:
  239. - build:arm64