Currently, Ubuntu 22.04LTS is the only supported development environment. There are build container instructions available for other OS distributions.
Install dependencies via setup.sh
. This will run apt
to install system-level
dependencies, and install bazelisk
, a Bazel wrapper that simplifies version
selection.
Make sure to add ${GOPATH}/bin
to your path, e.g.:
$ export PATH="$PATH:$(go env GOPATH)/bin"
To build and run all tests:
$ bazelisk test //...
To run integration test cases:
$ ./run_integration_tests.sh
To format the code before submitting changes:
$ bazelisk run //quality:buildifier_fix
$ bazelisk run //quality:clang_format_fix
$ bazelisk run //quality:gofmt_fix
$ bazelisk run //quality:protolint_fix
To run only the lint checks locally that are also run in CI:
$ bazelisk test //quality/...
Note: these are also run automatically when running all tests above.
The release process assumes you have your git and
GitHub CLI credentials in $HOME/.git
and
$HOME/.config/gh
repsectively.
-
Commit your changes.
-
Create a tag locally before running the build command.
OT_GIT_TAG=v0.0.1pre1 git tag ${OT_GIT_TAG}
-
Run the release command.
util/get_workspace_status.sh
captures the git tag in the binaries when using the--stamp
build flag.$ bazelisk run --stamp //release -- ${OT_GIT_TAG} -p