ci/android: Use curl-with-retry in build scripts
Let's standardize llvm android build script, by calling the `curl-with-retry` instead of a specific curl arg set. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36946>
This commit is contained in:
committed by
Marge Bot
parent
a51b12bbf6
commit
5e745f653f
@@ -35,8 +35,7 @@ if ARTIFACTS_URL="$(find_s3_project_artifact "${ARTIFACTS_PATH}")"; then
|
|||||||
|
|
||||||
# Download prebuilt LLVM libraries for Android when they have not changed,
|
# Download prebuilt LLVM libraries for Android when they have not changed,
|
||||||
# to save some time
|
# to save some time
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
curl-with-retry -o "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "${ARTIFACTS_URL}"
|
||||||
-o "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "${ARTIFACTS_URL}"
|
|
||||||
tar -C / --zstd -xf "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
tar -C / --zstd -xf "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
||||||
rm "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
rm "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
|
||||||
|
|
||||||
@@ -55,9 +54,8 @@ ANDROID_NDK="android-ndk-${ANDROID_NDK_VERSION}"
|
|||||||
ANDROID_NDK_ROOT="/${ANDROID_NDK}"
|
ANDROID_NDK_ROOT="/${ANDROID_NDK}"
|
||||||
if [ ! -d "$ANDROID_NDK_ROOT" ];
|
if [ ! -d "$ANDROID_NDK_ROOT" ];
|
||||||
then
|
then
|
||||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
curl-with-retry -o "${ANDROID_NDK}.zip" \
|
||||||
-o "${ANDROID_NDK}.zip" \
|
"https://dl.google.com/android/repository/${ANDROID_NDK}-linux.zip"
|
||||||
"https://dl.google.com/android/repository/${ANDROID_NDK}-linux.zip"
|
|
||||||
unzip -d / "${ANDROID_NDK}.zip" "$ANDROID_NDK/source.properties" "$ANDROID_NDK/build/cmake/*" "$ANDROID_NDK/toolchains/llvm/*"
|
unzip -d / "${ANDROID_NDK}.zip" "$ANDROID_NDK/source.properties" "$ANDROID_NDK/build/cmake/*" "$ANDROID_NDK/toolchains/llvm/*"
|
||||||
rm "${ANDROID_NDK}.zip"
|
rm "${ANDROID_NDK}.zip"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user