From 414e1a22c83b18d8e36c9ffd6b708628c2c2ff60 Mon Sep 17 00:00:00 2001 From: Valentine Burley Date: Mon, 7 Apr 2025 11:01:12 +0200 Subject: [PATCH] ci/container: Add new container for libva and fluster testing The new debian/x86_64_test-video container includes va tools and Fluster. Signed-off-by: Valentine Burley Part-of: --- .gitlab-ci/container/build-fluster.sh | 4 ++ .gitlab-ci/container/build-va-tools.sh | 2 + .../container/debian/x86_64_test-video.sh | 71 +++++++++++++++++++ .gitlab-ci/container/fdo_cntr_export.sh | 1 + .gitlab-ci/container/gitlab-ci.yml | 21 ++++++ .gitlab-ci/container/setup-rootfs.sh | 1 + .gitlab-ci/container/strip-rootfs.sh | 1 + .gitlab-ci/image-tags.yml | 1 + 8 files changed, 102 insertions(+) create mode 100755 .gitlab-ci/container/debian/x86_64_test-video.sh diff --git a/.gitlab-ci/container/build-fluster.sh b/.gitlab-ci/container/build-fluster.sh index 76da1334e42..7afe0ad4541 100644 --- a/.gitlab-ci/container/build-fluster.sh +++ b/.gitlab-ci/container/build-fluster.sh @@ -4,6 +4,10 @@ # shellcheck disable=SC2034 # Variables are used in scripts called from here # shellcheck disable=SC2086 # we want word splitting +# When changing this file, you need to bump the following +# .gitlab-ci/image-tags.yml tags: +# DEBIAN_TEST_VIDEO_TAG + # Install fluster in /usr/local. section_start fluster "Install fluster" diff --git a/.gitlab-ci/container/build-va-tools.sh b/.gitlab-ci/container/build-va-tools.sh index d91f2ec2f02..080bab95057 100644 --- a/.gitlab-ci/container/build-va-tools.sh +++ b/.gitlab-ci/container/build-va-tools.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash # shellcheck disable=SC2086 # we want word splitting + # When changing this file, you need to bump the following # .gitlab-ci/image-tags.yml tags: +# DEBIAN_TEST_VIDEO_TAG # KERNEL_ROOTFS_TAG set -uex diff --git a/.gitlab-ci/container/debian/x86_64_test-video.sh b/.gitlab-ci/container/debian/x86_64_test-video.sh new file mode 100755 index 00000000000..5877ec1aa74 --- /dev/null +++ b/.gitlab-ci/container/debian/x86_64_test-video.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# The relative paths in this file only become valid at runtime. +# shellcheck disable=SC1091 +# +# When changing this file, you need to bump the following +# .gitlab-ci/image-tags.yml tags: +# DEBIAN_TEST_VIDEO_TAG + +set -e + +. .gitlab-ci/setup-test-env.sh + +set -o xtrace + +section_start debian_setup "Base Debian system setup" + +export DEBIAN_FRONTEND=noninteractive + +apt-get install -y gstreamer1.0-vaapi # This interferes with systemd deps, install separately + +# Ephemeral packages (installed for this script and removed again at the end) +EPHEMERAL=( + g++ + libdrm-dev + libva-dev + meson + pkgconf +) + +DEPS=( + gstreamer1.0-plugins-bad + gstreamer1.0-plugins-base + gstreamer1.0-plugins-good + gstreamer1.0-plugins-ugly + gstreamer1.0-tools + libgstreamer1.0-0 + libva-drm2 + libva-wayland2 + libva2 +) + +apt-get update + +apt-get install -y --no-remove --no-install-recommends \ + "${DEPS[@]}" "${EPHEMERAL[@]}" "${EXTRA_LOCAL_PACKAGES:-}" + +. .gitlab-ci/container/container_pre_build.sh + +section_end debian_setup + +############### Build libva tests + +. .gitlab-ci/container/build-va-tools.sh + +############### Install Fluster + +. .gitlab-ci/container/build-fluster.sh + +############### Uninstall the build software + +section_switch debian_cleanup "Cleaning up base Debian system" + +apt-get purge -y "${EPHEMERAL[@]}" + +. .gitlab-ci/container/container_post_build.sh + +section_end debian_cleanup + +############### Remove unused packages + +. .gitlab-ci/container/strip-rootfs.sh diff --git a/.gitlab-ci/container/fdo_cntr_export.sh b/.gitlab-ci/container/fdo_cntr_export.sh index bfabd7f44fa..7cb3ff4fec9 100644 --- a/.gitlab-ci/container/fdo_cntr_export.sh +++ b/.gitlab-ci/container/fdo_cntr_export.sh @@ -16,6 +16,7 @@ # When changing this file, you need to bump the following # .gitlab-ci/image-tags.yml tags: # DEBIAN_TEST_GL_TAG +# DEBIAN_TEST_VIDEO_TAG # DEBIAN_TEST_VK_TAG set -eux -o pipefail diff --git a/.gitlab-ci/container/gitlab-ci.yml b/.gitlab-ci/container/gitlab-ci.yml index b6f99a3cbe5..f84cfff6721 100644 --- a/.gitlab-ci/container/gitlab-ci.yml +++ b/.gitlab-ci/container/gitlab-ci.yml @@ -489,6 +489,27 @@ debian/x86_64_test-android: needs: - debian/x86_64_test-android +# Debian based x86_64 test image for video +debian/x86_64_test-video: + extends: + - .use-debian/x86_64_test-base + - .export-container + variables: + MESA_IMAGE_TAG: &debian-x86_64_test-video ${DEBIAN_TEST_VIDEO_TAG} + LAVA_DISTRIBUTION_TAG: "debian/x86_64_test-video:${DEBIAN_TEST_VIDEO_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}" + +.use-debian/x86_64_test-video: + tags: + - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64 + extends: + - .set-image-base-tag + variables: + MESA_BASE_TAG: *debian-x86_64_test-base + MESA_IMAGE_PATH: "debian/x86_64_test-video" + MESA_IMAGE_TAG: *debian-x86_64_test-video + needs: + - debian/x86_64_test-video + # Debian-based x86_64 image to run Python utilities debian/x86_64_pyutils: extends: diff --git a/.gitlab-ci/container/setup-rootfs.sh b/.gitlab-ci/container/setup-rootfs.sh index 01b294afb59..58294c83ed0 100755 --- a/.gitlab-ci/container/setup-rootfs.sh +++ b/.gitlab-ci/container/setup-rootfs.sh @@ -3,6 +3,7 @@ # When changing this file, you need to bump the following # .gitlab-ci/image-tags.yml tags: # DEBIAN_TEST_GL_TAG +# DEBIAN_TEST_VIDEO_TAG # DEBIAN_TEST_VK_TAG # KERNEL_ROOTFS_TAG diff --git a/.gitlab-ci/container/strip-rootfs.sh b/.gitlab-ci/container/strip-rootfs.sh index 95dfa92602a..fc83f36bfc3 100644 --- a/.gitlab-ci/container/strip-rootfs.sh +++ b/.gitlab-ci/container/strip-rootfs.sh @@ -4,6 +4,7 @@ # .gitlab-ci/image-tags.yml tags: # DEBIAN_TEST_ANDROID_TAG # DEBIAN_TEST_GL_TAG +# DEBIAN_TEST_VIDEO_TAG # DEBIAN_TEST_VK_TAG # KERNEL_ROOTFS_TAG set -ex diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index 82670679597..19923165c1f 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -25,6 +25,7 @@ variables: DEBIAN_TEST_ANDROID_TAG: "20250423-rootfs" DEBIAN_TEST_GL_TAG: "20250423-rootfs" + DEBIAN_TEST_VIDEO_TAG: "20250423-rootfs" DEBIAN_TEST_VK_TAG: "20250423-rootfs" KERNEL_ROOTFS_TAG: "20250423-rootfs"