Skip to content

Commit

Permalink
Save caches from branches (these are much smaller than Open Brush, so…
Browse files Browse the repository at this point in the history
… no need for the optimization here) (#18)
  • Loading branch information
mikeage authored Jul 10, 2024
1 parent a477633 commit ccb348f
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 @@ -371,15 +371,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
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'
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 @@ -398,7 +398,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'
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10
with:
Expand Down

0 comments on commit ccb348f

Please sign in to comment.