Open bd-jahn opened 1 week ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
I see that some of my changes to the include paths broke the CMake build system. I'll fix this issue.
Summary
This PR introduces a Bazel build system that compiles the C library, Python bindings, and
mjx
library. While the original CMake build system supports multiple architectures and configurations, this Bazel build is currently configured only for Ubuntu 22.04 on x86_64.This setup is not yet fully comprehensive. Some functionalities are still lacking, such as a hermetic toolchain, support for multiple OS and architecture builds, and compatibility with various rendering backends. However, this PR aims to initiate a discussion on the best direction for further improvements.
Testing
Build and test using the default Clang compiler:
Run
bazel build //...
andbazel test //...
.Build and test using the GCC compiler:
Run
bazel build --config=linux_gcc_x86_64 //...
andbazel test --config=linux_gcc_x86_64 //...
.Security
This build process fetches third-party dependencies through Bazel's
http_archive
rule, ensuring each dependency includes its license file.