Skip to content

Commit

Permalink
Workflow: fix sail path, improve RISCOF error recognition
Browse files Browse the repository at this point in the history
Follow sail build instr. from RISCOF doc
  • Loading branch information
meiniKi committed Mar 1, 2024
1 parent 5c5d273 commit c3d9af1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/setup-sail/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,17 @@ runs:
- shell: bash
if: steps.cache-sail-riscv.outputs.cache-hit != 'true'
run: |
mkdir -p .sail
git clone --recursive https://github.com/rems-project/sail-riscv.git
cd sail-riscv
git checkout tags/0.5
git clone --recursive https://github.com/rems-project/sail-riscv.git .sail
sudo apt install -y opam build-essential libgmp-dev z3 pkg-config zlib1g-dev
opam init
opam switch create 4.06.1
opam init -y --disable-sandboxing
opam switch create ocaml-base-compiler.4.06.1
opam install sail -y
eval $(opam config env)
opam install -y sail
make
cd .sail
git checkout tags/0.5
ARCH=RV32 make
cp -r c_emulator/* ../.sail/
cd ..
- shell: bash
run: echo ".sail" >> $GITHUB_PATH
run: echo "$(pwd)/.sail/c_emulator" >> $GITHUB_PATH

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ riscof.run.%: $(SRC_DESIGN) $(SRC_SYNTH)
export RISCOF_RFTYPE=$(RF)
riscof testlist --config=dv/config.ini --suite=riscv-arch-test/riscv-test-suite/ --env=riscv-arch-test/riscv-test-suite/env
riscof run --no-browser --config=dv/config.ini --suite=riscv-arch-test/riscv-test-suite/ --env=riscv-arch-test/riscv-test-suite/env 2>&1 | tee $(SUMMARY_DIR_RISCOF)/tmp.txt
@ ! grep -q "Failed" $(SUMMARY_DIR_RISCOF)/tmp.txt
@ ! grep -q -e "Failed" -e "ERROR" $(SUMMARY_DIR_RISCOF)/tmp.txt
@echo $$? > $(SUMMARY_DIR_RISCOF)/$*.log
@rm $(SUMMARY_DIR_RISCOF)/tmp.txt
# riscof exit code does not report failures, see Issue #102
Expand Down

0 comments on commit c3d9af1

Please sign in to comment.