Skip to content

Commit 68f9347

Browse files
Merge branch 'master' into cv32a65x-act4
2 parents c9e9f48 + 31b4563 commit 68f9347

10 files changed

Lines changed: 1423 additions & 209 deletions

File tree

.github/scripts/dashboard_tiers/generate_dashboard.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import argparse
1111
import json
1212
import os
13+
import shutil
1314
from datetime import datetime, timezone
1415
from pathlib import Path
1516

@@ -310,6 +311,14 @@ def main():
310311
with open(output_file, "w") as f:
311312
f.write(html)
312313

314+
# Copy static dashboard assets, such as the local OpenHW logo.
315+
static_dir = Path(__file__).parent / "static"
316+
if static_dir.exists():
317+
assets_dir = output_dir / "assets"
318+
if assets_dir.exists():
319+
shutil.rmtree(assets_dir)
320+
shutil.copytree(static_dir, assets_dir)
321+
313322
print(f"Dashboard generated: {output_file}")
314323
print(f" Workflows: {len(workflows)}")
315324
for wf in workflows:

.github/scripts/dashboard_tiers/static/openhw-landscape.svg

Lines changed: 1145 additions & 0 deletions
Loading

.github/scripts/dashboard_tiers/templates/index.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@
7777
<nav class="navbar navbar-expand-lg top-navbar shadow-sm">
7878
<div class="container-fluid">
7979
<span class="navbar-brand">
80-
<img src="https://openhwfoundation.org/images/openhw-landscape.png"
81-
alt="OpenHW Group" height="32"
82-
onerror="this.onerror=null; this.src='https://avatars.githubusercontent.com/u/51096416?s=64&v=4';">
80+
<img src="assets/openhw-landscape.svg"
81+
alt="OpenHW Foundation" height="32">
8382
CVA6 Tier CI Dashboard
8483
</span>
8584
<span class="navbar-text text-muted" style="font-size:0.85rem">
@@ -169,7 +168,7 @@ <h5 class="text-muted mb-0">Test Coverage Matrix</h5>
169168
<span class="text-muted">Legend:</span>
170169
<span><span class="matrix-icon pass" style="width:16px;height:16px;font-size:0.65rem">&#10003;</span> Pass</span>
171170
<span><span class="matrix-icon fail" style="width:16px;height:16px;font-size:0.65rem">&#10007;</span> Fail</span>
172-
<span><span class="matrix-icon na" style="width:16px;height:16px;font-size:0.65rem">&ndash;</span> Not covered</span>
171+
<span><span class="matrix-icon na" style="width:16px;height:16px;font-size:0.65rem">&ndash;</span> Not in matrix</span>
173172
</div>
174173
<div class="table-responsive">
175174
<table class="table table-sm matrix-table mb-0" id="matrixTable">
@@ -392,7 +391,7 @@ <h2 class="accordion-header">
392391
bodyHtml += '<td class="matrix-td"><span class="matrix-icon na" title="' + cfg + ' / ' + suite + ': ' + c + '">?</span></td>';
393392
}
394393
} else {
395-
bodyHtml += '<td class="matrix-td"><span class="matrix-icon na" title="' + cfg + ' / ' + suite + ': N/A">&ndash;</span></td>';
394+
bodyHtml += '<td class="matrix-td"><span class="matrix-icon na" title="' + cfg + ' / ' + suite + ': not in matrix">&ndash;</span></td>';
396395
}
397396
});
398397
bodyHtml += '</tr>';
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2026 OpenHW Group
3+
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
set -o pipefail
7+
8+
RUN_LOG="$(pwd)/ci-results/run.log"
9+
FAILURE_SUMMARY="$(pwd)/ci-results/failure_summary.log"
10+
EXIT_CODE_FILE="$(pwd)/ci-results/exit_code"
11+
12+
mkdir -p ci-results
13+
: > "${RUN_LOG}"
14+
: > "${FAILURE_SUMMARY}"
15+
echo "1" > "${EXIT_CODE_FILE}"
16+
17+
TIER_NAME="${TIER_NAME:-Tier}"
18+
TIER_MODE="${TIER_MODE:-script}"
19+
TIER_CONFIG="${TIER_CONFIG:?TIER_CONFIG is required}"
20+
TIER_TESTCASE="${TIER_TESTCASE:?TIER_TESTCASE is required}"
21+
TIER_SIMULATOR="${TIER_SIMULATOR:?TIER_SIMULATOR is required}"
22+
TIER_INSTALL_SCRIPT="${TIER_INSTALL_SCRIPT:-}"
23+
TIER_TESTLIST="${TIER_TESTLIST:-}"
24+
TIER_TEST_NAME="${TIER_TEST_NAME:-}"
25+
TIER_LINKER="${TIER_LINKER:-}"
26+
TIER_HWCONFIG_OPTS="${TIER_HWCONFIG_OPTS:-}"
27+
28+
log_info() {
29+
echo "$*" | tee -a "${RUN_LOG}"
30+
}
31+
32+
run_logged() {
33+
set +e
34+
"$@" > >(tee -a "${RUN_LOG}") 2>&1
35+
local cmd_rc=$?
36+
return "${cmd_rc}"
37+
}
38+
39+
source_logged() {
40+
local script_path="$1"
41+
set +e
42+
# shellcheck source=/dev/null
43+
source "${script_path}" > >(tee -a "${RUN_LOG}") 2>&1
44+
local source_rc=$?
45+
return "${source_rc}"
46+
}
47+
48+
record_rc() {
49+
local step_rc="$1"
50+
if [ "${step_rc}" -ne 0 ] && [ "${rc}" -eq 0 ]; then
51+
rc="${step_rc}"
52+
fi
53+
}
54+
55+
append_failure() {
56+
echo "$*" | tee -a "${FAILURE_SUMMARY}" >&2
57+
}
58+
59+
collect_reports() {
60+
find verif/sim -name "iss_regr.log" -exec cp {} ci-results/ \; 2>/dev/null || true
61+
}
62+
63+
scan_for_failures() {
64+
local matches
65+
local -a scan_files=("${RUN_LOG}")
66+
67+
while IFS= read -r -d '' file_path; do
68+
scan_files+=("${file_path}")
69+
done < <(
70+
find verif/sim -type f \
71+
\( -name "*.log" -o -name "*.txt" -o -name "iss_regr.log" \) \
72+
-print0 2>/dev/null || true
73+
)
74+
75+
matches="$(
76+
grep -HnE \
77+
"\\[FAILED\\]|SIMULATION FAILED|(^|[^0-9])[1-9][0-9]* FAILED|ERROR return code:|bad syscall|unrecognized opcode|extension .* required|make(\\[[0-9]+\\])?: \\*\\*\\*.*Error|terminate called|Traceback \\(most recent call last\\)" \
78+
"${scan_files[@]}" 2>/dev/null || true
79+
)"
80+
81+
if [ -n "${matches}" ]; then
82+
append_failure "ERROR: ${TIER_NAME} job reported success, but failure patterns were found in logs."
83+
echo "${matches}" | tee -a "${FAILURE_SUMMARY}" >&2
84+
return 1
85+
fi
86+
87+
return 0
88+
}
89+
90+
scan_iss_traces() {
91+
local matches=""
92+
local critical_patterns
93+
critical_patterns="ERROR return code:|bad syscall|unrecognized opcode|extension .* required|terminate called|Traceback \\(most recent call last\\)"
94+
95+
while IFS= read -r -d '' file_path; do
96+
local critical_matches
97+
local last_status
98+
99+
critical_matches="$(grep -HnE "${critical_patterns}" "${file_path}" 2>/dev/null || true)"
100+
if [ -n "${critical_matches}" ]; then
101+
matches+="${critical_matches}"$'\n'
102+
fi
103+
104+
last_status="$(
105+
grep -nE "\\*\\*\\*[[:space:]]+(FAILED|SUCCESS)[[:space:]]+\\*\\*\\*|SIMULATION FAILED" "${file_path}" 2>/dev/null | tail -n 1 || true
106+
)"
107+
if [[ -n "${last_status}" && "${last_status}" != *"SUCCESS"* ]]; then
108+
matches+="${file_path}:${last_status}"$'\n'
109+
fi
110+
done < <(find verif/sim -type f -name "*.iss" -print0 2>/dev/null || true)
111+
112+
if [ -n "${matches}" ]; then
113+
append_failure "ERROR: ${TIER_NAME} job reported success, but ISS trace failure patterns were found."
114+
printf "%s" "${matches}" | tee -a "${FAILURE_SUMMARY}" >&2
115+
return 1
116+
fi
117+
118+
return 0
119+
}
120+
121+
rc=0
122+
123+
log_info "Running ${TIER_NAME}: ${TIER_CONFIG} / ${TIER_TESTCASE} (${TIER_MODE})"
124+
125+
source_logged verif/sim/setup-env.sh
126+
record_rc "$?"
127+
128+
if [ "${rc}" -eq 0 ]; then
129+
if [ "${TIER_MODE}" = "testlist" ]; then
130+
if [[ "${TIER_SIMULATOR}" == *"veri-testharness"* ]]; then
131+
source_logged verif/regress/install-verilator.sh
132+
record_rc "$?"
133+
fi
134+
135+
if [ "${rc}" -eq 0 ]; then
136+
source_logged verif/regress/install-spike.sh
137+
record_rc "$?"
138+
fi
139+
140+
if [ "${rc}" -eq 0 ] && [ -n "${TIER_INSTALL_SCRIPT}" ]; then
141+
source_logged "verif/regress/${TIER_INSTALL_SCRIPT}.sh"
142+
record_rc "$?"
143+
fi
144+
145+
if [ "${rc}" -eq 0 ]; then
146+
cva6_cmd=(
147+
python3 cva6.py
148+
"--testlist=${TIER_TESTLIST}"
149+
--target "${TIER_CONFIG}"
150+
--iss_yaml=cva6.yaml
151+
"--iss=${TIER_SIMULATOR}"
152+
"--issrun_opts=+tb_performance_mode+debug_disable=1+UVM_VERBOSITY=UVM_NONE"
153+
)
154+
155+
if [ -n "${TIER_LINKER}" ]; then
156+
cva6_cmd+=("--linker=${TIER_LINKER}")
157+
fi
158+
159+
if [ -n "${TIER_TEST_NAME}" ]; then
160+
cva6_cmd+=(--test "${TIER_TEST_NAME}")
161+
fi
162+
163+
pushd verif/sim > /dev/null || rc=$?
164+
if [ "${rc}" -eq 0 ]; then
165+
run_logged "${cva6_cmd[@]}"
166+
record_rc "$?"
167+
fi
168+
popd > /dev/null || true
169+
fi
170+
else
171+
if [ -n "${TIER_HWCONFIG_OPTS}" ]; then
172+
export DV_HWCONFIG_OPTS="${TIER_HWCONFIG_OPTS}"
173+
fi
174+
175+
run_logged env \
176+
DV_SIMULATORS="${TIER_SIMULATOR}" \
177+
DV_TARGET="${TIER_CONFIG}" \
178+
bash -e "verif/regress/${TIER_TESTCASE}.sh"
179+
record_rc "$?"
180+
fi
181+
fi
182+
183+
collect_reports
184+
185+
if [ "${rc}" -eq 0 ] && ! compgen -G "verif/sim/out*" > /dev/null; then
186+
append_failure "ERROR: ${TIER_NAME} job reported success but produced no verif/sim/out* results."
187+
rc=1
188+
fi
189+
190+
if [ "${rc}" -eq 0 ] && ! scan_for_failures; then
191+
rc=1
192+
fi
193+
194+
if [ "${rc}" -eq 0 ] && ! scan_iss_traces; then
195+
rc=1
196+
fi
197+
198+
echo "${rc}" > "${EXIT_CODE_FILE}"
199+
exit "${rc}"

