gitlab-ci/lava: Use files to list tests to skip
[mesa.git] / .gitlab-ci / lava-gitlab-ci.yml
1 variables:
2 LAVA_DEBIAN_VERSION: testing-slim
3 LAVA_IMAGE_TAG: "lava-2019-09-20-1"
4
5 include:
6 - project: 'wayland/ci-templates'
7 ref: 1f7f57c64ff4ebbf7292e3b7a13600518b8cb24c
8 file: '/templates/debian.yml'
9
10 # When to automatically run the CI
11 .ci-run-policy:
12 only:
13 - branches@mesa/mesa
14 - merge_requests
15 - /^ci([-/].*)?$/
16 retry:
17 max: 2
18 when:
19 - runner_system_failure
20
21 # Build Docker image with deqp, the rootfs and the build deps for Mesa
22 .lava-container:
23 extends:
24 - .debian@container-ifnot-exists
25 - .ci-run-policy
26 stage: containers
27 variables:
28 GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
29 DEBIAN_TAG: '${DEBIAN_ARCH}-${LAVA_IMAGE_TAG}'
30 DEBIAN_EXEC: 'DEBIAN_ARCH=${DEBIAN_ARCH}
31 GCC_ARCH=${GCC_ARCH}
32 KERNEL_ARCH=${KERNEL_ARCH}
33 VOLT_ARCH=${VOLT_ARCH}
34 DEFCONFIG=${DEFCONFIG}
35 DEVICE_TREES=${DEVICE_TREES}
36 KERNEL_IMAGE_NAME=${KERNEL_IMAGE_NAME}
37 bash .gitlab-ci/lava-debian-install.sh'
38 DEBIAN_VERSION: ${LAVA_DEBIAN_VERSION}
39
40 lava-container:armhf:
41 extends: .lava-container
42 variables:
43 DEBIAN_ARCH: "armhf"
44 GCC_ARCH: "arm-linux-gnueabihf"
45 KERNEL_ARCH: "arm"
46 VOLT_ARCH: "armhf"
47 DEFCONFIG: "arch/arm/configs/multi_v7_defconfig"
48 DEVICE_TREES: "arch/arm/boot/dts/rk3288-veyron-jaq.dtb"
49 KERNEL_IMAGE_NAME: "zImage"
50
51 lava-container:arm64:
52 extends: .lava-container
53 variables:
54 DEBIAN_ARCH: "arm64"
55 GCC_ARCH: "aarch64-linux-gnu"
56 KERNEL_ARCH: "arm64"
57 VOLT_ARCH: "aarch64"
58 DEFCONFIG: "arch/arm64/configs/defconfig"
59 DEVICE_TREES: "arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb"
60 KERNEL_IMAGE_NAME: "Image"
61
62 .lava-build:
63 stage: build
64 image: $CI_REGISTRY_IMAGE/debian/$LAVA_DEBIAN_VERSION:$DEBIAN_ARCH-$LAVA_IMAGE_TAG
65 extends:
66 - .ci-run-policy
67 cache:
68 key: ${CI_JOB_NAME}
69 paths:
70 - ccache
71 variables:
72 CCACHE_COMPILERCHECK: "content"
73 # Use ccache transparently, and print stats before/after
74 before_script:
75 - mkdir -p results mesa-build
76 - mkdir -p ccache
77 - export PATH="/usr/lib/ccache:$PATH"
78 - export CCACHE_BASEDIR="$PWD"
79 - export CCACHE_DIR="$PWD/ccache"
80 - ccache --max-size=1500M
81 - ccache --zero-stats || true
82 - ccache --show-stats || true
83 script:
84 # Build Mesa
85 - /usr/share/meson/debcrossgen --arch ${DEBIAN_ARCH} -o /tmp/cross_file.txt
86 - meson . mesa-build
87 --cross-file /tmp/cross_file.txt
88 --libdir /artifacts/rootfs/mesa/lib/
89 --buildtype debugoptimized
90 -D gallium-drivers=kmsro,panfrost
91 -D dri-drivers=
92 -D prefix=/artifacts/rootfs/mesa
93 -D glx=disabled
94 -D gbm=false
95 -D egl=true
96 -D platforms=surfaceless
97 -D osmesa=none
98 -D dri3=false
99 -D gallium-vdpau=false
100 -D gallium-xvmc=false
101 -D gallium-omx=disabled
102 -D gallium-va=false
103 -D gallium-xa=false
104 -D gallium-nine=false
105 -D llvm=false
106 - ninja -C mesa-build -j4
107 - ninja -C mesa-build install
108 - find /artifacts/rootfs/mesa/lib -name \*.so -exec ${GCC_ARCH}-strip {} \;
109
110 - du -sh /artifacts/rootfs/mesa/*
111 - rm -rf /artifacts/rootfs/mesa/include
112
113 # Pack rootfs
114 - cp .gitlab-ci/lava-deqp-runner.sh /artifacts/rootfs/deqp/.
115 - cp .gitlab-ci/deqp-*-fails.txt /artifacts/rootfs/deqp/.
116 - cp .gitlab-ci/deqp-*-skips.txt /artifacts/rootfs/deqp/.
117 - du -sh /artifacts/rootfs/deqp/*
118 - find /artifacts/rootfs/ -type f -printf "%s\t%p\n" | sort -n
119 - pushd /artifacts/rootfs/ ; find -H | cpio -H newc -v -o | gzip -c - > $CI_PROJECT_DIR/results/panfrost-rootfs-${DEBIAN_ARCH}.cpio.gz; popd
120
121 # Copy kernel and DT
122 - cp /artifacts/${KERNEL_IMAGE_NAME} /artifacts/*.dtb $CI_PROJECT_DIR/results/.
123
124 # Generate LAVA job
125 - cd $CI_PROJECT_DIR
126 - .gitlab-ci/generate_lava.py
127 --template .gitlab-ci/lava-deqp.yml.jinja2
128 --arch ${DEBIAN_ARCH}
129 --base-artifacts-url $CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/results
130 --device-type ${DEVICE_TYPE}
131 --kernel-image-name ${KERNEL_IMAGE_NAME}
132 --gpu-version ${GPU_VERSION}
133 > results/lava-deqp.yml
134 after_script:
135 - export CCACHE_DIR="$PWD/ccache"
136 - ccache --show-stats
137 artifacts:
138 when: always
139 paths:
140 - results/
141
142 lava-build:armhf:
143 extends: .lava-build
144 needs: ["lava-container:armhf"]
145 variables:
146 DEBIAN_ARCH: "armhf"
147 GCC_ARCH: "arm-linux-gnueabihf"
148 DEVICE_TYPE: "rk3288-veyron-jaq"
149 KERNEL_IMAGE_NAME: "zImage"
150 GPU_VERSION: "t760"
151
152 lava-build:arm64:
153 extends: .lava-build
154 needs: ["lava-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 GPU_VERSION: "t860"
161
162 .lava-test:
163 stage: test
164 extends:
165 - .ci-run-policy
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 - '[[ "$result" == "pass" ]]'
176 artifacts:
177 when: always
178 paths:
179 - results/
180
181 panfrost-t760-test:armhf:
182 image: $CI_REGISTRY_IMAGE/debian/$LAVA_DEBIAN_VERSION:armhf-$LAVA_IMAGE_TAG
183 extends: .lava-test
184 needs:
185 - lava-container:armhf
186 - lava-build:armhf
187 dependencies:
188 - lava-build:armhf
189 tags:
190 - lava-rk3288-veyron-jaq
191
192 panfrost-t860-test:arm64:
193 image: $CI_REGISTRY_IMAGE/debian/$LAVA_DEBIAN_VERSION:arm64-$LAVA_IMAGE_TAG
194 extends: .lava-test
195 needs:
196 - lava-container:arm64
197 - lava-build:arm64
198 dependencies:
199 - lava-build:arm64
200 tags:
201 - lava-rk3399-gru-kevin
202