@@ -291,7 +291,66 @@ jobs:
291291 '
292292
293293 # ===========================================================
294- # Job 5: Dynamic Analysis — Valgrind memcheck (OpenSSF)
294+ # Job 5: CASTLE Benchmark Regression Tests
295+ # ===========================================================
296+ # Verifies Map2Check against 5 CASTLE micro-benchmarks
297+ # (CWE-415, 416, 476, 787) — memory safety regression suite.
298+ castle-regression :
299+ name : CASTLE Regression
300+ runs-on : ubuntu-22.04
301+ timeout-minutes : 20
302+ needs : [build-and-test]
303+
304+ steps :
305+ - name : Checkout
306+ uses : actions/checkout@v4
307+ with :
308+ submodules : recursive
309+
310+ - name : Free disk space
311+ run : |
312+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
313+ sudo docker image prune -a -f || true
314+
315+ - name : Pull map2check-dev image
316+ run : docker pull ghcr.io/hbgit/map2check-dev:latest
317+
318+ - name : Build + install Map2Check in container
319+ run : |
320+ docker run --rm \
321+ -u root \
322+ -v "${{ github.workspace }}:/workspace" \
323+ -w /workspace \
324+ -e CC=/usr/bin/clang-16 \
325+ -e CXX=/usr/bin/clang++-16 \
326+ ghcr.io/hbgit/map2check-dev:latest bash -c '
327+ rm -rf build_castle_ci install_castle_ci
328+ mkdir -p build_castle_ci && cd build_castle_ci
329+ cmake .. -G Ninja \
330+ -DLLVM_DIR=/usr/lib/llvm-16/lib/cmake/llvm \
331+ -DENABLE_TEST=ON \
332+ -DMAP2CHECK_DYNAMIC_LINK=ON \
333+ -DCMAKE_INSTALL_PREFIX=/workspace/install_castle_ci
334+ ninja
335+ ninja install
336+ mkdir -p /workspace/install_castle_ci/lib/klee
337+ ln -sf /opt/klee/lib/klee/runtime /workspace/install_castle_ci/lib/klee/runtime
338+ ln -sf /usr/lib/llvm-16/lib/clang /workspace/install_castle_ci/lib/clang
339+ '
340+
341+ - name : Run CASTLE regression tests
342+ run : |
343+ docker run --rm \
344+ -u root \
345+ -v "${{ github.workspace }}:/workspace" \
346+ -w /workspace \
347+ -e MAP2CHECK_PATH=/workspace/install_castle_ci \
348+ ghcr.io/hbgit/map2check-dev:latest bash -c '
349+ bash tests/integration/test_castle_regression.sh
350+ '
351+
352+ # ===========================================================
353+ # Job 6: Dynamic Analysis — Valgrind memcheck (OpenSSF)
295354 # ===========================================================
296355 # Build ISOLADO e SEM sanitizers: a shadow memory do ASan/UBSan
297356 # conflita com a VM do Valgrind. Debug + DWARF-4 para stacks
0 commit comments