From 2cadafb2821ca46bd29dd82ef718302472f2eff3 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 7 Feb 2026 10:17:18 +0100 Subject: fix(ci): Update verification script to catch tool compilation failures Problem: The spectool.cc include path bug was not caught by the test suite because check_all.sh only built tests, not tools. Root Cause Analysis: - check_all.sh used -DDEMO_BUILD_TESTS=ON only - Tools (spectool, specview, specplay) are built with -DDEMO_BUILD_TOOLS=ON - CTest runs tests but doesn't verify tool compilation - Result: Tool compilation failures went undetected Solution: Updated scripts/check_all.sh to: 1. Enable both -DDEMO_BUILD_TESTS=ON and -DDEMO_BUILD_TOOLS=ON 2. Explicitly verify all tools compile (spectool, specview, specplay) 3. Add clear output messages for each verification stage 4. Document what the script verifies in header comments Updated doc/CONTRIBUTING.md: - Added "Automated Verification (Recommended)" section - Documented that check_all.sh verifies tests AND tools - Provided manual verification steps as alternative - Clear command examples with expected behavior Verification: - Tested by intentionally breaking spectool.cc include - Script correctly caught the compilation error - Reverted break and verified all tools build successfully This ensures all future tool changes are verified before commit. Prevents regression: Similar include path issues will now be caught by pre-commit verification. --- doc/CONTRIBUTING.md | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index 7d206a5..f41d90e 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -8,10 +8,33 @@ This document outlines the conventions to follow when contributing to this proje Before preparing or proposing a commit, you **must** perform the following verifications to prevent regressions: +**Automated Verification (Recommended):** +```bash +./scripts/check_all.sh +``` +This script automatically: +- Builds with tests and tools enabled +- Runs the full test suite (26 tests) +- Verifies all tools compile (spectool, specview, specplay) +- Cross-compiles for Windows (if mingw-w64 is installed) + +**Manual Verification:** + 1. **MacOS / Linux (Native)**: - * Build the project (debug or release). - * Run the entire test suite (`ctest`). - * Ensure all tests pass. + * Build the project with tests and tools enabled: + ```bash + cmake -S . -B build -DDEMO_BUILD_TESTS=ON -DDEMO_BUILD_TOOLS=ON + cmake --build build -j8 + ``` + * Run the entire test suite: + ```bash + cd build && ctest --output-on-failure + ``` + * Verify tools compile: + ```bash + cmake --build build --target spectool specview specplay + ``` + * Ensure all tests pass and all tools build successfully. 2. **Windows (Cross-Compilation)**: * If `mingw-w64` is installed on your system, you **must** also verify the Windows build. -- cgit v1.2.3