Commit Graph

86 Commits

Author SHA1 Message Date
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
Michael Moss aa494e45d4 Remove builds using GCC 10 and 11, which are EOL years ago.
PiperOrigin-RevId: 929355762
Change-Id: Ia9a28cccdad966ea24b1eb326fdde0116c4f57c2
2026-06-09 12:59:17 -07:00
Michael Moss 991c131d59 Remove workaround for obsolete GitHub Windows image (from 2024).
PiperOrigin-RevId: 929179278
Change-Id: Ia50305679f5736fce5e3a41a1cbe0379e4afa7de
2026-06-09 07:22:36 -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 f7e00d041e Add commit hash and remove "Upload File" button from MuJoCo Live.
PiperOrigin-RevId: 914909503
Change-Id: I084d888eb5093b4278e758697bff43ff941c79d0
2026-05-13 09:34:47 -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
Sam Haves db011b5100 Add condition to team notification of github actions that it's from 'main'
PiperOrigin-RevId: 893437916
Change-Id: I0c0b22747e4e4cac23ad0f44cf8b667863cc79ae
2026-04-02 04:42:39 -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
Copybara-Service cab4b73f41 Merge pull request #3184 from MatiasManevi:single-thread-npm
PiperOrigin-RevId: 886334046
Change-Id: If054286ac11f2b0e13e770922c049e334d136ab1
2026-03-19 13:05:52 -07:00
Michael Moss 779f6e8403 Save some CMake logs for debugging.
PiperOrigin-RevId: 886222847
Change-Id: Iaa641c334b3e90f594c6a19a29beefcf6eb7a3f4
2026-03-19 09:32:41 -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
Copybara-Service a62501f305 Merge pull request #3168 from MatiasManevi:npm-workflow-dispatch
PiperOrigin-RevId: 882559989
Change-Id: Ia02f38e632dcd3064433b44f6e14427aa3b36735
2026-03-12 06:43:37 -07:00
MatiasManevi bf51c3389a Configure publish npm manual dispatch 2026-03-11 15:17:02 -03:00
MatiasManevi eda9bbbbd4 Remove workflow dispatch 2026-03-11 14:29:12 -03:00
MatiasManevi f6434110bb Add the required OIDC permissions for trusted published 2026-03-11 13:36:09 -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 7dd76bcbd7 Merge branch 'main' into wasm-npm-package 2026-02-25 12:05:20 -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
MatiasManevi f989d40d89 Merge wasm readme for package 2026-02-23 18:11:20 -03:00
MatiasManevi a9edc5dd89 Add publish workflow and minimal npm package for WASM 2026-02-19 10:00:17 -03:00
Taylor Howell bb0b5ca521 lint 2026-02-18 12:43:31 +00:00
Yuval Tassa e48da1e38c Fix __muloti4 linker error on Clang 13
Add `-rtlib=compiler-rt` linker flags for the Clang 13 CI build.

Clang 13 generates calls to __muloti4 (a 128-bit overflow-checked multiplication intrinsic) for signed 64-bit multiplication with overflow detection. This symbol is provided by LLVM's compiler-rt but is missing from GNU's libgcc, which is the default runtime library on Ubuntu.

Related issues:

- https://github.com/llvm/llvm-project/issues/14841
- https://github.com/abseil/abseil-cpp/issues/841
- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244169

