Skip to content

junyang0412/inc_orchestrator

 
 

Repository files navigation

inc_orchestrator

Incubation repo for orchestration

Setup

System dependencies

sudo apt-get update
sudo apt-get install -y curl build-essential protobuf-compiler libclang-dev git python3-dev python-is-python3 python3-venv

Rust installation

Install Rust using rustup

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Bazel installation

Install Bazel using Bazelisk

curl --proto '=https' -sSfOL https://github.com/bazelbuild/bazelisk/releases/download/v1.26.0/bazelisk-amd64.deb
dpkg -i bazelisk-amd64.deb
rm bazelisk-amd64.deb

Correct Bazel version will be installed on first run, based on bazelversion file.

Build

List all targets:

bazel query //...

Build selected target:

bazel build <TARGET_NAME>

Build all targets:

bazel build //...

Run

List all binary targets, including examples:

bazel query 'kind(rust_binary, //src/...)'

Bazel is not able to distinguish between examples and regular executables.

Run selected target:

bazel run <TARGET_NAME>

Test

List all test targets:

bazel query 'kind(rust_test, //...)'

Run all tests:

bazel test //...

Run unit tests (tests from src/ directory):

bazel test //src/...

Run selected test target:

bazel test <TARGET_NAME>

Cargo-based operations

Please use Bazel whenever possible.

Build with Cargo

It's recommended to use cargo xtask. It has the advantage of using separate build directories for each task.

Build using xtask - debug and release:

cargo xtask build
cargo xtask build:release

Build using cargo directly:

cargo build

Run with Cargo

List all examples:

cargo xtask run --example

Using cargo xtask:

cargo xtask run --example <EXAMPLE_NAME>

Run unit tests with Cargo

Using cargo xtask:

cargo xtask build:test --lib

About

Incubation repo for orchestration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 90.5%
  • Python 6.5%
  • Starlark 1.9%
  • Other 1.1%