Skip to content

Commit

Permalink
ci: Hash exact requirements of bin/snitch_cluster.vlt
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Sep 6, 2024
1 parent fa2b1d6 commit aae1a89
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,27 +94,33 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Build Software
working-directory: target/snitch_cluster
run: |
make CFG_OVERRIDE=cfg/github-ci.hjson sw
- name: Generate the RTL
- name: Get Verilator simulation binary hash
id: verilator-hash
working-directory: target/snitch_cluster
# yamllint disable rule:line-length
run: |
make CFG_OVERRIDE=cfg/github-ci.hjson rtl
wget https://raw.githubusercontent.com/colluca/list-make-prerequisites/main/list-make-prerequisites.py
chmod +x list-make-prerequisites.py
VLT_HASH=$(./list-make-prerequisites.py bin/snitch_cluster.vlt --recursive --hash 2>/dev/null)
echo "VLT_HASH=$VLT_HASH" >> $GITHUB_ENV
# yamllint enable rule:line-length
- name: Set up cache for Verilator build
id: verilator-cache
uses: actions/cache@v3
with:
path: target/snitch_cluster/bin
key: verilator-${{ hashFiles('Bender.lock', 'hw/**/*.sv', 'target/**/*.sv') }}
key: verilator-${{ env.VLT_HASH }}
restore-keys: |
verilator-
- name: Build Hardware
if: steps.verilator-cache.outputs.cache-hit != 'true'
working-directory: target/snitch_cluster
run: |
make CFG_OVERRIDE=cfg/github-ci.hjson VLT_JOBS=1 bin/snitch_cluster.vlt
- name: Build Software
working-directory: target/snitch_cluster
run: |
make CFG_OVERRIDE=cfg/github-ci.hjson sw
- name: Run Tests
working-directory: target/snitch_cluster
run: |
Expand Down

0 comments on commit aae1a89

Please sign in to comment.