From 8133cfead89255d7fd13479140b631ffdef73e74 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 27 Oct 2023 21:04:47 +0200 Subject: [PATCH] Print object cache statistics before upload (#2874) Print the object cache statistics before uploading them to the action cache. The action cache accesses all files, this makes the statistics of files used during build not useful. --- .github/workflows/build.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 668bbdc57..ce01de9f3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -221,6 +221,12 @@ jobs: upload_url: ${{ github.event.release.upload_url }} asset_path: output/images/haos_* + - name: Print cache stats + 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)" + - name: "Save cache: object files" if: github.ref == 'refs/heads/dev' uses: actions/cache/save@v3 @@ -228,12 +234,6 @@ jobs: path: /mnt/cache/cc key: haos-cc-${{ matrix.board.id }}-${{ github.run_id }} - - name: Print cache stats - 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)" - - name: Upload ova image to artifacts for test job uses: actions/upload-artifact@v3 if: ${{ matrix.board.id == 'ova' }}