Skip to content

Commit

Permalink
add ricsv-tests submodule commit hash to key
Browse files Browse the repository at this point in the history
  • Loading branch information
JumiDeluxe committed Nov 13, 2023
1 parent b46df40 commit 1596cf6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}-
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1596cf6

Please sign in to comment.