From f2457bb23c866032e6866314d27a559783d6e289 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 3 Jan 2022 14:34:31 -0800 Subject: [PATCH] CI: cache LFS objects (#23345) old-commit-hash: 760104068b63d32f42564fdbb0193a3724461d11 --- .github/workflows/tools_tests.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tools_tests.yaml b/.github/workflows/tools_tests.yaml index dc4046f39..0b0df4c51 100644 --- a/.github/workflows/tools_tests.yaml +++ b/.github/workflows/tools_tests.yaml @@ -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"