Skip to content

Commit

Permalink
Reapply "Temp cache fix for forks [CI BUILD]"
Browse files Browse the repository at this point in the history
This reverts commit fd2e1a7.
  • Loading branch information
andybak committed Oct 3, 2024
1 parent fd2e1a7 commit 74c40d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -516,15 +516,15 @@ jobs:
- name: Save Library/PackageCache cache
uses: actions/cache/save@v4
if: github.ref == 'refs/heads/main' && steps.check_packagecache.outputs.changes == 0 && steps.cache_packagecache.outputs.cache-hit != 'true' && ! matrix.packages_to_remove # Ideally, we'd save caches on branches, but they're too big, and branch caches can evict those from main, which is unacceptable.
if: steps.check_packagecache.outputs.changes == 0 && steps.cache_packagecache.outputs.cache-hit != 'true' && ! matrix.packages_to_remove # Ideally, we'd save caches on branches, but they're too big, and branch caches can evict those from main, which is unacceptable.
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10
with:
path: Library/PackageCache
key: Library_PackageCache_${{ env.UNITY_VERSION }}_${{ hashFiles('Packages/packages-lock.json') }}

- name: Clean Library before caching
if: github.ref == 'refs/heads/main' && steps.cache_library.outputs.cache-hit != 'true' # Ideally, we'd save caches on branches, but they're too big, and branch caches can evict those from main, which is unacceptable.
if: steps.cache_library.outputs.cache-hit != 'true' # Ideally, we'd save caches on branches, but they're too big, and branch caches can evict those from main, which is unacceptable.
run: |
# Remove the large files from the Library directory that we know we'll rebuild. As our il2cpp caches are huge and barely fit in the Github quota, it's better not to save an unneeded 1GB of space (or so). If a new Unity version is taken, this may need to be updated
# Debugging
Expand All @@ -543,7 +543,7 @@ jobs:
- name: Save Library/ cache
uses: actions/cache/save@v4
if: github.ref == 'refs/heads/main' && steps.cache_library.outputs.cache-hit != 'true' # Ideally, we'd save caches on branches, but they're too big, and branch caches can evict those from main, which is unacceptable.
if: steps.cache_library.outputs.cache-hit != 'true' # Ideally, we'd save caches on branches, but they're too big, and branch caches can evict those from main, which is unacceptable.
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10
with:
Expand Down

0 comments on commit 74c40d9

Please sign in to comment.