From 4eb22e9c2e1e3b55ed8699706b240d2ec34e8f39 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 test artifacts with dummy container id --- .github/workflows/main.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 19f6bd0a3..6bf1bc51e 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 @@ -31,18 +32,22 @@ jobs: cache-name: cache-regression-tests with: path: test/external/riscv-tests/test-* - key: ${{ env.cache-name }}-${{ runner.os }}-${{ - job.container.id }}-${{ hashFiles( + key: ${{ env.cache-name }}-${{ runner.os }}-dummy_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 }}- + ${{ env.cache-name }}-${{ runner.os }}-dummy_id- - if: ${{ steps.cache-regression.outputs.cache-hit != 'true' }} - name: Build riscv-tests run: cd test/external/riscv-tests && make + - if: ${{ steps.cache-regression.outputs.cache-hit != 'true' }} + 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 @@ -77,10 +82,9 @@ jobs: cache-name: cache-regression-tests with: path: test/external/riscv-tests/test-* - key: ${{ env.cache-name }}-${{ runner.os }}-${{ - needs.build-regression-tests.outputs.container_id }}-${{ hashFiles( + key: ${{ env.cache-name }}-${{ runner.os }}-dummy_id-${{ hashFiles( '**/test/external/riscv-tests/environment/**', - '**/test/external/riscv-tests/environment/Makefile}' + '**/test/external/riscv-tests/Makefile}' ) }} fail-on-cache-miss: true