Commit Graph

21 Commits

Author SHA1 Message Date
Kevin Zakka ffd95cf656 CI: drop system_headers from Python-binding ccache sloppiness
CMake adds the imported mujoco target's include dir as -isystem, so with
system_headers sloppiness ccache stopped hashing the public MuJoCo headers.
A header-only change (new mjData field, new enum value) then went undetected
and ccache reused objects compiled against the old struct layout, yielding an
ABI-mismatched binding: wrong field offsets (garbage in struct/pickle tests),
stale mjENABLESTRING/mjNENABLE, and mjSpec-vs-mjData signature mismatches.

Removing system_headers makes ccache hash these headers and recompile on
change. The mtime/ctime flags stay (they absorb pip's per-run temp-dir churn
without affecting content detection).
2026-06-16 23:45:18 -07:00
Kevin Zakka 1aaced190a Copybara import of the project:
--
3439d8a5cd745dfd2776593916eead65cb456afc by Kevin Zakka <kevinarmandzakka@gmail.com>:

Respect an explicit CMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF

The default-LTO guard checked the value rather than whether it was DEFINED, so an
explicit -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF (used in CI to cut build time)
was silently flipped back ON. Check DEFINED instead; default-on for Release is
preserved when the caller makes no choice.

--
bd15d1b264e5ab9594669b58fa1e0388d0a16f6b by Kevin Zakka <kevinarmandzakka@gmail.com>:

Speed up CI

~10x faster on the POSIX jobs (~45m -> ~4-5m) and ~2x overall wall-clock.

- Build Studio/Filament and WASM only in their dedicated canary jobs, not in
  every matrix job (WASM uses emcc, which ignores the host compiler).
- Compiler matrix -> build_matrix.json with core/extended tiers: PRs build the
  core set, pushes to main run the full sweep.
- ccache across build jobs (studio cache keyed on the Filament pin); fix the
  Python-bindings build so ccache hits (CCACHE_BASEDIR).
- Disable IPO/LTO on POSIX (it was silently on); keep it on Windows where /GL-off
  exposes a latent test bug and build time is not the bottleneck.
- Run ctest in parallel on POSIX (~2x); uv for Python installs (~29s -> ~8s).
- Move MJX (compiler-independent) to a single dedicated job.
- Restrict GITHUB_TOKEN to contents: read; bump actions off deprecated Node20.

--
c0618ab7aef524b238e0a30f2f23c50c4ce0c9b1 by Kevin Zakka <kevinarmandzakka@gmail.com>:

Build the gcc jobs with LTO off too

