Skip to content

ci: build and test pycvc on every PR - #694

Merged
transfix merged 2 commits into
masterfrom
ci/pycvc-linux
Oct 18, 2026
Merged

transfix merged 2 commits into
masterfrom
ci/pycvc-linux

Conversation

@transfix

@transfix transfix commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

No PR built or tested the Python bindings until now:

  • The libcvc recipe builds with CVC_BUILD_PYCVC=OFF, so the C++ SDK carries no Python, numpy or SWIG dependency.
  • ci.yml never turned pycvc on.
  • The pycvc-cp3XX recipes are built only by publish-cvcpkg.yml at release time, with no test step.

So the test_pycvc_*.py scripts that bindings/pycvc/CMakeLists.txt registers with ctest ran nowhere in CI. That includes P6's test_pycvc_physics.py, the "Python reads the same values as C++" gate, which has only run locally. A binding that stopped compiling, or a Python value that drifted from C++, would first show at release, or never.

The job

pycvc-linux / cp312:

  • Toolchain: everything comes from cvcpkg, as in the other jobs: the libcvc deps closure (Jolt included), plus python312, numpy-cp312 and swig, the pycvc-cp312 recipe's own build dependencies. The interpreter gets its own prefix, so its zlib and openssl copies can't shadow the deps bundle's.
  • Build: the core module only (CVC_BUILD_PYCVC=ON, CVC_BUILD_PYCVC_GL=OFF, no cvcGL), Release. It also builds physics_parity_test, the C++ reference that test_pycvc_physics.py must match bit for bit.
  • Tests: it runs every pycvc_* ctest, and fails if none is registered.

Test

  • First run on a CI runner: 26 of 27 pycvc tests passed, including pycvc_physics (Python against the C++ reference, bit for bit, on Linux).
  • The one failure: pycvc_lod's GIL check, "write_mesh_pyramid finished too fast (0.015s) to judge". _assert_releases_gil needs a call longer than 20 ms, and the store test had sized its container for a dev box. The second commit times one untimed write and scales the rung count to about 0.15 s (3–48 rungs). On this Windows box it picks 9 rungs, and every store call runs 0.15–0.8 s with the GIL released.
  • Locally on Windows: the pycvc scripts pass (test_pycvc_physics 62/62, test_pycvc_lod, and the world-geometry, nav-train, state, world-units, world-clock, app, numpy and integration scripts).

Until now no PR built the Python bindings. The libcvc recipe builds with
CVC_BUILD_PYCVC=OFF so the C++ SDK carries no Python, numpy or SWIG;
ci.yml never turned it on; and the pycvc-cp3XX recipes are built only by
publish-cvcpkg.yml at release time, with no test step. So the
test_pycvc_*.py scripts that bindings/pycvc registers with ctest ran
nowhere in CI. A binding that stopped compiling, or a Python value that
drifted from C++, would first show at release, or never.

pycvc-linux builds the core module (no cvcGL) on cp312, Release, with
everything from cvcpkg: the libcvc deps closure (Jolt included), and
python312, numpy-cp312 and swig, the pycvc-cp312 recipe's own build
deps. It also builds physics_parity_test, the C++ reference
test_pycvc_physics.py must match bit for bit, and runs every pycvc_*
ctest, failing if none is registered.
The new pycvc-linux job ran the pycvc tests on a CI runner for the
first time. 26 of 27 passed, pycvc_physics included. pycvc_lod failed:
"write_mesh_pyramid finished too fast (0.015s) to judge".

_assert_releases_gil needs a call of more than 20 ms to tell a released
GIL from a held one, and the store test sized its container (three
rungs, ~57 MB) for a dev box, where a write took over 50 ms. It now
times one untimed write of three rungs and scales the rung count to
about 0.15 s, between 3 and 48 rungs. On this Windows box that is 9
rungs: write 0.46 s, to_blob 0.17 s, open_verified 0.82 s,
read_mesh_pyramid 0.15 s, each with the GIL released.
@transfix
transfix merged commit 7ff400f into master Oct 18, 2026
17 checks passed
@transfix
transfix deleted the ci/pycvc-linux branch October 18, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant