gitlab-ci: Consolidate container and build stages for LAVA
Use the normal build job to also prepare the artifacts for LAVA jobs.
For that, the build container needs to also build the test suites,
kernel, ramdisk, etc.
Then the build job will place the just-built Mesa in the ramdisk and the
test job can generate a LAVA job and point to those artifacts.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3295>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3295>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b358998..464c26d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,8 +6,6 @@
# Must be the same as in .gitlab-ci/lava-gitlab-ci.yml
ref: 0a9bdd33a98f05af6761ab118b5074952242aab0
file: '/templates/debian.yml'
-
-include:
- local: '.gitlab-ci/lava-gitlab-ci.yml'
stages:
@@ -36,7 +34,7 @@
# https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
- artifacts
-# Build the "normal" (non-LAVA) CI docker images.
+# Build the CI docker images.
#
# DEBIAN_TAG is the tag of the docker image used by later stage jobs. If the
# image doesn't exist yet, the container stage job generates it.
@@ -96,7 +94,7 @@
- .debian@container-ifnot-exists
- .container
variables:
- DEBIAN_TAG: &x86_build "2020-01-07"
+ DEBIAN_TAG: &x86_build "2020-01-14"
.use-x86_build:
variables:
@@ -109,13 +107,13 @@
x86_test-gl:
extends: x86_build
variables:
- DEBIAN_TAG: &x86_test-gl "2020-01-07"
+ DEBIAN_TAG: &x86_test-gl "2020-01-14"
# Debian 10 based x86 test image for VK
x86_test-vk:
extends: x86_build
variables:
- DEBIAN_TAG: &x86_test-vk "2020-01-07"
+ DEBIAN_TAG: &x86_test-vk "2020-01-14"
# Can only be triggered manually on personal branches because RADV is the only
# driver that does Vulkan testing at the moment.
rules:
@@ -149,7 +147,7 @@
- .debian@container-ifnot-exists@arm64v8
- .container
variables:
- DEBIAN_TAG: &arm_build "2019-11-13"
+ DEBIAN_TAG: &arm_build "2020-01-14"
.use-arm_build:
variables:
@@ -304,23 +302,28 @@
variables:
VULKAN_DRIVERS: freedreno
GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
+ BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
-D I-love-half-baked-turnips=true
tags:
- aarch64
meson-armhf:
- extends: .meson-arm
+ extends:
+ - .meson-arm
+ - .ci-deqp-artifacts
variables:
CROSS: armhf
LLVM_VERSION: "7"
+ script:
+ - .gitlab-ci/meson-build.sh
+ - .gitlab-ci/prepare-artifacts.sh
meson-arm64:
extends:
- .meson-arm
- .ci-deqp-artifacts
variables:
- BUILDTYPE: "debugoptimized"
LLVM_VERSION: "8"
VULKAN_DRIVERS: "freedreno,amd"
script:
diff --git a/.gitlab-ci/build-deqp-gl.sh b/.gitlab-ci/build-deqp-gl.sh
index 64e4db0..6316495 100644
--- a/.gitlab-ci/build-deqp-gl.sh
+++ b/.gitlab-ci/build-deqp-gl.sh
@@ -5,7 +5,7 @@
https://github.com/KhronosGroup/VK-GL-CTS.git \
-b opengl-es-cts-3.2.5.1 \
/VK-GL-CTS
-cd /VK-GL-CTS
+pushd /VK-GL-CTS
# Fix surfaceless build
git cherry-pick -x 22f41e5e321c6dcd8569c4dad91bce89f06b3670
git cherry-pick -x 1daa8dff73161ea60ead965bd6c9f2a0a2165648
@@ -24,8 +24,9 @@
# Save the testlog stylesheets:
cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
+popd
-cd /deqp
+pushd /deqp
cmake -G Ninja \
-DDEQP_TARGET=surfaceless \
-DCMAKE_BUILD_TYPE=Release \
@@ -57,3 +58,4 @@
${STRIP_CMD:-strip} modules/*/deqp-*
du -sh *
rm -rf /VK-GL-CTS
+popd
diff --git a/.gitlab-ci/container/arm_build.sh b/.gitlab-ci/container/arm_build.sh
index c08746b..a24d81e 100644
--- a/.gitlab-ci/container/arm_build.sh
+++ b/.gitlab-ci/container/arm_build.sh
@@ -13,22 +13,36 @@
bc \
bison \
ccache \
+ cmake \
+ cpio \
crossbuild-essential-armhf \
+ debootstrap \
flex \
g++ \
gettext \
+ git \
+ lavacli \
libdrm-dev:armhf \
+ libegl1-mesa-dev \
+ libegl1-mesa-dev:armhf \
libelf-dev \
libelf-dev:armhf \
libexpat1-dev \
libexpat1-dev:armhf \
+ libgles2-mesa-dev \
+ libgles2-mesa-dev:armhf \
+ libpng-dev \
+ libpng-dev:armhf \
libssl-dev \
+ libvulkan-dev \
+ libvulkan-dev:armhf \
llvm-7-dev:armhf \
llvm-8-dev \
meson \
pkg-config \
python \
python3-mako \
+ unzip \
wget \
zlib1g-dev
@@ -49,6 +63,11 @@
# Don't need wrapper for armhf executables
sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
+############### Generate kernel, ramdisk, test suites, etc for LAVA jobs
+
+DEBIAN_ARCH=arm64 . .gitlab-ci/container/lava_arm.sh
+DEBIAN_ARCH=armhf . .gitlab-ci/container/lava_arm.sh
+
apt-get purge -y \
wget
diff --git a/.gitlab-ci/container/lava_arm.sh b/.gitlab-ci/container/lava_arm.sh
index 99c49ad..3b5cad3 100644
--- a/.gitlab-ci/container/lava_arm.sh
+++ b/.gitlab-ci/container/lava_arm.sh
@@ -3,110 +3,61 @@
set -e
set -o xtrace
-############### Install packages for building
-dpkg --add-architecture ${DEBIAN_ARCH}
-echo 'deb-src https://deb.debian.org/debian testing main' > /etc/apt/sources.list.d/deb-src.list
-apt-get update
-apt-get -y install ca-certificates
-apt-get -y install --no-install-recommends \
- crossbuild-essential-${DEBIAN_ARCH} \
- meson \
- g++ \
- git \
- ccache \
- pkg-config \
- python3-setuptools \
- python-mako \
- python3-mako \
- bison \
- flex \
- gettext \
- cmake \
- bc \
- libssl-dev \
- lavacli \
- csvkit \
- curl \
- unzip \
- wget \
- debootstrap \
- procps \
- qemu-user-static \
- cpio \
- libegl1-mesa-dev \
- \
- libdrm-dev:${DEBIAN_ARCH} \
- libx11-dev:${DEBIAN_ARCH} \
- libxxf86vm-dev:${DEBIAN_ARCH} \
- libexpat1-dev:${DEBIAN_ARCH} \
- libsensors-dev:${DEBIAN_ARCH} \
- libxfixes-dev:${DEBIAN_ARCH} \
- libxdamage-dev:${DEBIAN_ARCH} \
- libxext-dev:${DEBIAN_ARCH} \
- x11proto-dev:${DEBIAN_ARCH} \
- libx11-xcb-dev:${DEBIAN_ARCH} \
- libxcb-dri2-0-dev:${DEBIAN_ARCH} \
- libxcb-glx0-dev:${DEBIAN_ARCH} \
- libxcb-xfixes0-dev:${DEBIAN_ARCH} \
- libxcb-dri3-dev:${DEBIAN_ARCH} \
- libxcb-present-dev:${DEBIAN_ARCH} \
- libxcb-randr0-dev:${DEBIAN_ARCH} \
- libxcb-sync-dev:${DEBIAN_ARCH} \
- libxrandr-dev:${DEBIAN_ARCH} \
- libxshmfence-dev:${DEBIAN_ARCH} \
- libelf-dev:${DEBIAN_ARCH} \
- zlib1g-dev:${DEBIAN_ARCH} \
- libglvnd-core-dev:${DEBIAN_ARCH} \
- libgles2-mesa-dev:${DEBIAN_ARCH} \
- libegl1-mesa-dev:${DEBIAN_ARCH} \
- libpng-dev:${DEBIAN_ARCH} \
- libvulkan-dev:${DEBIAN_ARCH} \
- libvulkan1:${DEBIAN_ARCH} \
- libclang-7-dev:${DEBIAN_ARCH}
-
+if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
+ GCC_ARCH="aarch64-linux-gnu"
+ KERNEL_ARCH="arm64"
+ DEFCONFIG="arch/arm64/configs/defconfig"
+ DEVICE_TREES="arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dtb arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dtb arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dtb"
+ KERNEL_IMAGE_NAME="Image"
+else
+ GCC_ARCH="arm-linux-gnueabihf"
+ KERNEL_ARCH="arm"
+ DEFCONFIG="arch/arm/configs/multi_v7_defconfig"
+ DEVICE_TREES="arch/arm/boot/dts/rk3288-veyron-jaq.dtb arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dtb"
+ KERNEL_IMAGE_NAME="zImage"
+fi
############### Build dEQP runner
-/usr/share/meson/debcrossgen --arch ${DEBIAN_ARCH} -o /tmp/cross_file.txt
-EXTRA_MESON_ARGS="--cross-file /tmp/cross_file.txt"
+if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
+ EXTRA_MESON_ARGS="--cross-file /cross_file-armhf.txt"
+fi
. .gitlab-ci/build-cts-runner.sh
-mkdir -p /artifacts/rootfs/usr/bin
-mv /usr/local/bin/deqp-runner /artifacts/rootfs/usr/bin/.
+mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin
+mv /usr/local/bin/deqp-runner /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin/.
############### Build dEQP
EXTRA_CMAKE_ARGS="-DCMAKE_C_COMPILER=${GCC_ARCH}-gcc -DCMAKE_CXX_COMPILER=${GCC_ARCH}-g++"
STRIP_CMD="${GCC_ARCH}-strip"
. .gitlab-ci/build-deqp-gl.sh
-mv /deqp /artifacts/rootfs/.
+mv /deqp /lava-files/rootfs-${DEBIAN_ARCH}/.
############### Cross-build kernel
KERNEL_URL="https://gitlab.freedesktop.org/tomeu/linux/-/archive/v5.5-rc5-panfrost-fixes/linux-v5.5-rc5-panfrost-fixes.tar.gz"
-export ARCH=${KERNEL_ARCH}
-export CROSS_COMPILE="${GCC_ARCH}-"
-mkdir -p /kernel
-wget -qO- ${KERNEL_URL} | tar -xz --strip-components=1 -C /kernel
-cd /kernel
-./scripts/kconfig/merge_config.sh ${DEFCONFIG} /tmp/clone/.gitlab-ci/${KERNEL_ARCH}.config
+if [[ "$DEBIAN_ARCH" = "armhf" ]]; then
+ export ARCH=${KERNEL_ARCH}
+ export CROSS_COMPILE="${GCC_ARCH}-"
+fi
+
+mkdir -p kernel
+wget -qO- ${KERNEL_URL} | tar -xz --strip-components=1 -C kernel
+pushd kernel
+./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/${KERNEL_ARCH}.config
make -j12 ${KERNEL_IMAGE_NAME} dtbs
-cp arch/${KERNEL_ARCH}/boot/${KERNEL_IMAGE_NAME} /artifacts/.
-cp ${DEVICE_TREES} /artifacts/.
-rm -rf /kernel
+cp arch/${KERNEL_ARCH}/boot/${KERNEL_IMAGE_NAME} /lava-files/.
+cp ${DEVICE_TREES} /lava-files/.
+popd
+rm -rf kernel
############### Create rootfs
-cp /tmp/clone/.gitlab-ci/create-rootfs.sh /artifacts/rootfs/.
-mkdir -p /artifacts/rootfs/bin
-cp /usr/bin/qemu-aarch64-static /artifacts/rootfs/bin
-cp /usr/bin/qemu-arm-static /artifacts/rootfs/bin
-
set +e
-debootstrap --variant=minbase --arch=${DEBIAN_ARCH} testing /artifacts/rootfs/ http://deb.debian.org/debian
-cat /artifacts/rootfs/debootstrap/debootstrap.log
+debootstrap --variant=minbase --arch=${DEBIAN_ARCH} testing /lava-files/rootfs-${DEBIAN_ARCH}/ http://deb.debian.org/debian
+cat /lava-files/rootfs-${DEBIAN_ARCH}/debootstrap/debootstrap.log
set -e
-chroot /artifacts/rootfs sh /create-rootfs.sh
-rm /artifacts/rootfs/bin/qemu-arm-static
-rm /artifacts/rootfs/bin/qemu-aarch64-static
-rm /artifacts/rootfs/create-rootfs.sh
+cp .gitlab-ci/create-rootfs.sh /lava-files/rootfs-${DEBIAN_ARCH}/.
+chroot /lava-files/rootfs-${DEBIAN_ARCH} sh /create-rootfs.sh
+rm /lava-files/rootfs-${DEBIAN_ARCH}/create-rootfs.sh
diff --git a/.gitlab-ci/create-rootfs.sh b/.gitlab-ci/create-rootfs.sh
index e84f227..8109240 100644
--- a/.gitlab-ci/create-rootfs.sh
+++ b/.gitlab-ci/create-rootfs.sh
@@ -1,8 +1,23 @@
-#!/bin/sh
+#!/bin/bash
set -ex
-apt-get -y install --no-install-recommends initramfs-tools libpng16-16 strace libsensors5 libexpat1 libdrm2
+LLVM=libllvm8
+
+# LLVMPipe on armhf is broken with LLVM 8
+if [ `dpkg --print-architecture` = "armhf" ]; then
+ LLVM=libllvm7
+fi
+
+apt-get -y install --no-install-recommends \
+ initramfs-tools \
+ libpng16-16 \
+ strace \
+ libsensors5 \
+ libexpat1 \
+ libdrm2 \
+ libdrm-nouveau2 \
+ $LLVM
passwd root -d
chsh -s /bin/sh
ln -s /bin/sh /init
@@ -82,15 +97,10 @@
"libsemanage1 libsemanage-common "\
"libsepol1 "\
"gzip "\
-"gnupg "\
"gpgv "\
"hostname "\
"adduser "\
"debian-archive-keyring "\
-"libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libegl-mesa0 libgles2 "\
-"libllvm7 "\
-"libx11-data libthai-data "\
-"systemd dbus "\
# Removing unneeded packages
for PACKAGE in ${UNNEEDED_PACKAGES}
diff --git a/.gitlab-ci/generate_lava.py b/.gitlab-ci/generate_lava.py
index 46bc2e1..f83f0e8 100755
--- a/.gitlab-ci/generate_lava.py
+++ b/.gitlab-ci/generate_lava.py
@@ -2,79 +2,38 @@
from jinja2 import Environment, FileSystemLoader
import argparse
-
-device_types = {
- "sun50i-h6-pine-h64": {
- "gpu_version": "panfrost-t720",
- "boot_method": "u-boot",
- "lava_device_type": "sun50i-h6-pine-h64",
- "kernel_image_type": "type: image",
- "tags": [],
- },
- "rk3288-veyron-jaq": {
- "gpu_version": "panfrost-t760",
- "boot_method": "depthcharge",
- "lava_device_type": "rk3288-veyron-jaq",
- "kernel_image_type": "",
- "tags": [],
- },
- "rk3399-gru-kevin": {
- "gpu_version": "panfrost-t860",
- "boot_method": "depthcharge",
- "lava_device_type": "rk3399-gru-kevin",
- "kernel_image_type": "",
- "tags": [],
- },
- "sun8i-h3-libretech-all-h3-cc": {
- "gpu_version": "lima",
- "boot_method": "u-boot",
- "lava_device_type": "sun8i-h3-libretech-all-h3-cc",
- "kernel_image_type": "type: zimage",
- "tags": [],
- },
- "meson-gxl-s905x-libretech-cc": {
- "gpu_version": "lima",
- "boot_method": "u-boot",
- "lava_device_type": "meson-gxl-s905x-libretech-cc",
- "kernel_image_type": "type: image",
- "tags": [],
- },
- "meson-gxm-khadas-vim2": {
- "gpu_version": "panfrost-t820",
- "boot_method": "u-boot",
- "lava_device_type": "meson-gxm-khadas-vim2",
- "kernel_image_type": "type: image",
- "tags": ["panfrost"],
- },
-}
+import os
parser = argparse.ArgumentParser()
parser.add_argument("--template")
parser.add_argument("--base-artifacts-url")
-parser.add_argument("--arch")
-parser.add_argument("--device-types", nargs="+")
+parser.add_argument("--device-type")
parser.add_argument("--kernel-image-name")
+parser.add_argument("--kernel-image-type", nargs='?', default="")
+parser.add_argument("--gpu-version")
+parser.add_argument("--boot-method")
+parser.add_argument("--lava-tags", nargs='?', default="")
+parser.add_argument("--env-vars", nargs='?', default="")
+parser.add_argument("--deqp-version")
+parser.add_argument("--arch")
args = parser.parse_args()
-env = Environment(loader = FileSystemLoader('.'), trim_blocks=True, lstrip_blocks=True)
-template = env.get_template(args.template)
+env = Environment(loader = FileSystemLoader(os.path.dirname(args.template)), trim_blocks=True, lstrip_blocks=True)
+template = env.get_template(os.path.basename(args.template))
-for device_type in args.device_types:
- values = {}
- values['base_artifacts_url'] = args.base_artifacts_url
- values['arch'] = args.arch
- values['device_type'] = device_type
- values['kernel_image_name'] = args.kernel_image_name
- values['lava_device_type'] = device_types[device_type]['lava_device_type']
- values['gpu_version'] = device_types[device_type]['gpu_version']
- values['boot_method'] = device_types[device_type]['boot_method']
- values['kernel_image_type'] = device_types[device_type]['kernel_image_type']
- values['tags'] = device_types[device_type]['tags']
- values['fails_file'] = 'deqp-%s-fails.txt' % device_types[device_type]['gpu_version']
- values['skips_file'] = 'deqp-%s-skips.txt' % device_types[device_type]['gpu_version']
- values['deqp_version'] = 'gles2'
+values = {}
+values['base_artifacts_url'] = args.base_artifacts_url
+values['device_type'] = args.device_type
+values['kernel_image_name'] = args.kernel_image_name
+values['kernel_image_type'] = args.kernel_image_type
+values['gpu_version'] = args.gpu_version
+values['boot_method'] = args.boot_method
+values['tags'] = args.lava_tags
+values['env_vars'] = args.env_vars
+values['deqp_version'] = args.deqp_version
+values['arch'] = args.arch
- f = open('results/lava-deqp-%s.yml' % device_type, "w")
- f.write(template.render(values))
- f.close()
+f = open('lava-deqp.yml', "w")
+f.write(template.render(values))
+f.close()
diff --git a/.gitlab-ci/lava-deqp.yml.jinja2 b/.gitlab-ci/lava-deqp.yml.jinja2
index 55b87ba..c974a66 100644
--- a/.gitlab-ci/lava-deqp.yml.jinja2
+++ b/.gitlab-ci/lava-deqp.yml.jinja2
@@ -1,5 +1,5 @@
job_name: mesa-deqp-{{ gpu_version }}
-device_type: {{ lava_device_type }}
+device_type: {{ device_type }}
timeouts:
job:
minutes: 40
@@ -23,7 +23,9 @@
to: tftp
kernel:
url: {{ base_artifacts_url }}/{{ kernel_image_name }}
+{% if kernel_image_type %}
{{ kernel_image_type }}
+{% endif %}
ramdisk:
url: {{ base_artifacts_url }}/lava-rootfs-{{ arch }}.cpio.gz
compression: gz
@@ -58,12 +60,14 @@
- mkdir -p /dev/pts
- mount -t devpts devpts /dev/pts
- - export MESA_GLES_VERSION_OVERRIDE=3.0
- - export DEQP_PARALLEL=6
+{% if env_vars %}
+ - export {{ env_vars }}
+{% endif %}
+
- export DEQP_NO_SAVE_RESULTS=1
- 'export DEQP_RUNNER_OPTIONS="--compact-display false --shuffle false"'
- - export DEQP_EXPECTED_FAILS={{ fails_file }}
- - export DEQP_SKIPS={{ skips_file }}
+ - export DEQP_EXPECTED_FAILS=deqp-{{ gpu_version }}-fails.txt
+ - export DEQP_SKIPS=deqp-{{ gpu_version }}-skips.txt
- export DEQP_VER={{ deqp_version }}
- export LIBGL_DRIVERS_PATH=`pwd`/install/lib/dri
diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml
index e7711d3..d5bdb92 100644
--- a/.gitlab-ci/lava-gitlab-ci.yml
+++ b/.gitlab-ci/lava-gitlab-ci.yml
@@ -1,144 +1,30 @@
-include:
- - project: 'wayland/ci-templates'
- # Must be the same as in .gitlab-ci.yml
- ref: 0a9bdd33a98f05af6761ab118b5074952242aab0
- file: '/templates/debian.yml'
-
-# Build Docker image with deqp, the rootfs and the build deps for Mesa
-.lava-container:
- extends:
- - .debian@container-ifnot-exists
- - .container
- variables:
- REPO_SUFFIX: ${CI_JOB_NAME}
- DEBIAN_TAG: &debian_tag '2020-01-13-1'
- DEBIAN_EXEC: 'DEBIAN_ARCH=${DEBIAN_ARCH}
- GCC_ARCH=${GCC_ARCH}
- KERNEL_ARCH=${KERNEL_ARCH}
- VOLT_ARCH=${VOLT_ARCH}
- DEFCONFIG=${DEFCONFIG}
- DEVICE_TREES="${DEVICE_TREES}"
- KERNEL_IMAGE_NAME=${KERNEL_IMAGE_NAME}
- bash .gitlab-ci/container/lava_arm.sh'
- DEBIAN_VERSION: testing-slim
-
-lava_armhf:
- extends: .lava-container
- variables:
- DEBIAN_ARCH: "armhf"
- GCC_ARCH: "arm-linux-gnueabihf"
- KERNEL_ARCH: "arm"
- VOLT_ARCH: "armhf"
- DEFCONFIG: "arch/arm/configs/multi_v7_defconfig"
- DEVICE_TREES: "arch/arm/boot/dts/rk3288-veyron-jaq.dtb arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dtb"
- KERNEL_IMAGE_NAME: "zImage"
-
-lava_arm64:
- extends: .lava-container
- variables:
- DEBIAN_ARCH: "arm64"
- GCC_ARCH: "aarch64-linux-gnu"
- KERNEL_ARCH: "arm64"
- VOLT_ARCH: "aarch64"
- DEFCONFIG: "arch/arm64/configs/defconfig"
- DEVICE_TREES: "arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dtb arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dtb arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dtb"
- KERNEL_IMAGE_NAME: "Image"
-
-.lava-build:
- variables:
- TAG: *debian_tag
- image: $CI_REGISTRY_IMAGE/debian/lava_${DEBIAN_ARCH}:$TAG
- extends:
- - .build-linux
- - .ci-run-policy
- script:
- # Build Mesa
- - mkdir -p results mesa-build
- - mkdir -p ccache
- - /usr/share/meson/debcrossgen --arch ${DEBIAN_ARCH} -o /tmp/cross_file.txt
- - meson . mesa-build
- --cross-file /tmp/cross_file.txt
- --libdir /artifacts/rootfs/mesa/lib/
- --buildtype debugoptimized
- -D gallium-drivers=kmsro,panfrost,lima
- -D dri-drivers=
- -D prefix=/artifacts/rootfs/mesa
- -D glx=disabled
- -D gbm=false
- -D egl=true
- -D platforms=surfaceless
- -D osmesa=none
- -D dri3=false
- -D gallium-vdpau=false
- -D gallium-xvmc=false
- -D gallium-omx=disabled
- -D gallium-va=false
- -D gallium-xa=false
- -D gallium-nine=false
- -D llvm=false
- - ninja -C mesa-build -j4
- - ninja -C mesa-build install
- - find /artifacts/rootfs/mesa/lib -name \*.so -exec ${GCC_ARCH}-strip {} \;
-
- - du -sh /artifacts/rootfs/mesa/*
- - rm -rf /artifacts/rootfs/mesa/include
-
- # Pack rootfs
- - cp .gitlab-ci/deqp-runner.sh /artifacts/rootfs/deqp/.
- - cp .gitlab-ci/deqp-*-fails.txt /artifacts/rootfs/deqp/.
- - cp .gitlab-ci/deqp-*-skips.txt /artifacts/rootfs/deqp/.
- - du -sh /artifacts/rootfs/deqp/*
- - find /artifacts/rootfs/ -type f -printf "%s\t%p\n" | sort -n
- - pushd /artifacts/rootfs/ ; find -H | cpio -H newc -v -o | gzip -c - > $CI_PROJECT_DIR/results/lava-rootfs-${DEBIAN_ARCH}.cpio.gz; popd
-
- # Copy kernel and DT
- - cp /artifacts/${KERNEL_IMAGE_NAME} /artifacts/*.dtb $CI_PROJECT_DIR/results/.
-
- # Generate LAVA job
- - cd $CI_PROJECT_DIR
- - .gitlab-ci/generate_lava.py
- --template .gitlab-ci/lava-deqp.yml.jinja2
- --arch ${DEBIAN_ARCH}
- --base-artifacts-url $CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/results
- --device-types ${DEVICE_TYPES}
- --kernel-image-name ${KERNEL_IMAGE_NAME}
- artifacts:
- when: always
- paths:
- - results/
-
-lava-build:armhf:
- extends: .lava-build
- needs: ["lava_armhf"]
- variables:
- DEBIAN_ARCH: "armhf"
- GCC_ARCH: "arm-linux-gnueabihf"
- DEVICE_TYPES: "rk3288-veyron-jaq sun8i-h3-libretech-all-h3-cc"
- KERNEL_IMAGE_NAME: "zImage"
-
-lava-build:arm64:
- extends: .lava-build
- needs: ["lava_arm64"]
- variables:
- DEBIAN_ARCH: "arm64"
- GCC_ARCH: "aarch64-linux-gnu"
- DEVICE_TYPES: "rk3399-gru-kevin meson-gxl-s905x-libretech-cc sun50i-h6-pine-h64 meson-gxm-khadas-vim2"
- KERNEL_IMAGE_NAME: "Image"
-
.lava-test:
extends:
- .ci-run-policy
stage: test
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
- TAG: *debian_tag
- DEQP_PARALLEL: 6
- NIR_VALIDATE: 0
- image: $CI_REGISTRY_IMAGE/debian/lava_${DEBIAN_ARCH}:$TAG
+ ENV_VARS: "MESA_GLES_VERSION_OVERRIDE=3.0 DEQP_PARALLEL=6"
script:
- - lava_job_id=`lavacli jobs submit $CI_PROJECT_DIR/results/lava-deqp-$DEVICE_TYPE.yml`
+ - BUILD_JOB_ID=`cat artifacts/build_job_id.txt`
+ - >
+ artifacts/generate_lava.py \
+ --template artifacts/lava-deqp.yml.jinja2 \
+ --base-artifacts-url $CI_PROJECT_URL/-/jobs/$BUILD_JOB_ID/artifacts/raw/artifacts \
+ --device-type ${DEVICE_TYPE} \
+ --env-vars "${ENV_VARS}" \
+ --arch ${ARCH} \
+ --deqp-version gles2 \
+ --kernel-image-name ${KERNEL_IMAGE_NAME} \
+ --kernel-image-type "${KERNEL_IMAGE_TYPE}" \
+ --gpu-version ${GPU_VERSION} \
+ --boot-method ${BOOT_METHOD} \
+ --lava-tags "${LAVA_TAGS}"
+ - lava_job_id=`lavacli jobs submit lava-deqp.yml`
- echo $lava_job_id
- - lavacli jobs logs $lava_job_id | grep -a -v "{'case':" | tee results/lava-deqp-$lava_job_id.log
+ - rm -rf artifacts/*
+ - cp lava-deqp.yml artifacts/.
+ - lavacli jobs logs $lava_job_id | grep -a -v "{'case':" | tee artifacts/lava-deqp-$lava_job_id.log
- lavacli jobs show $lava_job_id
- result=`lavacli results $lava_job_id 0_deqp deqp | head -1`
- echo $result
@@ -146,32 +32,41 @@
artifacts:
when: always
paths:
- - results/
+ - artifacts/
.lava-test:armhf:
variables:
- DEBIAN_ARCH: armhf
- extends: .lava-test
- needs:
- - lava_armhf
- - lava-build:armhf
+ ARCH: armhf
+ KERNEL_IMAGE_NAME: zImage
+ KERNEL_IMAGE_TYPE: "type:\ zimage"
+ BOOT_METHOD: u-boot
+ extends:
+ - .lava-test
+ - .use-arm_build
dependencies:
- - lava-build:armhf
+ - meson-armhf
+ needs:
+ - meson-armhf
.lava-test:arm64:
variables:
- DEBIAN_ARCH: arm64
- extends: .lava-test
- needs:
- - lava_arm64
- - lava-build:arm64
+ ARCH: arm64
+ KERNEL_IMAGE_NAME: Image
+ KERNEL_IMAGE_TYPE: "type:\ image"
+ BOOT_METHOD: u-boot
+ extends:
+ - .lava-test
+ - .use-arm_build
dependencies:
- - lava-build:arm64
+ - meson-arm64
+ needs:
+ - meson-arm64
panfrost-t720-test:arm64:
extends: .lava-test:arm64
variables:
DEVICE_TYPE: sun50i-h6-pine-h64
+ GPU_VERSION: panfrost-t720
tags:
- lava-sun50i-h6-pine-h64
@@ -179,6 +74,9 @@
extends: .lava-test:armhf
variables:
DEVICE_TYPE: rk3288-veyron-jaq
+ GPU_VERSION: panfrost-t760
+ BOOT_METHOD: depthcharge
+ KERNEL_IMAGE_TYPE: ""
tags:
- lava-rk3288-veyron-jaq
@@ -186,6 +84,9 @@
extends: .lava-test:arm64
variables:
DEVICE_TYPE: rk3399-gru-kevin
+ GPU_VERSION: panfrost-t860
+ BOOT_METHOD: depthcharge
+ KERNEL_IMAGE_TYPE: ""
tags:
- lava-rk3399-gru-kevin
@@ -193,6 +94,8 @@
extends: .lava-test:arm64
variables:
DEVICE_TYPE: meson-gxm-khadas-vim2
+ GPU_VERSION: panfrost-t820
+ LAVA_TAGS: panfrost
tags:
- lava-meson-gxm-khadas-vim2
@@ -200,6 +103,7 @@
extends: .lava-test:armhf
variables:
DEVICE_TYPE: sun8i-h3-libretech-all-h3-cc
+ GPU_VERSION: lima
tags:
- lava-sun8i-h3-libretech-all-h3-cc
@@ -207,5 +111,6 @@
extends: .lava-test:arm64
variables:
DEVICE_TYPE: meson-gxl-s905x-libretech-cc
+ GPU_VERSION: lima
tags:
- lava-meson-gxl-s905x-libretech-cc
diff --git a/.gitlab-ci/prepare-artifacts.sh b/.gitlab-ci/prepare-artifacts.sh
index 9866a92..b1424b1 100755
--- a/.gitlab-ci/prepare-artifacts.sh
+++ b/.gitlab-ci/prepare-artifacts.sh
@@ -3,6 +3,8 @@
set -e
set -o xtrace
+CROSS_FILE=/cross_file-"$CROSS".txt
+
# Delete unused bin and includes from artifacts to save space.
rm -rf install/bin install/include
@@ -28,3 +30,30 @@
# Tar up the install dir so that symlinks and hardlinks aren't each
# packed separately in the zip file.
tar -cf artifacts/install.tar install
+
+# If the container has LAVA stuff, prepare the artifacts for LAVA jobs
+if [ -d /lava-files ]; then
+ # Copy kernel and device trees for LAVA
+ cp /lava-files/*Image artifacts/.
+ cp /lava-files/*.dtb artifacts/.
+
+ # Pack ramdisk for LAVA
+ mkdir -p /lava-files/rootfs-${CROSS:-arm64}/mesa
+ cp -a install/* /lava-files/rootfs-${CROSS:-arm64}/mesa/.
+
+ cp .gitlab-ci/deqp-runner.sh /lava-files/rootfs-${CROSS:-arm64}/deqp/.
+ cp .gitlab-ci/deqp-*-fails.txt /lava-files/rootfs-${CROSS:-arm64}/deqp/.
+ cp .gitlab-ci/deqp-*-skips.txt /lava-files/rootfs-${CROSS:-arm64}/deqp/.
+ find /lava-files/rootfs-${CROSS:-arm64}/ -type f -printf "%s\t%i\t%p\n" | sort -n | tail -100
+
+ pushd /lava-files/rootfs-${CROSS:-arm64}/
+ find -H | cpio -H newc -o | gzip -c - > $CI_PROJECT_DIR/artifacts/lava-rootfs-${CROSS:-arm64}.cpio.gz
+ popd
+
+ # Store job ID so the test stage can build URLs to the artifacts
+ echo $CI_JOB_ID > artifacts/build_job_id.txt
+
+ # Pass needed files to the test stage
+ cp $CI_PROJECT_DIR/.gitlab-ci/generate_lava.py artifacts/.
+ cp $CI_PROJECT_DIR/.gitlab-ci/lava-deqp.yml.jinja2 artifacts/.
+fi