Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
923f148
build: sync the family files, build as C23 through presets, shared CI
siracozmen01 Oct 23, 2026
711af3c
build: format with the family rules, gate checks until their pull req…
siracozmen01 Oct 23, 2026
67967e0
build: release through release-please only from the migration's last …
siracozmen01 Oct 23, 2026
4700b26
ci: pin the shared workflows at v0.0.8; fix the bindings compiler, th…
siracozmen01 Oct 23, 2026
35279e8
refactor(family): break the include cycles into a one-way module graph
siracozmen01 Oct 23, 2026
49e0f14
refactor: assert the tree and voxel invariants
siracozmen01 Oct 23, 2026
f2ea214
test: prune the suites to golden scenes and public behavior
siracozmen01 Oct 23, 2026
f6c1d01
test: check the committed world hashes in every cell and keep the ben…
siracozmen01 Oct 23, 2026
6d3df2d
Merge branch 'standard' into module-graph
siracozmen01 Oct 23, 2026
05b9fb6
Merge branch 'module-graph' into invariant-asserts
siracozmen01 Oct 23, 2026
00bd3ba
Merge branch 'invariant-asserts' into prune-tests
siracozmen01 Oct 23, 2026
a9e1a86
test: assert that the tour reaches every journal op and that no tour …
siracozmen01 Oct 23, 2026
38c0c78
ci: give the tsan cell the asan cell's limits until the tests are pruned
siracozmen01 Oct 23, 2026
f758e64
Merge branch 'standard' into module-graph
siracozmen01 Oct 23, 2026
beba35b
Merge branch 'module-graph' into invariant-asserts
siracozmen01 Oct 23, 2026
460d5dd
Merge branch 'invariant-asserts' into prune-tests
siracozmen01 Oct 23, 2026
804c504
test: build the grand mesh terrain from the engine's cosine and sine
siracozmen01 Oct 23, 2026
3c359b5
docs: say why the scenes never call the host's math library
siracozmen01 Oct 23, 2026
32d4d6a
Merge remote-tracking branch 'origin/main' into prune-tests
siracozmen01 Oct 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 38 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Continuous integration: the pull request check, and the full check on
# main and every night. Each build cell is a CMake preset built by the
# organization's shared workflow. Twelve suites compare their world hash
# with test/hashes.txt in every cell, and the bench-pins job compares the
# benchmark scenes with bench/pins.txt, so the cells agree bit for bit and
# no result moves unnoticed. The other jobs run in the same CI image.
# organization's shared workflow, and every cell checks the golden scenes
# against test/hashes.txt, so the cells agree bit for bit and no result
# moves unnoticed. The bench job does the same for the benchmark scenes on
# main and every night. The other jobs run in the same CI image.
name: ci

on:
Expand Down Expand Up @@ -92,11 +92,10 @@ jobs:
--checks=-readability-function-cognitive-complexity "$f"
done

# Every cell builds with warnings as errors and runs the whole suite and
# the header tests; twelve suites check their world hash against
# test/hashes.txt. linux-gcc-14 also runs on arm64, where the NEON kernels
# must give the same bits as AVX2 and the scalar backend of the sanitizer
# cell.
# Every cell builds with warnings as errors and runs the whole suite, the
# header tests and the golden scenes included. linux-gcc-14 also runs on
# arm64, where the NEON kernels must give the same bits as AVX2 and the
# scalar backend of the sanitizer cell.
build:
needs: changes
if: needs.changes.outputs.code == 'true'
Expand All @@ -107,11 +106,8 @@ jobs:
- { preset: linux-gcc-14 }
- { preset: linux-gcc-14, runner: ubuntu-24.04-arm }
- { preset: linux-clang-20 }
# One run and longer limits until the tests pull request prunes
# the long scale and soak suites: under TSan, scale alone ran
# past its 900-second test limit on three runs.
- { preset: linux-clang-20-asan, timeout: 45 }
- { preset: linux-clang-20-tsan, timeout: 45 }
- { preset: linux-clang-20-asan, repeat: 3 }
- { preset: linux-clang-20-tsan }
- { preset: linux-shared }
- { preset: macos-clang, runner: macos-15 }
- { preset: windows-clang-cl, runner: windows-2025 }
Expand All @@ -125,6 +121,31 @@ jobs:
repeat: ${{ matrix.repeat || 1 }}
timeout: ${{ matrix.timeout || 20 }}

