From 2aab9ef3fd341e2aa189fdec884ee65359b3f2b6 Mon Sep 17 00:00:00 2001 From: Valentine Burley Date: Tue, 4 Feb 2025 09:56:09 +0100 Subject: [PATCH] ci/android: Check ANGLE version Save the current git hash to /angle/hash after applying local patches, and use it to verify that we're using our own ANGLE build in Cuttlefish. Signed-off-by: Valentine Burley Reviewed-by: Eric Engestrom Reviewed-by: Antonio Ospite Part-of: --- .gitlab-ci/container/build-angle.sh | 3 +++ .gitlab-ci/cuttlefish-runner.sh | 15 ++++++++++++--- .gitlab-ci/image-tags.yml | 4 ++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci/container/build-angle.sh b/.gitlab-ci/container/build-angle.sh index edf334ec6f4..31a0bdd95d8 100755 --- a/.gitlab-ci/container/build-angle.sh +++ b/.gitlab-ci/container/build-angle.sh @@ -40,6 +40,9 @@ done git log --reverse --oneline $ANGLE_REV.. --format='- %s' } > /angle/version +# Save the current git hash to /angle/hash after applying local patches +git rev-parse HEAD > /angle/hash + GCLIENT_CUSTOM_VARS=() GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_cl=False') GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_cl_testing=False') diff --git a/.gitlab-ci/cuttlefish-runner.sh b/.gitlab-ci/cuttlefish-runner.sh index f870f583bc1..088cc3aed45 100755 --- a/.gitlab-ci/cuttlefish-runner.sh +++ b/.gitlab-ci/cuttlefish-runner.sh @@ -170,10 +170,19 @@ $ADB shell start # Check what GLES implementation Surfaceflinger is using after copying the new mesa libraries while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done MESA_RUNTIME_VERSION="$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" -MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION") -if ! printf "%s" "$MESA_RUNTIME_VERSION" | grep "${MESA_BUILD_VERSION}$"; then - echo "Fatal: Android is loading a wrong version of the Mesa3D libs: ${MESA_RUNTIME_VERSION}" 1>&2 + +if [ "$USE_ANGLE" = 1 ]; then + ANGLE_HASH=$(head -c 12 /angle/hash) + if ! printf "%s" "$MESA_RUNTIME_VERSION" | grep --quiet "${ANGLE_HASH}"; then + echo "Fatal: Android is loading a wrong version of the ANGLE libs: ${ANGLE_HASH}" 1>&2 exit 1 + fi +else + MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION") + if ! printf "%s" "$MESA_RUNTIME_VERSION" | grep --quiet "${MESA_BUILD_VERSION}$"; then + echo "Fatal: Android is loading a wrong version of the Mesa3D libs: ${MESA_RUNTIME_VERSION}" 1>&2 + exit 1 + fi fi BASELINE="" diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index b30e6bd450c..20b7bc4fed9 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -30,10 +30,10 @@ variables: DEBIAN_ARM64_TEST_IMAGE_VK_PATH: "debian/arm64_test-vk" DEBIAN_X86_64_TEST_ANDROID_IMAGE_PATH: "debian/x86_64_test-android" - DEBIAN_TEST_ANDROID_TAG: "20250204-droid-angle" + DEBIAN_TEST_ANDROID_TAG: "20250206-right-angle" DEBIAN_TEST_GL_TAG: "20250204-fix-deqp" DEBIAN_TEST_VK_TAG: "20250204-fix-deqp" - KERNEL_ROOTFS_TAG: "20250204-prep-angle" + KERNEL_ROOTFS_TAG: "20250206-right-angle" DEBIAN_PYUTILS_IMAGE: "debian/x86_64_pyutils" DEBIAN_PYUTILS_TAG: "20250129-lavacli"