This document has the following sections:
To build and test the code, you must have a working installation of Bazel. Bazel is an open-source build and test tool similar to Make, Maven, and Gradle. See the Bazel Installation Instructions for more information on installing Bazel on your system.
To build all targets in a subdirectory, run a command like the following:
bazel build //server/...
To build a specific target in a minimal way, specify an individual build target with a command like the following:
bazel build //server:server
To run all tests in a subdirectory, run a command like the following:
bazel test //server/...
To run a specific test, specify an individual test target:
bazel test //server:server_test
To format all C++ source files using clang-format
, run the following:
find . -name "*.h" -or -name "*.cpp" | xargs clang-format -i