Add pruning of object file cache (#2899)

This commit is contained in:
Jan Čermák 2023-11-02 13:45:56 +01:00 committed by GitHub
parent 26bfeb6c40
commit d9b49bbcb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'