mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
ci: add retries and caching for gradle
installation (#34619)
This change uses Gradle's official `setup-gradle` action to allow the caching of the downloaded gradle distribution and java dependencies in the GitHub Actions cache. However, since the initial download of gradle distribution is still handled by the `gradlew` wrapper script which doesn't retry on network failures, this change also adds a simple retry mechanism using shell scripting. Fixes #34600 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
1705473caa
commit
a87a86f4f2
1 changed files with 8 additions and 0 deletions
8
.github/workflows/android.yml
vendored
8
.github/workflows/android.yml
vendored
|
@ -79,6 +79,14 @@ jobs:
|
|||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r26c
|
||||
- name: Setup Gradle caches
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
- name: Trigger initial download of Gradle with retries
|
||||
run: |
|
||||
for i in {1..4}; do
|
||||
./gradlew --version && break || { echo "Downloading Gradle failed (attempt $i)." && sleep $((3 ** $i)); };
|
||||
done
|
||||
working-directory: ./support/android/apk/
|
||||
- name: Setup Key Store for APK Signing
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.APK_KEYSTORE_BASE64 }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue