summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2019-12-17 11:50:14 +0100
committerMarge Bot <[email protected]>2020-01-14 13:17:24 +0000
commit22d976454f4e50142116f4544c0bbf11134ce991 (patch)
tree2edd3c2a71450d44149faac986ef4d9148e7619a /.gitlab-ci
parentf978e0e516c11df19573662844e2b39d89276813 (diff)
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 <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3295> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3295>
Diffstat (limited to '.gitlab-ci')
-rw-r--r--.gitlab-ci/build-deqp-gl.sh6
-rw-r--r--.gitlab-ci/container/arm_build.sh19
-rw-r--r--.gitlab-ci/container/lava_arm.sh123
-rw-r--r--.gitlab-ci/create-rootfs.sh24
-rwxr-xr-x.gitlab-ci/generate_lava.py91
-rw-r--r--.gitlab-ci/lava-deqp.yml.jinja214
-rw-r--r--.gitlab-ci/lava-gitlab-ci.yml197
-rwxr-xr-x.gitlab-ci/prepare-artifacts.sh29
8 files changed, 191 insertions, 312 deletions
diff --git a/.gitlab-ci/build-deqp-gl.sh b/.gitlab-ci/build-deqp-gl.sh
index 64e4db0a2bc..63164956f0c 100644
--- a/.gitlab-ci/build-deqp-gl.sh
+++ b/.gitlab-ci/build-deqp-gl.sh
@@ -5,7 +5,7 @@ git clone \
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 @@ mkdir -p /deqp
# 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 @@ find -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' | xargs r
${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 c08746b1df2..a24d81ea972 100644
--- a/.gitlab-ci/container/arm_build.sh
+++ b/.gitlab-ci/container/arm_build.sh
@@ -13,22 +13,36 @@ apt-get -y install \
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 @@ sed -i "s|/usr/bin/\([^-]*\)-linux-gnu\([^-]*\)-g|/usr/lib/ccache/\\1-linux-gnu\
# 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 99c49ad5818..3b5cad3e9f0 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 e84f2271f42..810924061fb 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 @@ UNNEEDED_PACKAGES="apt libapt-pkg5.0 "\
"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 46bc2e1f5c8..f83f0e8d4d3 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 55b87ba6123..c974a66788d 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 @@ actions:
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 @@ actions:
- 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 e7711d3a745..d5bdb922448 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 @@ lava-build:arm64:
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 @@ panfrost-t760-test:armhf:
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 @@ panfrost-t860-test:arm64:
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 @@ panfrost-t860-test:arm64:
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 @@ panfrost-t860-test:arm64:
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 @@ panfrost-t860-test:arm64:
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 9866a9242c3..b1424b12102 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 @@ cp -Rp .gitlab-ci/piglit artifacts/
# 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