From 3cc3384e95e39a8a75a8e5823fbe7d28a7302551 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Tue, 27 Aug 2024 12:45:11 +0200 Subject: [PATCH] ci/android: better separate host and guest mesa artifacts Clarify that artifacts from the Android guest are downloaded explicitly and put them under /mesa-android directory so that they don't clash with the Linux host artifacts downloaded by gitlab under "${CI_PROJECT_DIR}/install". Reviewed-by: Eric Engestrom Part-of: --- .gitlab-ci/cuttlefish-runner.sh | 27 ++++++++++++++------------- .gitlab-ci/test/gitlab-ci.yml | 4 +++- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci/cuttlefish-runner.sh b/.gitlab-ci/cuttlefish-runner.sh index 89bb4cc18ac..950fcf9f8fe 100755 --- a/.gitlab-ci/cuttlefish-runner.sh +++ b/.gitlab-ci/cuttlefish-runner.sh @@ -74,14 +74,15 @@ $ADB push /deqp-gles/assets/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-m $ADB push /deqp-runner/deqp-runner /data/. # download Android Mesa from S3 -MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst -curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${S3_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL} -tar -xvf ${S3_ARTIFACT_NAME}.tar.zst -rm "${S3_ARTIFACT_NAME}.tar.zst" & +MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${S3_ANDROID_ARTIFACT_NAME}.tar.zst +curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${S3_ANDROID_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL} +mkdir /mesa-android +tar -C /mesa-android -xvf ${S3_ANDROID_ARTIFACT_NAME}.tar.zst +rm "${S3_ANDROID_ARTIFACT_NAME}.tar.zst" & -$ADB push install/all-skips.txt /data/. -$ADB push install/$GPU_VERSION-flakes.txt /data/. -$ADB push install/deqp-$DEQP_SUITE.toml /data/. +$ADB push /mesa-android/install/all-skips.txt /data/. +$ADB push "/mesa-android/install/$GPU_VERSION-flakes.txt" /data/. +$ADB push "/mesa-android/install/deqp-$DEQP_SUITE.toml" /data/. # remove 32 bits libs from /vendor/lib @@ -97,11 +98,11 @@ $ADB shell rm -f /vendor/lib/egl/libGLESv2_emulation.so # replace on /vendor/lib64 -$ADB push install/lib/libgallium_dri.so /vendor/lib64/libgallium_dri.so -$ADB push install/lib/libglapi.so /vendor/lib64/libglapi.so -$ADB push install/lib/libEGL.so /vendor/lib64/egl/libEGL_mesa.so -$ADB push install/lib/libGLESv1_CM.so /vendor/lib64/egl/libGLESv1_CM_mesa.so -$ADB push install/lib/libGLESv2.so /vendor/lib64/egl/libGLESv2_mesa.so +$ADB push /mesa-android/install/lib/libgallium_dri.so /vendor/lib64/libgallium_dri.so +$ADB push /mesa-android/install/lib/libglapi.so /vendor/lib64/libglapi.so +$ADB push /mesa-android/install/lib/libEGL.so /vendor/lib64/egl/libEGL_mesa.so +$ADB push /mesa-android/install/lib/libGLESv1_CM.so /vendor/lib64/egl/libGLESv1_CM_mesa.so +$ADB push /mesa-android/install/lib/libGLESv2.so /vendor/lib64/egl/libGLESv2_mesa.so $ADB shell rm -f /vendor/lib64/egl/libEGL_angle.so $ADB shell rm -f /vendor/lib64/egl/libEGL_emulation.so @@ -121,7 +122,7 @@ $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) +MESA_BUILD_VERSION=$(cat /mesa-android/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 exit 1 diff --git a/.gitlab-ci/test/gitlab-ci.yml b/.gitlab-ci/test/gitlab-ci.yml index bf0f17e3920..3be02df5c4b 100644 --- a/.gitlab-ci/test/gitlab-ci.yml +++ b/.gitlab-ci/test/gitlab-ci.yml @@ -114,7 +114,9 @@ yaml-toml-shell-py-test: - .test - .use-debian/x86_64_test-android variables: - S3_ARTIFACT_NAME: mesa-x86_64-android-debug + # This is for the guest artifacts from debian-android which will be + # downloaded explicitly by cuttlefish-runner.sh + S3_ANDROID_ARTIFACT_NAME: mesa-x86_64-android-debug needs: - job: debian-testing artifacts: true # On the host we want the Linux build