Skip to content

Commit

Permalink
vlindex: run in CI
Browse files Browse the repository at this point in the history
This runs vlindex on the Hazard3 Verilog.
  • Loading branch information
kroening committed Dec 3, 2024
1 parent f062f07 commit f13ce62
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/pull-request-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ jobs:
name: ebmc-binary
retention-days: 5
path: src/ebmc/ebmc
- name: Upload the vlindex binary
uses: actions/upload-artifact@v4
with:
name: vlindex-binary
retention-days: 5
path: src/vlindex/vlindex

# This job takes approximately 4 minutes
benchmarking:
Expand Down Expand Up @@ -167,8 +173,17 @@ jobs:
path: ebmc
- name: Try the ebmc binary
run: chmod a+x ./ebmc/ebmc ; ./ebmc/ebmc --version
- name: Hazard3
run: PATH=$PATH:$PWD/ebmc examples/Hazard3/Hazard3.sh
- name: ebmc on Hazard3
run: PATH=$PATH:$PWD/ebmc examples/Hazard3/Hazard3-ebmc.sh
- name: Get the vlindex binary
uses: actions/download-artifact@v4
with:
name: vlindex-binary
path: vlindex
- name: Try the vlindex binary
run: chmod a+x ./vlindex/vlindex ; ./vlindex/vlindex --version
- name: vlindex on Hazard3
run: PATH=$PATH:$PWD/vlindex examples/Hazard3/Hazard3-vlindex.sh

# This job takes approximately 15 minutes
check-centos8-make-gcc:
Expand Down
File renamed without changes.
34 changes: 34 additions & 0 deletions examples/Hazard3/Hazard3-vlindex.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh

# abort on error
set -e

# clone Hazard3 repo if not done yet
if [ ! -e Hazard3/.git ] ; then
git clone https://github.com/Wren6991/Hazard3 --branch v1.0 --depth 1
fi

cd Hazard3

vlindex -I hdl | tee vlindex-output

grep "Number of" vlindex-output > vlindex-output-filtered

# This errors when there's a diff
diff vlindex-output-filtered - << EOM
Number of files...........: 46
Number of symlinked files.: 0
Number of lines...........: 12093
Number of modules.........: 46
Number of UDPs............: 0
Number of checkers........: 0
Number of classes.........: 0
Number of packages........: 0
Number of interfaces......: 0
Number of functions.......: 7
Number of tasks...........: 0
Number of properties......: 0
Number of sequences.......: 0
Number of module instances: 71
Number of configurations..: 0
EOM

0 comments on commit f13ce62

Please sign in to comment.