[skip e2e]Fix ccache hashFiles paths (#17276)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2022-05-31 10:12:02 +08:00 committed by GitHub
parent 06ce43e90f
commit 9ce9c6ea68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,14 +46,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: "Generate CCache Hash"
env:
CORE_HASH: ${{ hashFiles( 'internal/core/**/*.cpp', 'internal/core/**/*.cc', 'internal/core/**/*.c', 'internal/core/**/*.h', 'internal/core/**/*.hpp', 'internal/core/**/CMakeLists.txt') }}
run: |
echo "corehash=${CORE_HASH}" >> $GITHUB_ENV
echo "Set CCache hash to ${CORE_HASH}"
- name: Cache CCache Volumes
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: .docker/amd64-ubuntu${{ matrix.ubuntu }}-ccache
key: ubuntu${{ matrix.ubuntu }}-ccache-${{ hashFiles('/internal/core/**') }}
key: ubuntu${{ matrix.ubuntu }}-ccache-${{ env.corehash }}
restore-keys: ubuntu${{ matrix.ubuntu }}-ccache-
- name: Cache Go Mod Volumes
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: .docker/amd64-ubuntu${{ matrix.ubuntu }}-go-mod
key: ubuntu${{ matrix.ubuntu }}-go-mod-${{ hashFiles('**/go.sum') }}