-
Notifications
You must be signed in to change notification settings - Fork 1
131 lines (123 loc) · 4.89 KB
/
ci.yml
File metadata and controls
131 lines (123 loc) · 4.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
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