Skip to content

Commit

Permalink
Merge pull request #1 from lekcyjna123/lekcyjna123/jumidelux-patch-cache
Browse files Browse the repository at this point in the history
Lekcyjna123/jumidelux patch cache
  • Loading branch information
lekcyjna123 authored Nov 4, 2023
2 parents 65832ed + 44a50f9 commit 879b99c
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,29 @@ jobs:
name: Build regression tests
runs-on: ubuntu-latest
container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2023.10.08_v
outputs:
container_id: ${{ job.container.id }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Build riscv-tests
run: cd test/external/riscv-tests && make

- uses: actions/upload-artifact@v3
- name: Cache regression-tests
id: cache-regression
uses: actions/cache@v3
env:
cache-name: cache-regression-tests
with:
name: "riscv-tests"
path: |
test/external/riscv-tests/test-*
path: test/external/riscv-tests/test-*
key: ${{ env.cache-name }}-${{ runner.os }}-${{
job.container.id }}-${{ hashFiles('**/test/external/riscv-tests') }}
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

run-regression-tests:
name: Run regression tests
Expand All @@ -40,6 +49,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -58,10 +69,16 @@ jobs:
. venv/bin/activate
PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full
- uses: actions/download-artifact@v3
- uses: actions/cache@v3
env:
cache-name: cache-regression-tests
with:
name: "riscv-tests"
path: test/external/riscv-tests
submodules: recursive
path: test/external/riscv-tests/test-*
key: ${{ env.cache-name }}-${{ runner.os }}-${{
needs.build-regression-tests.outputs.container_id }}-${{ hashFiles('**/test/external/riscv-tests') }}
restore-keys: |
${{ env.cache-name }}-${{ runner.os }}-${{ needs.build-regression-tests.outputs.container_id }}-
- name: Run tests
run: |
Expand Down

0 comments on commit 879b99c

Please sign in to comment.