Skip to content

Commit

Permalink
Attempt to reuse cache on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Aug 22, 2024
1 parent 8f271c2 commit 1dc723f
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
- name: Cache sccache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.sccache
path: .sccache
key: sccache-${{ runner.os }}-${{ github.sha }}
restore-keys: sccache-${{ runner.os }}-

Expand All @@ -49,14 +49,18 @@ runs:
run: sccache -s
post: sccache -s

- name: Set GRADLE_USER_HOME
shell: bash
run: echo "GRADLE_USER_HOME=$GITHUB_WORKSPACE/.gradle" >> "$GITHUB_ENV"

- name: Cache Gradle dependencies
uses: actions/cache@v4
if: inputs.is-asset-build == 'true'
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
.gradle/caches
.gradle/wrapper
!.gradle/caches/build-cache-*
key: gradle-cache-${{ hashFiles('gradle/**') }}
restore-keys: gradle-cache-

Expand All @@ -65,18 +69,19 @@ runs:
if: inputs.is-asset-build == 'false'
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
.gradle/caches
.gradle/wrapper
!.gradle/caches/build-cache-*
key: gradle-cache-${{ hashFiles('gradle/**') }}
restore-keys: gradle-cache-
enableCrossOsArchive: true

- name: Cache Gradle build cache
uses: actions/cache@v4
if: inputs.is-asset-build == 'true'
with:
path: |
~/.gradle/caches/build-cache-*
.gradle/caches/build-cache-*
key: gradle-build-cache-${{ github.sha }}
restore-keys: gradle-build-cache-

Expand All @@ -85,9 +90,10 @@ runs:
if: inputs.is-asset-build == 'false'
with:
path: |
~/.gradle/caches/build-cache-*
.gradle/caches/build-cache-*
key: gradle-build-cache-${{ github.sha }}
restore-keys: gradle-build-cache-
enableCrossOsArchive: true

- name: Set up NDK
shell: bash
Expand Down

0 comments on commit 1dc723f

Please sign in to comment.