From 3ba90386483e18721a45ecd8bdc8c0268827dfaa Mon Sep 17 00:00:00 2001 From: Valentine Burley Date: Wed, 28 May 2025 12:26:06 +0200 Subject: [PATCH] ci/android: Check Vulkan driver using vulkaninfo Add a step to detect the active Vulkan driver by parsing `vulkaninfo`. Signed-off-by: Valentine Burley Part-of: --- .gitlab-ci/android-runner.sh | 16 +++++++++++++--- .../container/debian/x86_64_test-android.sh | 4 ++++ .gitlab-ci/image-tags.yml | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci/android-runner.sh b/.gitlab-ci/android-runner.sh index d6b9fbe9cd7..7dfb914617e 100755 --- a/.gitlab-ci/android-runner.sh +++ b/.gitlab-ci/android-runner.sh @@ -77,21 +77,28 @@ $ADB push /angle/libGLESv1_CM_angle.so "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so" $ADB push /angle/libGLESv2_angle.so "$ANGLE_DEST_PATH/libGLESv2_angle.so" $ADB push /android-tools/eglinfo /data +$ADB push /android-tools/vulkaninfo /data get_gles_runtime_version() { while [ "$($ADB shell /data/eglinfo | grep 'OpenGL ES profile version':)" = "" ] ; do sleep 1; done $ADB shell /data/eglinfo | grep 'OpenGL ES profile version' } +get_vk_runtime_version() { + $ADB shell /data/vulkaninfo | grep driverInfo +} -# Check what GLES implementation is used before loading the new libraries +# Check what GLES & VK implementation is used before loading the new libraries get_gles_runtime_version +get_vk_runtime_version # restart Android shell, so that services use the new libraries $ADB shell stop $ADB shell start -# Check what GLES implementation is used after loading the new libraries +# Check what GLES & VK implementation is used after loading the new libraries +MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION") GLES_RUNTIME_VERSION="$(get_gles_runtime_version)" +VK_RUNTIME_VERSION="$(get_vk_runtime_version)" if [ -n "$ANGLE_TAG" ]; then # Note: we are injecting the ANGLE libs too, so we need to check if the @@ -102,12 +109,15 @@ if [ -n "$ANGLE_TAG" ]; then exit 1 fi else - MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION") if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep -Fq -- "${MESA_BUILD_VERSION}"; then echo "Fatal: Android is loading a wrong version of the Mesa3D GLES libs: ${GLES_RUNTIME_VERSION}" 1>&2 exit 1 fi fi +if ! printf "%s" "$VK_RUNTIME_VERSION" | grep -Fq -- "${MESA_BUILD_VERSION}"; then + echo "Fatal: Android is loading a wrong version of the Mesa3D Vulkan libs: ${VK_RUNTIME_VERSION}" 1>&2 + exit 1 +fi if [ -n "$USE_ANDROID_CTS" ]; then # The script sets EXIT_CODE diff --git a/.gitlab-ci/container/debian/x86_64_test-android.sh b/.gitlab-ci/container/debian/x86_64_test-android.sh index dc7a7603c3e..ae82adf8de8 100755 --- a/.gitlab-ci/container/debian/x86_64_test-android.sh +++ b/.gitlab-ci/container/debian/x86_64_test-android.sh @@ -53,6 +53,10 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \ -o eglinfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/eglinfo-android-x86_64" chmod +x eglinfo +curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \ + -o vulkaninfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/vulkaninfo-android-x86_64" +chmod +x vulkaninfo + popd ############### Downloading NDK for native builds for the guest ... diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index bac5b4287d3..01131225f00 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -23,7 +23,7 @@ variables: DEBIAN_BUILD_TAG: "20250515-aarch64" - DEBIAN_TEST_ANDROID_TAG: "20250524-angle-ec" + DEBIAN_TEST_ANDROID_TAG: "20250528-info" DEBIAN_TEST_GL_TAG: "20250526-piglit-c32" DEBIAN_TEST_VIDEO_TAG: "20250503-fluster" DEBIAN_TEST_VK_TAG: "20250527-vkd3d"