panfrost/ci: Use Volt-based runner for dEQP tests
[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-08-21-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 - cp src/gallium/drivers/panfrost/ci/expected-failures.txt /artifacts/rootfs/deqp/.
105 - du -sh /artifacts/rootfs/deqp/*
106 - find /artifacts/rootfs/ -type f -printf "%s\t%p\n" | sort -n
107 - cd /artifacts/rootfs/ ; find -H | cpio -H newc -v -o | gzip -c - > $CI_PROJECT_DIR/results/panfrost-rootfs-${DEBIAN_ARCH}.cpio.gz
108
109 # Copy kernel and DT
110 - cp /artifacts/${KERNEL_IMAGE_NAME} /artifacts/*.dtb $CI_PROJECT_DIR/results/.
111
112 # Generate LAVA job
113 - cd $CI_PROJECT_DIR
114 - src/gallium/drivers/panfrost/ci/generate_lava.py
115 --template src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2
116 --arch ${DEBIAN_ARCH}
117 --base-artifacts-url $CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/results
118 --device-type ${DEVICE_TYPE}
119 --kernel-image-name ${KERNEL_IMAGE_NAME}
120 > results/lava-deqp.yml
121 - cp src/gallium/drivers/panfrost/ci/expected-failures.txt results/.
122 artifacts:
123 when: always
124 paths:
125 - results/
126
127 #build:armhf:
128 # extends: .build
129 # variables:
130 # DEBIAN_ARCH: "armhf"
131 # GCC_ARCH: "arm-linux-gnueabihf"
132 # DEVICE_TYPE: "rk3288-veyron-jaq"
133 # KERNEL_IMAGE_NAME: "zImage"
134
135 build:arm64:
136 extends: .build
137 variables:
138 DEBIAN_ARCH: "arm64"
139 GCC_ARCH: "aarch64-linux-gnu"
140 DEVICE_TYPE: "rk3399-gru-kevin"
141 KERNEL_IMAGE_NAME: "Image"
142
143 .test:
144 stage: test
145 tags:
146 - idle-jobs
147 image: $CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:arm64-${IMAGE_TAG} # Any of the images will be fine
148 variables:
149 GIT_STRATEGY: none # no need to pull the whole tree for submitting the job
150 script:
151 - mkdir -p ~/.config/
152 - |
153 echo "default:
154 uri: https://lava.collabora.co.uk/RPC2
155 timeout: 120
156 username: jenkins-fdo
157 token: $LAVA_TOKEN
158 " > ~/.config/lavacli.yaml
159 - lava_job_id=`lavacli jobs submit $CI_PROJECT_DIR/results/lava-deqp.yml`
160 - echo $lava_job_id
161 - lavacli jobs logs $lava_job_id | grep -a -v "{'case':" | tee results/lava-deqp-$lava_job_id.log
162 - lavacli jobs show $lava_job_id
163 - result=`lavacli results $lava_job_id 0_deqp deqp | head -1`
164 - echo $result
165 - '[[ "$result" == "pass" ]]'
166 artifacts:
167 when: always
168 paths:
169 - results/
170
171 #test:armhf:
172 # extends: .test
173 # dependencies:
174 # - build:armhf
175
176 test:arm64:
177 extends: .test
178 dependencies:
179 - build:arm64
180