Fix Gradle and Rust cache save failures on parallel release jobs.

Use scope-specific Gradle cache paths, global release concurrency, Rust v3 key with v1/v2 fallbacks, and ensure Android SDK cache dirs exist before save.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-14 16:23:40 +03:00
Unverified
parent 727aba5bb6
commit 926343e90e
5 changed files with 42 additions and 5 deletions
+18 -1
View File
@@ -9,7 +9,7 @@ inputs:
outputs:
cache-hit:
description: Whether an exact cache key match was restored
value: ${{ steps.cache.outputs.cache-hit }}
value: ${{ steps.cache.outputs.cache-hit == 'true' || steps.cache-android.outputs.cache-hit == 'true' }}
cache-save-scope:
description: Scope to pass to the save action (always this job's scope, not a restored fallback key)
value: ${{ inputs.scope }}
@@ -18,6 +18,23 @@ runs:
using: composite
steps:
- uses: actions/cache/restore@v5
if: inputs.scope == 'android'
id: cache-android
with:
path: |
.gradle
build
app/shared/build
app/android/build
utils/shared/build
utils/android/build
key: gradle-build-${{ runner.os }}-${{ runner.arch }}-v2-${{ inputs.scope }}-${{ hashFiles('gradle/libs.versions.toml', 'settings.gradle.kts', 'gradle.properties', 'build.gradle.kts', 'app/desktop/build.gradle.kts', 'app/desktop/proguard-rules.pro', 'app/shared/build.gradle.kts', 'app/android/build.gradle.kts', 'utils/shared/build.gradle.kts', 'utils/android/build.gradle.kts') }}
restore-keys: |
gradle-build-${{ runner.os }}-${{ runner.arch }}-v2-${{ inputs.scope }}-
gradle-build-${{ runner.os }}-${{ runner.arch }}-v2-build-jar-
gradle-build-${{ runner.os }}-${{ runner.arch }}-v2-
- uses: actions/cache/restore@v5
if: inputs.scope != 'android'
id: cache
with:
path: |