mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-09-22 19:15:05 +03:00
926343e90e
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>
53 lines
2.4 KiB
YAML
53 lines
2.4 KiB
YAML
name: Restore Gradle build directories
|
|
description: Restore project .gradle/, build/ trees for faster CI Gradle jobs
|
|
|
|
inputs:
|
|
scope:
|
|
description: Unique id for this job (part of the cache key; use restore-keys to reuse other scopes)
|
|
required: true
|
|
|
|
outputs:
|
|
cache-hit:
|
|
description: Whether an exact cache key match was restored
|
|
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 }}
|
|
|
|
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: |
|
|
.gradle
|
|
build
|
|
app/desktop/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-
|