# The benchmark scenes, pinned like the golden scenes: five and ten
# thousand bodies, destruction at scale and a 5k-body rollback, in Release
# on every native platform. Each cell adds a Release build and about
# twenty seconds of scenes, so they run on main and every night, never in
# the pull request check.
bench:
if: github.event_name != 'pull_request'
strategy:
fail-fast: false
matrix:
include:
- { preset: linux-gcc-14-bench }
- { preset: linux-gcc-14-bench, runner: ubuntu-24.04-arm }
- { preset: linux-clang-20-bench }
- { preset: macos-clang-bench, runner: macos-15 }
- { preset: windows-clang-cl-bench, runner: windows-2025 }
- { preset: windows-arm64-clang-cl-bench, runner: windows-11-arm }
uses: Rawframe-Project/.github/.github/workflows/cpp.yml@ffd926f489c08984a43e40ac93e1f1feb784be93 # v0.0.8
permissions:
contents: read
with:
preset: ${{ matrix.preset }}
runner: ${{ matrix.runner || 'ubuntu-24.04' }}
timeout: 60

# The public headers alone under MSVC's cl, as C17 and C++17 with /W4 /WX:
# consumers may compile them with it, though it cannot build the library.
msvc-headers:
Expand All @@ -144,8 +165,8 @@ jobs:
cmake --build out/headers --config Release

# The library and its tests under Emscripten with threads, run by Node: the
# committed world hashes hold there too. The CI image has no Emscripten, so this job
# uses the runner and the emsdk action.
# golden scenes hold there too. The CI image has no Emscripten, so this
# job uses the runner and the emsdk action.
web:
needs: changes
if: needs.changes.outputs.code == 'true'
Expand Down Expand Up @@ -181,38 +202,6 @@ jobs:
if-no-files-found: ignore
retention-days: 7

# The benchmark scenes, too large for the suites, end on world hashes
# pinned in bench/pins.txt. One Release cell runs them; the suites' hashes
# already hold the platforms together.
bench-pins:
needs: changes
if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 15
container: ghcr.io/rawframe-project/ci-cpp:2026.10.4@sha256:9715ff153db04ba0ed4f520b6d2528ff7860f803de61ab011ba60a4eed572836
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Build
run: |
cmake --preset linux-gcc-14 -D${PREFIX}_BUILD_TESTS=OFF
cmake --build --preset linux-gcc-14 --target maul3d_bench
- name: Compare with bench/pins.txt
run: |
./out/linux-gcc-14/maul3d_bench | tee bench.out
[ -s bench/pins.txt ] || { echo "::error::bench/pins.txt is empty"; exit 1; }
fail=0
while read -r scene pin; do
if ! grep -q "M3_BENCH $scene .*hash=$pin" bench.out; then
echo "::error::the $scene pin moved: expected $pin"
fail=1
fi
done < bench/pins.txt
exit $fail

