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