From c3d9af1cc0c9894e01231c4272763c52354532e5 Mon Sep 17 00:00:00 2001 From: Meinhard Kissich Date: Fri, 1 Mar 2024 18:49:34 +0100 Subject: [PATCH] Workflow: fix sail path, improve RISCOF error recognition Follow sail build instr. from RISCOF doc --- .github/workflows/setup-sail/action.yml | 17 +++++++---------- Makefile | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/setup-sail/action.yml b/.github/workflows/setup-sail/action.yml index 1efaef4..dcce805 100644 --- a/.github/workflows/setup-sail/action.yml +++ b/.github/workflows/setup-sail/action.yml @@ -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 diff --git a/Makefile b/Makefile index f46b80a..23eb12e 100644 --- a/Makefile +++ b/Makefile @@ -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