From 9f7ba86258dd33f80b03ba6bf297a2fc4e9eb042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Mon, 23 Sep 2024 11:50:54 +0300 Subject: [PATCH] ci(build-and-test): reset ccache stats before build (#8761) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- .github/actions/build-and-test-differential/action.yaml | 6 ++++-- .github/workflows/build-and-test.yaml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-and-test-differential/action.yaml b/.github/actions/build-and-test-differential/action.yaml index 3decc3f9861b1..89893e9f55fb5 100644 --- a/.github/actions/build-and-test-differential/action.yaml +++ b/.github/actions/build-and-test-differential/action.yaml @@ -57,8 +57,10 @@ runs: restore-keys: | ccache-main-${{ runner.arch }}-${{ inputs.rosdistro }}- - - name: Show ccache stats before build - run: du -sh ${CCACHE_DIR} && ccache -s + - name: Show ccache stats before build and reset stats + run: | + du -sh ${CCACHE_DIR} && ccache -s + ccache --zero-stats shell: bash - name: Export CUDA state as a variable for adding to cache key diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index df49e5d418bc9..0f239cd328591 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -69,8 +69,10 @@ jobs: echo -e "# Set maximum cache size\nmax_size = 600MB" >> "${CCACHE_DIR}/ccache.conf" shell: bash - - name: Show ccache stats before build - run: du -sh ${CCACHE_DIR} && ccache -s + - name: Show ccache stats before build and reset stats + run: | + du -sh ${CCACHE_DIR} && ccache -s + ccache --zero-stats shell: bash - name: Export CUDA state as a variable for adding to cache key