mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-09-22 19:15:05 +03:00
Fix Gradle build cache save races with restore-only on parallel jobs.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
name: Cache Gradle build directories
|
name: Cache Gradle build directories
|
||||||
description: Restore or save module build/ trees for faster CI Gradle jobs
|
description: Restore or save module build/ trees for faster CI Gradle jobs
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
save:
|
||||||
|
description: Save cache at job end. Use false on parallel jobs that share the same cache key.
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
cache-hit:
|
cache-hit:
|
||||||
description: Whether build directories were restored from cache
|
description: Whether build directories were restored from cache
|
||||||
@@ -12,6 +18,7 @@ runs:
|
|||||||
- uses: actions/cache@v5
|
- uses: actions/cache@v5
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
|
lookup-only: ${{ inputs.save != 'true' }}
|
||||||
path: |
|
path: |
|
||||||
app/desktop/build
|
app/desktop/build
|
||||||
app/shared/build
|
app/shared/build
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ jobs:
|
|||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- uses: ./.github/actions/cache-gradle-build
|
- uses: ./.github/actions/cache-gradle-build
|
||||||
id: gradle-build-cache
|
id: gradle-build-cache
|
||||||
|
with:
|
||||||
|
save: "true"
|
||||||
- name: Compile and ProGuard release desktop jars
|
- name: Compile and ProGuard release desktop jars
|
||||||
if: steps.gradle-build-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
|
||||||
@@ -108,6 +110,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- uses: ./.github/actions/cache-gradle-build
|
- uses: ./.github/actions/cache-gradle-build
|
||||||
|
with:
|
||||||
|
save: "true"
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: x86_64-pc-windows-msvc
|
targets: x86_64-pc-windows-msvc
|
||||||
@@ -165,6 +169,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- uses: ./.github/actions/cache-gradle-build
|
- uses: ./.github/actions/cache-gradle-build
|
||||||
|
with:
|
||||||
|
save: "false"
|
||||||
- uses: actions/download-artifact@v5
|
- uses: actions/download-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: desktop-proguard
|
name: desktop-proguard
|
||||||
@@ -221,6 +227,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- uses: ./.github/actions/cache-gradle-build
|
- uses: ./.github/actions/cache-gradle-build
|
||||||
|
with:
|
||||||
|
save: ${{ matrix.arch == 'arm64' }}
|
||||||
- uses: actions/download-artifact@v5
|
- uses: actions/download-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: desktop-proguard
|
name: desktop-proguard
|
||||||
@@ -277,6 +285,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- uses: ./.github/actions/cache-gradle-build
|
- uses: ./.github/actions/cache-gradle-build
|
||||||
|
with:
|
||||||
|
save: ${{ matrix.arch == 'arm64' }}
|
||||||
- uses: actions/download-artifact@v5
|
- uses: actions/download-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: desktop-proguard
|
name: desktop-proguard
|
||||||
@@ -320,6 +330,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- uses: ./.github/actions/cache-gradle-build
|
- uses: ./.github/actions/cache-gradle-build
|
||||||
|
with:
|
||||||
|
save: "false"
|
||||||
- name: Cache Android SDK extras
|
- name: Cache Android SDK extras
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user