Skip to content

Commit

Permalink
fix: use better caching keys for github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Jun 21, 2024
1 parent df05edc commit 9b3b29c
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/buildroot-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,12 @@ jobs:
- name: Cache build cache and downloads
uses: actions/cache@v4
env:
cache-name: cache-buildroot
with:
path: ~/br-cache/
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Clear caches if necessary
run: |
# necessary to save space
if [ ! -f ~/br-cache/ccache-v1 ]; then
echo "Clearing old compiler cache..."
rm -rf ~/br-cache/ccache* || true
mkdir -p ~/br-cache/ccache
touch ~/br-cache/ccache-v1
fi
if [ ! -f ~/br-cache/dl-v1 ]; then
echo "Clearing old downloads cache..."
rm -rf ~/br-cache/dl* || true
mkdir -p ~/br-cache/dl
touch ~/br-cache/dl-v1
fi
# https://github.com/actions/toolkit/issues/505#issuecomment-1650290249
key: buildroot-r1-h${{ hashFiles('buildroot/Makefile') }}
restore-keys: |
buildroot
- name: Install buildroot apt deps
run: |
Expand Down

0 comments on commit 9b3b29c

Please sign in to comment.