Skip to content

Commit

Permalink
CI: cache LFS objects (commaai#23345)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Jan 3, 2022
1 parent 1e41f47 commit 7601040
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/tools_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,25 @@ jobs:
timeout-minutes: 50
env:
IMAGE_NAME: openpilot-sim
if: ${{ false }} # disable until LFS quota is fixed
#if: github.repository == 'commaai/openpilot'
if: github.repository == 'commaai/openpilot'
steps:
- uses: actions/checkout@v2
with:
submodules: true
lfs: true

# HACK: cache LFS objects since they count against our quota
# https://github.com/actions/checkout/issues/165#issuecomment-657673315
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
- name: Git LFS Pull
run: git lfs pull

- name: Build Docker image
run: |
eval "$BUILD"
Expand Down

0 comments on commit 7601040

Please sign in to comment.