From 5febc62a5567988c0f34d9b8bed2110f535710f0 Mon Sep 17 00:00:00 2001 From: JumiDeluxe Date: Mon, 13 Nov 2023 11:18:06 +0100 Subject: [PATCH] upload artifacts on cache miss --- .github/workflows/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 19f6bd0a3..c58796b8c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 @@ -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