Skip to content

Commit

Permalink
Cache regression tests in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JumiDeluxe committed Oct 30, 2023
1 parent bdf722e commit a24d3bf
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,23 @@ jobs:
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: ${{ runner.os }}-build-${{ env.cache-name }}-${{
hashFiles('**/riscv-tests/test-*') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- 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 Down Expand Up @@ -58,10 +67,17 @@ 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
path: test/external/riscv-tests/test-*
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{
hashFiles('**/riscv-tests/test-*') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run tests
run: |
Expand Down

0 comments on commit a24d3bf

Please sign in to comment.