From d9b49bbcb899e434daa62b81fed32ade8e3268ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Thu, 2 Nov 2023 13:45:56 +0100 Subject: [PATCH] Add pruning of object file cache (#2899) --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 08987e20b..efdaff00f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -219,7 +219,9 @@ jobs: run: | echo "Cache size: $(du -sh /mnt/cache/cc)" echo "Files total: $(find /mnt/cache/cc -mindepth 1 -type f | wc -l)" - echo "Old files: $(find /mnt/cache/cc -mindepth 1 -type f -not -anewer output/Makefile | wc -l)" + echo "Old files to remove: $(find /mnt/cache/cc -mindepth 1 -type f -not -anewer output/Makefile | wc -l)" + find /mnt/cache/cc -mindepth 1 -type f -not -anewer output/Makefile -delete + echo "Cache size after pruning: $(du -sh /mnt/cache/cc)" - name: "Save cache: object files" if: github.ref == 'refs/heads/dev'