PiperOrigin-RevId: 860529686
Change-Id: If58dc0328aa1dd87aef8ea02da555f57ad96b02c
2026-01-24 08:15:56 -08: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
Matija Kecman 4722925ff4 Add a github actions job which quickly determines if the WASM build is broken by only testing on one platform
PiperOrigin-RevId: 831395855
Change-Id: I1128ae39b50e0d9d4338b8ea768b2850699aef22
2025-11-12 08:17:22 -08:00
Matias Manevi 4086261714 Add JavaScript bindings and WASM support
Co-authored-by: Matija Kecman <matijak@google.com>
Co-authored-by: Sebastian Noreña Rendón <sebas.norena@creativa77.com.ar>
Co-authored-by: Kyle Bayes <kylebayes@google.com>
PiperOrigin-RevId: 826479070
Change-Id: I25acf36e6c20b091d8492e10798d028ae66f6733
2025-10-31 07:21:18 -07:00
Matija Kecman f2badc05ac Add JavaScript bindings and WASM support
Co-authored-by: Matija Kecman <matijak@google.com>
Co-authored-by: Sebastian Noreña Rendón <sebas.norena@creativa77.com.ar>
Co-authored-by: Kyle Bayes <kylebayes@google.com>
PiperOrigin-RevId: 826109484
Change-Id: I327fd54122762bd2e239cc31c602a3eb73051c26
2025-10-30 11:11:52 -07:00
Matias Manevi 76e64d96bb Add JavaScript bindings and WASM support
Co-authored-by: Matija Kecman <matijak@google.com>
Co-authored-by: Sebastian Noreña Rendón <sebas.norena@creativa77.com.ar>
Co-authored-by: Kyle Bayes <kylebayes@google.com>
PiperOrigin-RevId: 826094938
Change-Id: Id2658a187bc078056f4410c71202696753319e64
2025-10-30 10:38:16 -07:00
Saran Tunyasuvunakool 0eea5d6dbd Add libwayland-dev and libxkbcommon-dev to GitHub Actions YAML.
PiperOrigin-RevId: 800462182
Change-Id: I771df8af3f827f0fe7f2d9975eb6fd04940f17dc
2025-08-28 07:40:38 -07:00
Baruch Tabanpour 7ea92c65ec Fix to github CI.
PiperOrigin-RevId: 789380763
Change-Id: I8e2679a70e8bf443e373f57a0a78ed68b70e60a6
2025-07-31 10:10:26 -07:00
Baruch Tabanpour 47bc16a37c Add mujoco_warp as an implementation in mjx.
PiperOrigin-RevId: 789366860
Change-Id: I84b49e744552092434df49d855f1052b04291b87
2025-07-31 09:33:35 -07:00
Saran Tunyasuvunakool 6a977d073b Fix GitHub Actions builds.
PiperOrigin-RevId: 757765160
Change-Id: Idaf86f80a24bc480ce35711cb706a4702a249d31
2025-05-12 08:00:43 -07:00
Sam Haves ab63a7e824 Add CMakeLists for usdMjcf file format plugin.
This adds an option MUJOCO_BUILD_USD_PLUGINS to the top level CMakeLists which allows us to build the usdMjcf file format plugin with the rest of mujoco.

In this first version, we allow building against either standalone USD or against Houdini (DCC) since it has it's own fork of USD. When building against standalone USD we also build the file format tests.

PiperOrigin-RevId: 753969974
Change-Id: If691eecbddf45d18b7c4ff76f7650999d42e99c5
2025-05-02 05:48:33 -07:00
Silvio Traversaro 376dc59ea0 GitHub Actions: Use macos-13 image instead of deprecated macos-12 2024-12-07 17:25:19 +01:00
Silvio 1201db8050 Do not test python bindings in python/dist directory
This will permit to early catch tests that rely on files not
installed in the wheel, i.e. catch if pytest --pyargs mujoco fails in a vanilla environment.
2024-10-25 13:24:21 +02:00
Yuval Tassa 8bbf9c7b4f Rename config.yaml -> config.yml.
PiperOrigin-RevId: 679225889
Change-Id: I2e3d26dbd763485c34880d287511f2810886422b
2024-09-26 11:26:12 -07:00
Copybara-Service 56bb3ca5de Merge pull request #1901 from abhihjoshi:usd-fixes
PiperOrigin-RevId: 671815757
Change-Id: I8a08385b63401c743253545d89389ab8aaac91bc
2024-09-06 10:31:09 -07:00
Yuval Tassa 651868ab05 Add GitHub Issue and Discussion templates.
PiperOrigin-RevId: 669365189
Change-Id: I6e14bdf68de0ddc0029937291d7258d26eb65b75
2024-08-30 10:13:38 -07:00
Alessio Quaglino 9febd760a1 Set working directory for python tests on GitHub.
PiperOrigin-RevId: 657961231
Change-Id: I859f823ae7fa7bf73b4adde77746eb3340ba8587
2024-07-31 04:54:19 -07:00
Yuval Tassa 44be878e7e Enable inter-procedural optimization by default in cmake
PiperOrigin-RevId: 647336693
Change-Id: I44acf48ed9825dd3e71b06f2aca581cdb17dce34
2024-06-27 09:05:49 -07:00