Cache Git LFS objects in CI to reduce bandwidth usage (#6315)

Add actions/cache for .git/lfs in all workflows that fetch LFS objects
(unity_build, mac_build, ios_testflight, ios_addressables_build).
The cache key is based on .gitattributes so it updates when LFS tracking
rules change. Subsequent runs restore from cache and git lfs pull only
fetches new/changed objects, avoiding re-downloading the full 6+ GB.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 15:20:27 -08:00
committed by GitHub
co-authored by Claude Opus 4.6
parent be48f54f2c
commit e8780134ee
4 changed files with 48 additions and 0 deletions
@@ -57,10 +57,22 @@ jobs:
git clean -ffd
rm -rf src/main/csharp/net/eagle0/clients/unity/eagle0/Library/Bee/
- name: Cache LFS objects
uses: actions/cache@v4
with:
path: .git/lfs
key: lfs-${{ runner.os }}-${{ hashFiles('.gitattributes') }}
restore-keys: |
lfs-${{ runner.os }}-
- name: Fetch LFS files
run: |
git lfs install
echo "LFS objects before pull:"
git lfs ls-files | wc -l
git lfs pull
echo "LFS objects after pull:"
git lfs ls-files | wc -l
- name: Ensure Unity version installed
run: ./ci/github_actions/ensure_unity_installed.sh ios
+12
View File
@@ -45,10 +45,22 @@ jobs:
git clean -ffd
rm -rf src/main/csharp/net/eagle0/clients/unity/eagle0/Library/Bee/
- name: Cache LFS objects
uses: actions/cache@v4
with:
path: .git/lfs
key: lfs-${{ runner.os }}-${{ hashFiles('.gitattributes') }}
restore-keys: |
lfs-${{ runner.os }}-
- name: Fetch LFS files
run: |
git lfs install
echo "LFS objects before pull:"
git lfs ls-files | wc -l
git lfs pull
echo "LFS objects after pull:"
git lfs ls-files | wc -l
- name: Ensure Unity version installed
run: ./ci/github_actions/ensure_unity_installed.sh ios
+12
View File
@@ -108,10 +108,22 @@ jobs:
rm -rf "$BEE_DIR"
fi
- name: Cache LFS objects
uses: actions/cache@v4
with:
path: .git/lfs
key: lfs-${{ runner.os }}-${{ hashFiles('.gitattributes') }}
restore-keys: |
lfs-${{ runner.os }}-
- name: Fetch LFS files
run: |
git lfs install
echo "LFS objects before pull:"
git lfs ls-files | wc -l
git lfs pull
echo "LFS objects after pull:"
git lfs ls-files | wc -l
- name: Ensure Unity version installed
run: ./ci/github_actions/ensure_unity_installed.sh mac
+12
View File
@@ -95,10 +95,22 @@ jobs:
rm -rf "$BEE_DIR"
fi
- name: Cache LFS objects
uses: actions/cache@v4
with:
path: .git/lfs
key: lfs-${{ runner.os }}-${{ hashFiles('.gitattributes') }}
restore-keys: |
lfs-${{ runner.os }}-
- name: Fetch LFS files
run: |
git lfs install
echo "LFS objects before pull:"
git lfs ls-files | wc -l
git lfs pull
echo "LFS objects after pull:"
git lfs ls-files | wc -l
- name: Sync Bazel Xcode config
run: ./scripts/sync_bazel_xcode.sh
- name: Ensure Unity version installed