Add a single-precision job to GitHub CI - #3448
Open
yuvaltassa wants to merge 2 commits into
Open
Conversation
The organization-level zizmor scanner gates workflow changes and requires hash-pinned action references (unpinned-uses, blanket policy). It also flags the one remaining inline template expansion in a run block (template-injection): the samples build step. Pin all third-party actions to the commit hashes of their current tags, and pass the samples build arguments through the environment under an explicit bash shell, matching every other build step. No version changes: each hash is the commit its existing tag points to.
The GitHub build matrix only tests double precision, so pull requests that break single-precision (mjUSESINGLE) builds or tests look green on GitHub and only fail on internal import. Add a dedicated `single` job: one fast configuration (ubuntu / clang-18) that builds the library and test suite with -DmjUSESINGLE and runs the C/C++ tests.
yuvaltassa
force-pushed
the
ci-single-precision
branch
from
August 2, 2026 08:50
8c49035 to
137403c
Compare
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.
The GitHub Actions matrix builds only double precision, so changes that break
mjUSESINGLEbuilds or tests pass CI, and the breakage is only discovered downstream.This adds a dedicated
singlejob (ubuntu-24.04, clang-18) that builds the library and test suite with-DmjUSESINGLEand runs ctest. One fast configuration is enough to catch the common breakages (mjtNum-vs-doubletype confusion, tests without single-precision tolerances); the job runs in parallel with the rest of the workflow, so total wall-clock time is unchanged.The first commit is mechanical, required by the org-level zizmor gate that scans any PR touching workflow files: it pins all third-party actions in build.yml to the commit hashes of their current tags (no version changes), and routes the one remaining inline
${{ matrix.* }}expansion in a run block (the samples build step) through the environment, matching every other build step.Notes:
mjUSESINGLEdefine is passed viaCMAKE_C_FLAGS/CMAKE_CXX_FLAGSso thatMujocoDependencies.cmakealso builds libccd in single precision.mjUSESINGLEguards; 8m46s with a cold cache.