Skip to content

Commit

Permalink
upload artifacts on cache miss
Browse files Browse the repository at this point in the history
  • Loading branch information
JumiDeluxe committed Nov 13, 2023
1 parent 4977796 commit 5febc62
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2023.10.08_v
outputs:
container_id: ${{ job.container.id }}
cache_hit: ${{ steps.cache-regression.outputs.cache-hit }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -34,15 +35,19 @@ jobs:
key: ${{ env.cache-name }}-${{ runner.os }}-${{
job.container.id }}-${{ hashFiles(
'**/test/external/riscv-tests/environment/**',
'**/test/external/riscv-tests/environment/Makefile}'
'**/test/external/riscv-tests/Makefile}'
) }}
restore-keys: |
${{ env.cache-name }}-${{ runner.os }}-${{ job.container.id }}-
- if: ${{ steps.cache-regression.outputs.cache-hit != 'true' }}
name: Build riscv-tests
run: cd test/external/riscv-tests && make

- name: Upload riscv-tests
uses: actions/upload-artifact@v3
with:
path: test/external/riscv-tests

run-regression-tests:
name: Run regression tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -80,7 +85,7 @@ jobs:
key: ${{ env.cache-name }}-${{ runner.os }}-${{
needs.build-regression-tests.outputs.container_id }}-${{ hashFiles(
'**/test/external/riscv-tests/environment/**',
'**/test/external/riscv-tests/environment/Makefile}'
'**/test/external/riscv-tests/Makefile}'
) }}
fail-on-cache-miss: true

Expand Down

0 comments on commit 5febc62

Please sign in to comment.