Skip to content

Commit 9832fae

Browse files
committed
ci: pre-install NDK with retry to avoid corrupt archive download
1 parent 3c9fc21 commit 9832fae

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ jobs:
120120
if: env.turbo_cache_hit != 1
121121
run: |
122122
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
123+
for i in 1 2 3; do
124+
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;27.1.12297006" && break
125+
echo "NDK install attempt $i failed, retrying..."
126+
sleep 10
127+
done
123128
124129
- name: Cache Gradle
125130
if: env.turbo_cache_hit != 1
@@ -417,6 +422,11 @@ jobs:
417422
- name: Finalize Android SDK
418423
run: |
419424
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
425+
for i in 1 2 3; do
426+
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;27.1.12297006" && break
427+
echo "NDK install attempt $i failed, retrying..."
428+
sleep 10
429+
done
420430
421431
- name: Cache Gradle
422432
uses: actions/cache@v4
@@ -614,6 +624,11 @@ jobs:
614624
- name: Finalize Android SDK
615625
run: |
616626
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
627+
for i in 1 2 3; do
628+
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;27.1.12297006" && break
629+
echo "NDK install attempt $i failed, retrying..."
630+
sleep 10
631+
done
617632
618633
- name: Enable legacy Rive backend
619634
run: |

0 commit comments

Comments
 (0)