Restores LTO-off for gcc (recovering the build-time win). That surfaces known
gcc-12 -Wrestrict false positives in libstdc++ <char_traits> at -O3; two clean,
behavior-preserving rewrites in the XML writer avoid them. Confirmed gcc-12 and
gcc-14 build clean with LTO off (PR #3325).

--
2c38da0f48f77635e58e4b7931b86d60f3c253c7 by Kevin Zakka <kevinarmandzakka@gmail.com>:

Respect explicit IPO=OFF in the Simulate and Sample options too

Apply the same DEFINED check as cmake/MujocoOptions.cmake to the simulate/ and
sample/ subprojects (which carry identical copies of the guard) to keep the three
in sync, as the internal import requires. Since the guard now honors =OFF, stop
forcing IPO=OFF on the tiny samples/simulate CI builds so they keep their default
LTO and don't expose the gcc -Werror false positives that -O3-without-LTO triggers.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3315 from google-deepmind:speed-up-ci 2c38da0f48f77635e58e4b7931b86d60f3c253c7
PiperOrigin-RevId: 930008698
Change-Id: Ic41dc87881833c95f2ebfc0602de1ed438db3d4f
2026-06-10 12:27:14 -07:00
Saran Tunyasuvunakool e47809d50d Refactor MuJoCo Live to separate out HTML, CSS, and JS components.
PiperOrigin-RevId: 915340338
Change-Id: Ic62b9d640af9967a59a77fa59a3556b916d5a24c
2026-05-14 03:39:42 -07:00
Saran Tunyasuvunakool 1465d8b6ce Initial implementation of MuJoCo Live.
This is a combination of minor tweaks to the existing Studio WASM application, CMake cleanup to make it buildable, and integration with GitHub Actions for deployment.

The new features added are drag-and-drop, model specification through `?model=` URL parameter, HTTP and HTTPS resource provider, and a user-visible loading message while the model is loading.

PiperOrigin-RevId: 904594610
Change-Id: I3a73b1ca0fcd6fc9ba192469942b2dab010a9308
2026-04-23 12:56:12 -07:00
Matija Kecman c23b5e8420 Fix WASM build issues, improve test coverage and improve cmake files
* Ensure compiler.usethread=0 is set before compilation in single-threaded WASM builds
* Explicitly enable exceptions for the single-threaded WASM module
* Test the single-threaded module in addition to the multi-threaded module in internal and external CI
* Consolidate wasm/tests/CMakeLists.txt into wasm/CMakeLists.txt, fixing the single-threaded benchmark test build which was missing shared linker flags

PiperOrigin-RevId: 901149728
Change-Id: If4946e29e5116610782d218906cf3f5940c1cdd0
2026-04-17 01:29:40 -07:00
Sam Haves a744b366fb Include obj and stl decoder plugins as sources in CMake builds.
This removes the need to load these decoders via mj_loadAllPluginLibraries when using MuJoCo built with CMake. Other plugins are unchanged.

PiperOrigin-RevId: 897114719
Change-Id: Iee914cc5e05798186f384a67901f1cf86bc2f887
2026-04-09 07:58:28 -07:00
Michael Moss 51b2f52296 Workaround for TypeScript 'outFile' is deprecated errors.
PiperOrigin-RevId: 892241799
Change-Id: Ibe028d453f35f5e03bdf66418bc4b45c20e807d3
2026-03-31 03:55:06 -07:00
MatiasManevi b35a5bab5e Shorten mv instruction 2026-03-18 12:10:08 -03:00
MatiasManevi 8b7951c20c Add single threaded version 2026-03-18 11:18:41 -03:00
MatiasManevi a07763f13b Restore npm pack 2026-03-12 11:42:29 -03:00
MatiasManevi 8c3e70998d Fix npm publish command to work with OIDC 2026-03-12 11:39:59 -03:00
MatiasManevi bf51c3389a Configure publish npm manual dispatch 2026-03-11 15:17:02 -03:00
Sam Haves ed0d7ba29f Move STL handling to a mjpDecoder.
PiperOrigin-RevId: 880820344
Change-Id: Ib3a714dd9698335433e518ed6af17d7b8407a8fb
2026-03-09 06:15:04 -07:00
Haroon Qureshi 8ddb5ff97b Re-add ${CMAKE_ARGS} to script which was removed by mistake.
PiperOrigin-RevId: 878491532
Change-Id: Idc2a3b17617ca2b44f279c97d8d56917f6c1bf54
2026-03-04 07:56:49 -08:00
Haroon Qureshi 13d164063c Remove separate targets for classic and filament renderer.
The platform::Renderer now supports both implementations at
runtime.

PiperOrigin-RevId: 878427862
Change-Id: I2997c197c6eddbe177c77b435cc5848fd80f1839
2026-03-04 04:56:15 -08:00
Sam Haves 91d3565cd5 Move OBJ handling to a mjpDecoder.
PiperOrigin-RevId: 878041994
Change-Id: I6e7f6876e65fd2184ff5637d4268644cefcabecf
2026-03-03 11:22:02 -08:00
MatiasManevi 07fdf1f465 Cleanup wasm package script 2026-03-02 15:20:44 -03:00
MatiasManevi bad7e29d3b Cleanup readme and publish step 2026-02-24 17:16:21 -03:00
MatiasManevi c17eb431cb Move publish step to sh file 2026-02-24 17:04:12 -03:00
Matija Kecman 12e24d66f6 Add steps to build MuJoCo Studio to Github actions
PiperOrigin-RevId: 833325371
Change-Id: I8c7253f3dfabe3e7b6538b602af220310d5aea89
2025-11-17 07:11:07 -08:00
Matija Kecman b0e75b7103 Refactor Github actions so that all build steps are implemented as functions in a separate build_steps.sh file.
This reduces the amount to yaml we need to know/write and makes the steps reusable in a clearer way than yaml anchors. Also Made sure that bash commands are executed with -xe set to log the command before executing and to fail the script on the first failing command.

PiperOrigin-RevId: 831823786
Change-Id: I7410c13decb914ef079ac4dd19a49481c452f3ec
2025-11-13 05:56:53 -08:00