Skip to content

toi/ccd: bug 9 fix (Liang-Barsky segment-AABB tunnel detection) #60

toi/ccd: bug 9 fix (Liang-Barsky segment-AABB tunnel detection)

toi/ccd: bug 9 fix (Liang-Barsky segment-AABB tunnel detection) #60

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
# MSVC Debug is intentionally omitted: there's a pre-existing thread-pool
# race that segfaults ~20% of Debug runs near test_tilted_cyl_on_floor,
# which Release never hits. Tracked separately; restore this job as a
# Debug-matrix entry once that race is fixed.
windows-msvc:
name: Windows MSVC Release
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -A x64 -DNUDGE_BUILD_APP=OFF
- name: Build nudge_tests
run: cmake --build build --config Release --target nudge_tests
- name: Run tests
run: ./build/Release/nudge_tests.exe
- name: Determinism check
run: ./build/Release/nudge_tests.exe --determinism --threads 4
linux-gcc:
name: Linux GCC Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS="-msse4.2" -DNUDGE_BUILD_APP=OFF
- name: Build nudge_tests
run: cmake --build build --target nudge_tests
- name: Run tests
run: ./build/nudge_tests
- name: Determinism check
run: ./build/nudge_tests --determinism --threads 4
linux-clang-asan:
name: Linux Clang + ASan + UBSan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure
run: >
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_COMPILER=clang
-DCMAKE_C_FLAGS="-O1 -g -msse4.2 -fsanitize=address,undefined -fno-omit-frame-pointer"
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
-DNUDGE_BUILD_APP=OFF
- name: Build nudge_tests
run: cmake --build build --target nudge_tests
- name: Run tests
env:
ASAN_OPTIONS: halt_on_error=1:abort_on_error=1:detect_leaks=0
UBSAN_OPTIONS: halt_on_error=1:abort_on_error=1:print_stacktrace=1
run: ./build/nudge_tests
- name: Determinism check
env:
ASAN_OPTIONS: halt_on_error=1:abort_on_error=1:detect_leaks=0
UBSAN_OPTIONS: halt_on_error=1:abort_on_error=1:print_stacktrace=1
run: ./build/nudge_tests --determinism --threads 4
linux-clang-scalar:
name: Linux Clang scalar SIMD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure
run: >
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=clang
-DCMAKE_C_FLAGS="-DSIMD_FORCE_SCALAR"
-DNUDGE_BUILD_APP=OFF
- name: Build nudge_tests
run: cmake --build build --target nudge_tests
- name: Run tests
run: ./build/nudge_tests
- name: Determinism check
run: ./build/nudge_tests --determinism --threads 4
macos-neon:
name: macOS Apple Silicon (NEON)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DNUDGE_BUILD_APP=OFF
- name: Build nudge_tests
run: cmake --build build --target nudge_tests
# Determinism check pins the per-arch hash so future regressions in the
# NEON path fail loudly. The rest of the unit/integration suite has
# tight tolerances calibrated against the x86 hash and is tracked as
# a separate cross-arch tolerance-widening task; kept out of CI until
# we either converge hashes or widen tolerances.
- name: Determinism check
timeout-minutes: 2
run: ./build/nudge_tests --determinism --threads 4
- name: Quick perf smoke (bench-stack 10)
timeout-minutes: 2
run: ./build/nudge_tests --bench-stack 10
emscripten-wasm:
name: Emscripten WASM SIMD128
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.74
- name: Configure
# 8MB stack + allow memory growth: the default 64KB WASM stack blows
# up in recursive quickhull / GJK paths, and nudge allocates large
# dynamic arrays during stress tests. Matches MSVC's /STACK:8388608.
run: >
emcmake cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_FLAGS="-msimd128"
-DCMAKE_EXE_LINKER_FLAGS="-sSTACK_SIZE=8388608 -sALLOW_MEMORY_GROWTH=1 -sINITIAL_MEMORY=67108864"
-DNUDGE_BUILD_APP=OFF
- name: Build nudge_tests
run: cmake --build build --target nudge_tests
# WASM pthread requires a special build (-pthread + SharedArrayBuffer)
# we don't enable here, so --threads 4 would race through non-atomic
# atomics. Single-threaded is enough to assert cross-arch FP identity.
- name: Determinism check
timeout-minutes: 2
run: node ./build/nudge_tests.js --determinism --threads 1