.github/workflows/openhw-cva6-ci-tier1.yml

Lines changed: 22 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -116,49 +116,17 @@ jobs:
116116
run: source ci/install-prereq.sh
117117

118118
- name: Run Tier 1 for ${{ matrix.config }} / ${{ matrix.testcase }}
119-
run: |
120-
set -x
121-
mkdir -p ci-results
122-
echo "1" > ci-results/exit_code
123-
source verif/sim/setup-env.sh
124-
rc=0
125-
126-
if [ "${{ matrix.mode }}" = "testlist" ]; then
127-
if [[ "${{ matrix.simulator }}" == *"veri-testharness"* ]]; then
128-
source verif/regress/install-verilator.sh
129-
fi
130-
source verif/regress/install-spike.sh
131-
if [ -n "${{ matrix.install_script }}" ]; then
132-
source verif/regress/${{ matrix.install_script }}.sh
133-
fi
134-
LINKER_OPT=""
135-
if [ -n "${{ matrix.linker }}" ]; then
136-
LINKER_OPT="--linker=${{ matrix.linker }}"
137-
fi
138-
TEST_OPT=""
139-
if [ -n "${{ matrix.test_name }}" ]; then
140-
TEST_OPT="--test ${{ matrix.test_name }}"
141-
fi
142-
cd verif/sim
143-
python3 cva6.py \
144-
--testlist=${{ matrix.testlist }} \
145-
--target ${{ matrix.config }} \
146-
--iss_yaml=cva6.yaml \
147-
--iss=${{ matrix.simulator }} \
148-
--issrun_opts="+tb_performance_mode+debug_disable=1+UVM_VERBOSITY=UVM_NONE" \
149-
$LINKER_OPT \
150-
${TEST_OPT} \
151-
|| rc=$?
152-
cd -
153-
else
154-
DV_SIMULATORS=${{ matrix.simulator }} \
155-
DV_TARGET=${{ matrix.config }} \
156-
bash verif/regress/${{ matrix.testcase }}.sh || rc=$?
157-
fi
158-
159-
echo "$rc" > ci-results/exit_code
160-
find verif/sim -name "iss_regr.log" -exec cp {} ci-results/ \; 2>/dev/null || true
161-
exit $rc
119+
env:
120+
TIER_NAME: Tier 1
121+
TIER_MODE: ${{ matrix.mode }}
122+
TIER_CONFIG: ${{ matrix.config }}
123+
TIER_TESTCASE: ${{ matrix.testcase }}
124+
TIER_SIMULATOR: ${{ matrix.simulator }}
125+
TIER_INSTALL_SCRIPT: ${{ matrix.install_script }}
126+
TIER_TESTLIST: ${{ matrix.testlist }}
127+
TIER_TEST_NAME: ${{ matrix.test_name }}
128+
TIER_LINKER: ${{ matrix.linker }}
129+
run: bash .github/scripts/run-tier-regression.sh
162130

