mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 22:35:42 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user