Cache full Gradle build directories in CI instead of ProGuard export only.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-14 00:55:51 +03:00
Unverified
parent a3d0c65c78
commit 53bd94e0ee
4 changed files with 32 additions and 21 deletions
@@ -1,18 +0,0 @@
name: Cache desktop ProGuard jars
description: Restore or save the CI ProGuard export directory (speeds up release desktop-proguard job)
outputs:
cache-hit:
description: Whether ProGuard jars were restored from cache
value: ${{ steps.cache.outputs.cache-hit }}
runs:
using: composite
steps:
- uses: actions/cache@v5
id: cache
with:
path: app/desktop/build/ci/proguard
key: desktop-proguard-v1-${{ hashFiles('gradle/libs.versions.toml', 'build.gradle.kts', 'settings.gradle.kts', 'app/desktop/build.gradle.kts', 'app/desktop/proguard-rules.pro', 'app/shared/build.gradle.kts') }}
restore-keys: |
desktop-proguard-v1-
@@ -0,0 +1,23 @@
name: Cache Gradle build directories
description: Restore or save module build/ trees for faster CI Gradle jobs
outputs:
cache-hit:
description: Whether build directories were restored from cache
value: ${{ steps.cache.outputs.cache-hit }}
runs:
using: composite
steps:
- uses: actions/cache@v5
id: cache
with:
path: |
app/desktop/build
app/shared/build
app/android/build
utils/shared/build
utils/android/build
key: gradle-build-${{ runner.os }}-${{ runner.arch }}-v1-${{ hashFiles('gradle/libs.versions.toml', 'settings.gradle.kts', 'gradle.properties', '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 }}-v1-
+8 -3
View File
@@ -84,10 +84,10 @@ jobs:
- uses: ./.github/actions/set-version - uses: ./.github/actions/set-version
with: with:
version: ${{ needs.resolve-version.outputs.version }} version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-desktop-proguard - uses: ./.github/actions/cache-gradle-build
id: proguard-cache id: gradle-build-cache
- name: Compile and ProGuard release desktop jars - name: Compile and ProGuard release desktop jars
if: steps.proguard-cache.outputs.cache-hit != 'true' if: steps.gradle-build-cache.outputs.cache-hit != 'true'
run: ./gradlew :app:desktop:exportReleaseProguardForCi --no-daemon --console=plain run: ./gradlew :app:desktop:exportReleaseProguardForCi --no-daemon --console=plain
- uses: actions/upload-artifact@v5 - uses: actions/upload-artifact@v5
with: with:
@@ -107,6 +107,7 @@ jobs:
- uses: ./.github/actions/set-version - uses: ./.github/actions/set-version
with: with:
version: ${{ needs.resolve-version.outputs.version }} version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
- uses: dtolnay/rust-toolchain@stable - uses: dtolnay/rust-toolchain@stable
with: with:
targets: x86_64-pc-windows-msvc targets: x86_64-pc-windows-msvc
@@ -163,6 +164,7 @@ jobs:
- uses: ./.github/actions/set-version - uses: ./.github/actions/set-version
with: with:
version: ${{ needs.resolve-version.outputs.version }} version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
- uses: actions/download-artifact@v5 - uses: actions/download-artifact@v5
with: with:
name: desktop-proguard name: desktop-proguard
@@ -218,6 +220,7 @@ jobs:
- uses: ./.github/actions/set-version - uses: ./.github/actions/set-version
with: with:
version: ${{ needs.resolve-version.outputs.version }} version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
- uses: actions/download-artifact@v5 - uses: actions/download-artifact@v5
with: with:
name: desktop-proguard name: desktop-proguard
@@ -273,6 +276,7 @@ jobs:
- uses: ./.github/actions/set-version - uses: ./.github/actions/set-version
with: with:
version: ${{ needs.resolve-version.outputs.version }} version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
- uses: actions/download-artifact@v5 - uses: actions/download-artifact@v5
with: with:
name: desktop-proguard name: desktop-proguard
@@ -315,6 +319,7 @@ jobs:
- uses: ./.github/actions/set-version - uses: ./.github/actions/set-version
with: with:
version: ${{ needs.resolve-version.outputs.version }} version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
- name: Cache Android SDK extras - name: Cache Android SDK extras
uses: actions/cache@v5 uses: actions/cache@v5
with: with:
+1
View File
@@ -35,5 +35,6 @@ android.r8.optimizedResourceShrinking=true
android.bundle.enableNativeLibraryCompressionInApk=true android.bundle.enableNativeLibraryCompressionInApk=true
# Configuration cache can surface noisy IDE/sync issues on some setups; turn on when stable. # Configuration cache can surface noisy IDE/sync issues on some setups; turn on when stable.
org.gradle.configuration-cache=false org.gradle.configuration-cache=false
org.gradle.caching=true
# Windows CI hosts cannot run iOS simulator tests; suppress KMP disabled-target noise. # Windows CI hosts cannot run iOS simulator tests; suppress KMP disabled-target noise.
kotlin.native.ignoreDisabledTargets=true kotlin.native.ignoreDisabledTargets=true