Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Oct 27, 2024
1 parent e392170 commit 355c4a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ jobs:
python-version: ["3.10"]
patch_etiss: [false, true]
xlen: [32, 64]
virt: ["p", "v"]
# virt: ["p", "v"]
virt: ["p"]
exts: ["IMACFD"]
jit: ["tcc", "gcc", "llvm"]
runlevel: ["msu"]
# runlevel: ["msu"]
runlevel: ["m", "s", "u"]
# etiss-arch: ["RV32IMACFD", "RV64IMACFD"]
steps:
- name: Clone wrapper repo
Expand Down Expand Up @@ -81,8 +83,13 @@ jobs:
- name: Setup ETISS
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 11
rm llvm.sh
cd etiss
sudo apt install -y g++ libboost-system-dev libboost-filesystem-dev libboost-program-options-dev graphviz doxygen libtinfo-dev zlib1g-dev texinfo
sudo apt install -y libclang-11-dev
cd PluginImpl
ln -s ../../etiss_riscv_tests/FileLoggerPlugin .
cd -
Expand Down Expand Up @@ -112,9 +119,9 @@ jobs:
source .venv/bin/activate
# etiss_riscv_tests/test.py --arch RV${{ matrix.xlen }}-${{ matrix.exts }} --bits ${{ matrix.xlen }} --ext ${{ steps.string.outputs.lowercase }} --virt p v --timeout 10 --jit ${{ matrix.jit }} riscv-tests/isa etiss/build/bin/bare_etiss_processor
# python etiss_riscv_tests/test.py --arch RV${{ matrix.xlen }}${{ matrix.exts }} --bits ${{ matrix.xlen }} --ext ${{ steps.string.outputs.lowercase }} --virt pv --timeout 10 --jit ${{ matrix.jit }} riscv-tests/isa etiss/build/bin/bare_etiss_processor --fail
python etiss_riscv_tests/test.py --arch RV${{ matrix.xlen }}${{ matrix.exts }} --bits ${{ matrix.xlen }} --ext ${{ steps.string.outputs.lowercase }} --virt ${{ matrix.virt }} --timeout 10 --jit ${{ matrix.jit }} --runlevel ${{ matrix.runlevel }} --keep-output both riscv-tests/isa etiss/build/bin/bare_etiss_processor
python etiss_riscv_tests/test.py --arch RV${{ matrix.xlen }}${{ matrix.exts }} --bits ${{ matrix.xlen }} --ext ${{ steps.string.outputs.lowercase }} --virt ${{ matrix.virt }} --timeout 10 --jit ${{ matrix.jit }} --runlevel ${{ matrix.runlevel }} riscv-tests/isa etiss/build/bin/bare_etiss_processor
python3 gen_summary.py results_* --etiss-dir etiss --etiss-arch-riscv-dir etiss_arch_riscv --m2isar-dir M2-ISA-R --riscv-tests-dir riscv-tests >> $GITHUB_STEP_SUMMARY
python3 gen_messages.py results_* --print-passed --allow-fail
python3 gen_messages.py results_* --allow-fail
- name: Archive files
uses: actions/upload-artifact@v4
if: ${{ always() }}
Expand Down
8 changes: 6 additions & 2 deletions gen_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
parser.add_argument("--print-passed", action="store_true")
parser.add_argument("--allow-empty", action="store_true")
parser.add_argument("--allow-fail", action="store_true")
parser.add_argument("--allow-err", action="store_true")

args = parser.parse_args()

Expand All @@ -20,8 +21,8 @@
pass_content = [line.strip() for line in pass_content if len(line.strip()) > 0]
fail_content = [line.strip() for line in fail_content if len(line.strip()) > 0]

err_content = [line for line in fail_content if "etiss error" in line]
fail_content = [line for line in fail_content if "etiss error" not in line]
err_content = [line for line in fail_content if "etiss error" in line or "timeout" in line]
fail_content = [line for line in fail_content if "etiss error" not in line and "timeout" not in line]

num_pass = len(pass_content)
num_err = len(err_content)
Expand All @@ -40,5 +41,8 @@
if num_pass + num_fail + num_err == 0:
assert args.allow_empty, "No test results found"

if num_err > 0:
assert args.allow_err, "Crashing tests not allowed"

if num_fail > 0:
assert args.allow_fail, "Failing tests not allowed"

0 comments on commit 355c4a9

Please sign in to comment.