From a51d0ccc3daac57f3108c0912b08538763ab16c6 Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Thu, 20 Jun 2024 01:10:19 +0100 Subject: [PATCH] cache out dir --- .github/workflows/build.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d08bdb89..f7dfd31e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -21,11 +21,25 @@ jobs: - name: checkout submodule ref run: git submodule update --init --filter blob:none agnos-kernel-sdm845 - - uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 + - id: kernel-submodule + run: echo "ref=$(git ls-tree HEAD | awk '$4 == "agnos-kernel-sdm845"' | awk '{print $3}')" >> "$GITHUB_OUTPUT" + + - uses: actions/cache/restore@v5 + id: restore-cache with: - create-symlink: true + key: kernel-${{ steps.kernel-submodule.outputs.ref }} + path: agnos-kernel-sdm845/out + restore-keys: | + kernel- - run: ./build_kernel.sh + + - uses: actions/cache/save@v5 + if: always() + with: + key: ${{ steps.restore-cache.outputs.cache-primary-key }} + path: agnos-kernel-sdm845/out + - uses: actions/upload-artifact@v4 with: name: boot.img