fix(landing-page): Bundle-relative Pfade fuer Reports, cppcheck-Step vor landing-page
Validate / build-test (macos-latest) (push) Failing after 3s
Validate / build-test (ubuntu-latest) (push) Successful in 19s
Validate / build-test (windows-latest) (push) Failing after 22s
Validate / reports (push) Successful in 50s

This commit is contained in:
Stefan Lohmaier
2026-05-12 02:54:44 -07:00
parent f2fb430505
commit 1d7cf53881
2 changed files with 26 additions and 26 deletions
+3 -3
View File
@@ -87,15 +87,15 @@ jobs:
- name: Doxygen API-Dokumentation
run: make docs
- name: Landing-Page
run: make landing-page
- name: Cppcheck-Report (XML)
run: |
mkdir -p build
cppcheck --enable=all --inconclusive --xml --xml-version=2 \
-I src src 2> build/cppcheck-report.xml || true
- name: Landing-Page
run: make landing-page
- name: Upload Coverage HTML
uses: actions/upload-artifact@v3
if: always()
+23 -23
View File
@@ -139,12 +139,22 @@ def main() -> int:
ncs = collect_docs("docs/non-conformities")
misra_r = collect_docs("misra/records")
# Reports (existence-checked)
rep_cov_idx = REPO / "build" / "coverage-html" / "index.html"
rep_test_html = REPO / "build" / "test-report.html"
rep_api = REPO / "build" / "api-doc" / "html" / "index.html"
rep_trace = REPO / "docs" / "traceability" / "index.html"
rep_cppcheck = REPO / "build" / "cppcheck-report.xml"
# Reports — Links zeigen auf BUNDLE-Pfade (relative zum index.html im Deploy).
# Die CI-Pipeline deployt die Artefakte in genau diese Pfade,
# darum ist deren Existenz hier irrelevant — Links werden immer emittiert.
rep_paths = {
"coverage": "coverage/index.html",
"test": "reports/test-report.html",
"api": "api-doc/index.html",
"trace": "traceability/index.html",
"cppcheck": "reports/cppcheck-report.xml",
}
# Existence-Check zum Anzeigen "Generated?" — gegen den CI/lokalen Build-Pfad.
rep_cov_built = (REPO / "build" / "coverage-html" / "index.html").exists()
rep_test_built = (REPO / "build" / "test-report.html").exists()
rep_api_built = (REPO / "build" / "api-doc" / "html" / "index.html").exists()
rep_trace_built = (REPO / "docs" / "traceability" / "index.html").exists()
rep_cpp_built = (REPO / "build" / "cppcheck-report.xml").exists()
html_body = f"""<!doctype html>
<html lang='de'><head>
@@ -222,28 +232,18 @@ footer {{ text-align: center; color: #888; padding: 30px; font-size: 13px; }}
html_body += "</div>"
# Reports
# Reports — Links immer setzen, Bundle-Pfade.
html_body += "<section><h2>Engineering-Reports (CI-generiert)</h2><ul>\n"
html_body += report_link("Traceability-Matrix",
os.path.relpath(rep_trace, REPO),
rep_trace.exists(),
html_body += report_link("Traceability-Matrix", rep_paths["trace"], True,
"SG -> SYS -> SA, SWE -> SWA -> Code+Test, bidirektional verifiziert")
html_body += report_link("Test-Summary",
os.path.relpath(rep_test_html, REPO),
rep_test_html.exists(),
html_body += report_link("Test-Summary", rep_paths["test"], True,
f"{n_tests} Unit-Tests mit Anforderungs-Mapping")
html_body += report_link("Coverage (gcov/lcov)",
os.path.relpath(rep_cov_idx, REPO) if rep_cov_idx.exists() else "build/coverage-html/index.html",
rep_cov_idx.exists(),
html_body += report_link("Coverage (gcov/lcov)", rep_paths["coverage"], True,
"Statement + Branch Coverage, klickbar bis Zeilen-Level")
html_body += report_link("API-Dokumentation (Doxygen)",
os.path.relpath(rep_api, REPO) if rep_api.exists() else "build/api-doc/html/index.html",
rep_api.exists(),
html_body += report_link("API-Dokumentation (Doxygen)", rep_paths["api"], True,
"Alle Header + Funktionen, mit @arch/@reqs/@asil")
html_body += report_link("Cppcheck-Report (XML)",
os.path.relpath(rep_cppcheck, REPO) if rep_cppcheck.exists() else "build/cppcheck-report.xml",
rep_cppcheck.exists(),
"Statische Analyse + MISRA-Findings")
html_body += report_link("Cppcheck-Report (XML)", rep_paths["cppcheck"], True,
"Statische Analyse + MISRA-Findings (XML zum Download)")
html_body += "</ul></section>"
# Diagrams