163131
- name: Upload Results
164132
if: always()
@@ -206,49 +174,17 @@ jobs:
206174
run: source ci/install-prereq.sh
207175

208176
- name: Run Tier 1 for ${{ matrix.config }} / ${{ matrix.testcase }}
209-
run: |
210-
set -x
211-
mkdir -p ci-results
212-
echo "1" > ci-results/exit_code
213-
source verif/sim/setup-env.sh
214-
rc=0
215-
216-
if [ "${{ matrix.mode }}" = "testlist" ]; then
217-
if [[ "${{ matrix.simulator }}" == *"veri-testharness"* ]]; then
218-
source verif/regress/install-verilator.sh
219-
fi
220-
source verif/regress/install-spike.sh
221-
if [ -n "${{ matrix.install_script }}" ]; then
222-
source verif/regress/${{ matrix.install_script }}.sh
223-
fi
224-
LINKER_OPT=""
225-
if [ -n "${{ matrix.linker }}" ]; then
226-
LINKER_OPT="--linker=${{ matrix.linker }}"
227-
fi
228-
TEST_OPT=""
229-
if [ -n "${{ matrix.test_name }}" ]; then
230-
TEST_OPT="--test ${{ matrix.test_name }}"
231-
fi
232-
cd verif/sim
233-
python3 cva6.py \
234-
--testlist=${{ matrix.testlist }} \
235-
--target ${{ matrix.config }} \
236-
--iss_yaml=cva6.yaml \
237-
--iss=${{ matrix.simulator }} \
238-
--issrun_opts="+tb_performance_mode+debug_disable=1+UVM_VERBOSITY=UVM_NONE" \
239-
$LINKER_OPT \
240-
${TEST_OPT} \
241-
|| rc=$?
242-
cd -
243-
else
244-
DV_SIMULATORS=${{ matrix.simulator }} \
245-
DV_TARGET=${{ matrix.config }} \
246-
bash verif/regress/${{ matrix.testcase }}.sh || rc=$?
247-
fi
248-
249-
echo "$rc" > ci-results/exit_code
250-
find verif/sim -name "iss_regr.log" -exec cp {} ci-results/ \; 2>/dev/null || true
251-
exit $rc
177+
env:
178+
TIER_NAME: Tier 1
179+
TIER_MODE: ${{ matrix.mode }}
180+
TIER_CONFIG: ${{ matrix.config }}
181+
TIER_TESTCASE: ${{ matrix.testcase }}
182+
TIER_SIMULATOR: ${{ matrix.simulator }}
183+
TIER_INSTALL_SCRIPT: ${{ matrix.install_script }}
184+
TIER_TESTLIST: ${{ matrix.testlist }}
185+
TIER_TEST_NAME: ${{ matrix.test_name }}
186+
TIER_LINKER: ${{ matrix.linker }}
187+
run: bash .github/scripts/run-tier-regression.sh
252188

253189
- name: Upload Results
254190
if: always()

0 commit comments

Comments
 (0)