From 1596cf6c7692a206f2991334aed4a19d71af8fc1 Mon Sep 17 00:00:00 2001 From: JumiDeluxe Date: Mon, 13 Nov 2023 14:53:58 +0100 Subject: [PATCH] add ricsv-tests submodule commit hash to key --- .github/workflows/main.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38690c4fa..c40ed484a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,6 +24,10 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive + + - name: Get riscv-tests submodule commit id + run: | + echo "RISCV_COMMIT=$(git ls-remote https://github.com/riscv-software-src/riscv-tests.git HEAD | awk '{ print $1 }')" >> $GITHUB_ENV - name: Cache regression-tests id: cache-regression @@ -32,10 +36,12 @@ jobs: cache-name: cache-regression-tests with: path: test/external/riscv-tests/test-* + key: ${{ env.cache-name }}-${{ runner.os }}-${{ job.container.id }}-${{ hashFiles( '**/test/external/riscv-tests/environment/**', - '**/test/external/riscv-tests/Makefile}' + '**/test/external/riscv-tests/Makefile', + '.git/modules/test/external/riscv-tests/riscv-tests/HEAD' ) }} restore-keys: | ${{ env.cache-name }}-${{ runner.os }}-${{ job.container.id }}- @@ -86,8 +92,9 @@ jobs: key: ${{ env.cache-name }}-${{ runner.os }}-${{ needs.build-regression-tests.outputs.container_id }}-${{ hashFiles( '**/test/external/riscv-tests/environment/**', - '**/test/external/riscv-tests/Makefile}' - ) }} + '**/test/external/riscv-tests/Makefile', + '.git/modules/test/external/riscv-tests/riscv-tests/HEAD' + ) }} fail-on-cache-miss: true - name: Run tests