From 29296ea34ea674522a3f4851611b2753a927aac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Vu=C4=8Dica?= Date: Mon, 9 Oct 2023 19:52:12 +0100 Subject: [PATCH] .bazelrc: Cache-only use of buildbuddy. Also adds a Bazelisk helper on Windows. --- .bazelrc | 13 +++++++++++++ .gitignore | 3 ++- bazel.bat | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 bazel.bat diff --git a/.bazelrc b/.bazelrc index a3ce23a2..570da89d 100644 --- a/.bazelrc +++ b/.bazelrc @@ -25,4 +25,17 @@ build:remote --remote_executor=grpcs://remote.buildbuddy.io build:remote --jobs=50 +# Use buildbuddy for cache only, by passing --config=remotecache. +# This should be fine for this open source project. +build:remotecache --bes_results_url=https://app.buildbuddy.io/invocation/ +build:remotecache --bes_backend=grpcs://remote.buildbuddy.io +build:remotecache --remote_cache=grpcs://remote.buildbuddy.io +build:remotecache --remote_timeout=3600 +build:remotecache --remote_executor=grpcs://remote.buildbuddy.io + +# readonly: +#build:remotecache --noremote_upload_local_results # Uploads logs & artifacts without writing to cache +# toplevel: +#build:remotecache --remote_download_toplevel # Helps remove network bottleneck if caching is enabled + try-import %workspace%/.bazelrc.buildbuddysecrets diff --git a/.gitignore b/.gitignore index df8d9952..1d73fe01 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,5 @@ yatc.ico.png # Ignore generated output. Although valuable (after all, the primary purpose of `bazel-compile-commands-extractor` is to produce `compile_commands.json`!), it should not be checked in. /compile_commands.json # Ignore the directory in which `clangd` stores its local index. -/.cache/ \ No newline at end of file +/.cache/ +bazelisk-windows-amd64.exe diff --git a/bazel.bat b/bazel.bat new file mode 100644 index 00000000..d30a1f98 --- /dev/null +++ b/bazel.bat @@ -0,0 +1,2 @@ +set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC +bazelisk-windows-amd64.exe %* \ No newline at end of file