Contributor: Anshul Patil Project: Testing, Benchmarking, and CI Infrastructure for Manifold Mentors: @elalish, @pca006132 Repository: elalish/manifold
Manifold is a geometry library for topologically robust mesh Boolean operations, used by Blender, Godot Engine, OpenSCAD, BRL-CAD, and around thirty other projects. It ships roughly 2.1M monthly downloads on PyPI and 217K on npm.
The goal of this project was to strengthen the testing and performance infrastructure around that library: catching cross-platform nondeterminism, surfacing performance regressions before they merge, tracking long-term performance trends, and expanding sanitizer coverage.
Manifold must produce byte-identical output on Linux, macOS, and Windows. Divergence between platforms had previously gone unnoticed.
Added a CI stage that exports meshes from each platform and compares them, plus fixes for the sources of divergence found once the check was in place.
Added dedicated CI lanes running the test suite under AddressSanitizer and UndefinedBehaviorSanitizer with Clang, giving memory and UB errors a place to surface that the normal build did not cover.
Every pull request now builds both its base and head commits, runs perfTest against each, and reports timing and peak memory deltas as a non-blocking comment. Regressions are visible at review time rather than discovered later.
A scheduled workflow runs three benchmark suites (Ember Boolean phase timings, a perfTest size sweep, and selected regression tests), stores structured results in a dedicated benchmark-data branch, and renders them as a public dashboard.
Live at manifoldcad.org/dashboard. Historical results are in the benchmark-data branch, organized by date and run ID.
A curated OpenSCAD-derived benchmark set, split into a fast PR subset and a broader weekly suite with documented case categories.
This was scoped to build on #1725, an OpenSCAD-to-TypeScript compiler being developed in parallel, which would supply the benchmark cases. That PR is still in progress and its output is not yet reliable enough to derive stable benchmark measurements from. Building cases on it now would produce a suite that has to be rewritten once the compiler stabilizes.
After discussion with the mentors, this was deliberately deferred rather than rushed. The benchmark harness from #1758 is already structured to accept additional suites, so adding an OpenSCAD suite is a matter of contributing cases rather than new infrastructure.
Everything listed above is merged and running in production CI. The determinism check, sanitizer lanes, and performance guard run on every pull request; the benchmark suite runs on schedule and publishes to the live dashboard.
Work merged upstream during the program but outside the scope of the original proposal.
Cylinder(h, 0, r) cone with apex at bottomRefineToToleranceimportModel exampleThanks to @elalish and @pca006132 for review and direction throughout, and to the Manifold community for feedback on the benchmark dashboard.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |