To compile the raw_transfer binaries, you will need Bazel 7.7.0.
Option 1: Install Bazel 7.7.0 directly (Linux amd64)
sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.7.0/bazel-7.7.0-linux-x86_64
sudo chmod +x /usr/local/bin/bazelOption 2: Install via Bazelisk (npm)
Bazelisk is a wrapper that will automatically read the .bazelversion file in the project and download the correct version (7.7.0).
npm install -g @bazel/bazeliskVerify the installation:
bazel --versionWe provide a script to handle the build process and install the required Python dependencies. Run the following command from the repository root:
./build_raw_transfer.shWhat this script does:
- Navigates to the workspace directory.
- Compiles the
//raw_transfer:raw_transfer_binariestarget using Bazel (it uses--disk_cacheto speed up subsequent builds). - Installs the necessary Python dependencies listed in
requirements.txt. - Artifacts will be available in the
bazel-bin/raw_transfer/directory.
Once the build is complete, you can run the tests to verify the installation and check performance:
./test_raw_transfer.shWhat this script does:
- Sets up the
PYTHONPATHso Python can locate the compiledbazel-binartifacts. - Executes
test_import.pyto ensure the C++ extensions load correctly, saving the output toimport.log. - Executes
test_raw_transfer_perf.pyto benchmark performance, saving the output toperf_test.log.