# The interactive testbed builds against raylib, which it fetches; only on
# main and at night, since the library cells already compile every source
# it calls.
Expand All @@ -238,7 +227,7 @@ jobs:
# renaming a job never touches the ruleset.
required:
if: always()
needs: [changes, docs, zizmor, checks, build, msvc-headers, web, bench-pins, testbed]
needs: [changes, docs, zizmor, checks, build, bench, msvc-headers, web, testbed]
runs-on: ubuntu-24.04
timeout-minutes: 2
permissions: {}
Expand Down
141 changes: 136 additions & 5 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,31 @@
"MAUL3D_BUILD_BENCH": "OFF",
"MAUL3D_BUILD_TOOLS": "OFF"
}
},
{
"name": "linux-gcc-14-bench",
"displayName": "The bench scenes on linux-gcc-14",
"inherits": "linux-gcc-14"
},
{
"name": "linux-clang-20-bench",
"displayName": "The bench scenes on linux-clang-20",
"inherits": "linux-clang-20"
},
{
"name": "macos-clang-bench",
"displayName": "The bench scenes on macos-clang",
"inherits": "macos-clang"
},
{
"name": "windows-clang-cl-bench",
"displayName": "The bench scenes on windows-clang-cl",
"inherits": "windows-clang-cl"
},
{
"name": "windows-arm64-clang-cl-bench",
"displayName": "The bench scenes on windows-arm64-clang-cl",
"inherits": "windows-arm64-clang-cl"
}
],
"buildPresets": [
Expand Down Expand Up @@ -200,6 +225,28 @@
{
"name": "wasm-node",
"configurePreset": "wasm-node"
},
{
"name": "linux-gcc-14-bench",
"configurePreset": "linux-gcc-14-bench"
},
{
"name": "linux-clang-20-bench",
"configurePreset": "linux-clang-20-bench"
},
{
"name": "macos-clang-bench",
"configurePreset": "macos-clang-bench"
},
{
"name": "windows-clang-cl-bench",
"configurePreset": "windows-clang-cl-bench",
"configuration": "Release"
},
{
"name": "windows-arm64-clang-cl-bench",
"configurePreset": "windows-arm64-clang-cl-bench",
"configuration": "Release"
}
],
"testPresets": [
Expand All @@ -211,8 +258,13 @@
},
"execution": {
"noTestsAction": "error",
"timeout": 900,
"timeout": 300,
"jobs": 4
},
"filter": {
"exclude": {
"label": "^bench$"
}
}
},
{
Expand All @@ -233,10 +285,7 @@
{
"name": "linux-clang-20-tsan",
"inherits": "base",
"configurePreset": "linux-clang-20-tsan",
"execution": {
"timeout": 1800
}
"configurePreset": "linux-clang-20-tsan"
},
{
"name": "linux-shared",
Expand Down Expand Up @@ -264,6 +313,88 @@
"name": "wasm-node",
"inherits": "base",
"configurePreset": "wasm-node"
},
{
"name": "linux-gcc-14-bench",
"configurePreset": "linux-gcc-14-bench",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"timeout": 1800
},
"filter": {
"include": {
"label": "^bench$"
}
}
},
{
"name": "linux-clang-20-bench",
"configurePreset": "linux-clang-20-bench",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"timeout": 1800
},
"filter": {
"include": {
"label": "^bench$"
}
}
},
{
"name": "macos-clang-bench",
"configurePreset": "macos-clang-bench",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"timeout": 1800
},
"filter": {
"include": {
"label": "^bench$"
}
}
},
{
"name": "windows-clang-cl-bench",
"configurePreset": "windows-clang-cl-bench",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"timeout": 1800
},
"filter": {
"include": {
"label": "^bench$"
}
},
"configuration": "Release"
},
{
"name": "windows-arm64-clang-cl-bench",
"configurePreset": "windows-arm64-clang-cl-bench",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"timeout": 1800
},
"filter": {
"include": {
"label": "^bench$"
}
},
"configuration": "Release"
}
]
}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ field.

The scenes in `bench/` (a pyramid, hull and mesh fields, a voxel fort,
a 5000-body city block with destruction and a 10,000-body smoke test)
print their timings and their final world hashes. The hashes are
pinned in `bench/pins.txt`, and CI fails when one moves.
print their timings. Their final world hashes are pinned in
`test/hashes.txt` and checked by the Release-only `bench` test, which
the nightly CI run executes on every platform.

## Status

Expand Down
2 changes: 2 additions & 0 deletions bench/Local.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The benchmark scenes, shared with test/test_bench.c.
target_sources(${PROJECT_NAME}_bench PRIVATE scenes.c)
Loading
Loading