Repository navigation
ci: build and test pycvc on every PR - #694
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No PR built or tested the Python bindings until now:
libcvcrecipe builds withCVC_BUILD_PYCVC=OFF, so the C++ SDK carries no Python, numpy or SWIG dependency.ci.ymlnever turned pycvc on.pycvc-cp3XXrecipes are built only bypublish-cvcpkg.ymlat release time, with no test step.So the
test_pycvc_*.pyscripts thatbindings/pycvc/CMakeLists.txtregisters with ctest ran nowhere in CI. That includes P6'stest_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:python312,numpy-cp312andswig, 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.CVC_BUILD_PYCVC=ON,CVC_BUILD_PYCVC_GL=OFF, no cvcGL), Release. It also buildsphysics_parity_test, the C++ reference thattest_pycvc_physics.pymust match bit for bit.pycvc_*ctest, and fails if none is registered.Test
pycvc_physics(Python against the C++ reference, bit for bit, on Linux).pycvc_lod's GIL check, "write_mesh_pyramid finished too fast (0.015s) to judge"._assert_releases_gilneeds 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.test_pycvc_physics62/62,test_pycvc_lod, and the world-geometry, nav-train, state, world-units, world-clock, app, numpy and integration scripts).