From 3b343c2776632bfe30195be39219caa728b45afc Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Thu, 11 Jul 2024 15:23:08 +0900 Subject: [PATCH] feat(ci): change `ccache` cache key to update the cache more precisely (#4969) * hash cpp files Signed-off-by: Yutaka Kondo * add src prefix Signed-off-by: Yutaka Kondo --------- Signed-off-by: Yutaka Kondo --- .github/actions/docker-build-and-push/action.yaml | 2 +- .github/actions/docker-build/action.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index bcd59551fef..25b482bce2b 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -49,7 +49,7 @@ runs: with: path: | root-ccache - key: cache-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('autoware.repos') }} + key: cache-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/*.cpp') }} restore-keys: | cache-${{ inputs.platform }}-${{ inputs.name }}- cache-${{ inputs.platform }}- diff --git a/.github/actions/docker-build/action.yaml b/.github/actions/docker-build/action.yaml index 147a1a75cf5..7b36ab426a9 100644 --- a/.github/actions/docker-build/action.yaml +++ b/.github/actions/docker-build/action.yaml @@ -41,7 +41,7 @@ runs: with: path: | root-ccache - key: cache-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('autoware.repos') }} + key: cache-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/*.cpp') }} restore-keys: | cache-${{ inputs.platform }}-${{ inputs.name }}- cache-${{ inputs.platform }}- @@ -52,7 +52,7 @@ runs: with: path: | root-ccache - key: cache-${{ matrix.platform }}-${{ matrix.name }}-${{ hashFiles('autoware.repos') }} + key: cache-${{ matrix.platform }}-${{ matrix.name }}-${{ hashFiles('src/**/*.cpp') }} restore-keys: | cache-${{ matrix.platform }}-${{ matrix.name }}- cache-${{ matrix.platform }}-