panfrost/ci: Run dEQP with the surfaceless platform
[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-09-10-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 VOLT_ARCH=${VOLT_ARCH}
50 DEFCONFIG=${DEFCONFIG}
51 DEVICE_TREES=${DEVICE_TREES}
52 KERNEL_IMAGE_NAME=${KERNEL_IMAGE_NAME}
53 bash src/gallium/drivers/panfrost/ci/debian-install.sh'
54
55 container:armhf:
56 extends: .container
57 variables:
58 DEBIAN_ARCH: "armhf"
59 GCC_ARCH: "arm-linux-gnueabihf"
60 KERNEL_ARCH: "arm"
61 VOLT_ARCH: "armhf"
62 DEFCONFIG: "arch/arm/configs/multi_v7_defconfig"
63 DEVICE_TREES: "arch/arm/boot/dts/rk3288-veyron-jaq.dtb"
64 KERNEL_IMAGE_NAME: "zImage"
65
66 container:arm64:
67 extends: .container
68 variables:
69 DEBIAN_ARCH: "arm64"
70 GCC_ARCH: "aarch64-linux-gnu"
71 KERNEL_ARCH: "arm64"
72 VOLT_ARCH: "aarch64"
73 DEFCONFIG: "arch/arm64/configs/defconfig"
74 DEVICE_TREES: "arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb"
75 KERNEL_IMAGE_NAME: "Image"
76
77 .build:
78 stage: build
79 image: $CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:${DEBIAN_ARCH}-${IMAGE_TAG}
80 cache:
81 paths:
82 - ccache
83 before_script:
84 - mkdir -p results mesa-build
85 - mkdir -p ccache
86 script:
87 - export CCACHE_BASEDIR=$CI_PROJECT_DIR
88 - export CCACHE_DIR=$CI_PROJECT_DIR/ccache
89 - export PATH="/usr/lib/ccache:$PATH"
90 - ccache -s
91
92 # Build Mesa
93 - /usr/share/meson/debcrossgen --arch ${DEBIAN_ARCH} -o /tmp/cross_file.txt
94 - meson . mesa-build
95 --cross-file /tmp/cross_file.txt
96 --libdir /artifacts/rootfs/mesa/lib/
97 --buildtype release
98 -D gallium-drivers=kmsro,panfrost
99 -D dri-drivers=
100 -D prefix=/artifacts/rootfs/mesa
101 -D glx=disabled
102 -D gbm=false
103 -D egl=true
104 -D platforms=surfaceless
105 -D osmesa=none
106 -D dri3=false
107 -D gallium-vdpau=false
108 -D gallium-xvmc=false
109 -D gallium-omx=disabled
110 -D gallium-va=false
111 -D gallium-xa=false
112 -D gallium-nine=false
113 -D llvm=false
114 - ninja -C mesa-build install
115 - du -sh /artifacts/rootfs/mesa/*
116 - rm -rf /artifacts/rootfs/mesa/include
117
118 # Pack rootfs
119 - cp src/gallium/drivers/panfrost/ci/deqp-runner.sh /artifacts/rootfs/deqp/.
120 - cp src/gallium/drivers/panfrost/ci/expected-failures.txt /artifacts/rootfs/deqp/.
121 - du -sh /artifacts/rootfs/deqp/*
122 - find /artifacts/rootfs/ -type f -printf "%s\t%p\n" | sort -n
123 - cd /artifacts/rootfs/ ; find -H | cpio -H newc -v -o | gzip -c - > $CI_PROJECT_DIR/results/panfrost-rootfs-${DEBIAN_ARCH}.cpio.gz
124
125 # Copy kernel and DT
126 - cp /artifacts/${KERNEL_IMAGE_NAME} /artifacts/*.dtb $CI_PROJECT_DIR/results/.
127
128 # Generate LAVA job
129 - cd $CI_PROJECT_DIR
130 - src/gallium/drivers/panfrost/ci/generate_lava.py
131 --template src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2
132 --arch ${DEBIAN_ARCH}
133 --base-artifacts-url $CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/results
134 --device-type ${DEVICE_TYPE}
135 --kernel-image-name ${KERNEL_IMAGE_NAME}
136 > results/lava-deqp.yml
137 - cp src/gallium/drivers/panfrost/ci/expected-failures.txt results/.
138 artifacts:
139 when: always
140 paths:
141 - results/
142
143 build:armhf:
144 extends: .build
145 needs: ["container:armhf"]
146 variables:
147 DEBIAN_ARCH: "armhf"
148 GCC_ARCH: "arm-linux-gnueabihf"
149 DEVICE_TYPE: "rk3288-veyron-jaq"
150 KERNEL_IMAGE_NAME: "zImage"
151
152 build:arm64:
153 extends: .build
154 needs: ["container:arm64"]
155 variables:
156 DEBIAN_ARCH: "arm64"
157 GCC_ARCH: "aarch64-linux-gnu"
158 DEVICE_TYPE: "rk3399-gru-kevin"
159 KERNEL_IMAGE_NAME: "Image"
160
161 .test:
162 stage: test
163 tags:
164 - idle-lava
165 image: $CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:arm64-${IMAGE_TAG} # Any of the images will be fine
166 variables:
167 GIT_STRATEGY: none # no need to pull the whole tree for submitting the job
168 script:
169 - lava_job_id=`lavacli jobs submit $CI_PROJECT_DIR/results/lava-deqp.yml`
170 - echo $lava_job_id
171 - lavacli jobs logs $lava_job_id | grep -a -v "{'case':" | tee results/lava-deqp-$lava_job_id.log
172 - lavacli jobs show $lava_job_id
173 - result=`lavacli results $lava_job_id 0_deqp deqp | head -1`
174 - echo $result
175
176 # Don't error out on RK3288
177 - '[[ "$result" == "pass" || -f results/rk3288-veyron-jaq.dtb ]]'
178 artifacts:
179 when: always
180 paths:
181 - results/
182
183 test:armhf:
184 extends: .test
185 needs: ["build:armhf"]
186 dependencies:
187 - build:armhf
188
189 test:arm64:
190 extends: .test
191 needs: ["build:arm64"]
192 dependencies:
193 - build:arm64
194