Files
gerrit/tools/bazel.rc
David Ostrovsky 2bf355df5a Bump minimum Bazel version to 0.14.0 and activate caches
During migration from Buck to Bazel we lost action caches activation per
default. For one, local action cache wasn't implemented in Bazel, for
another, there was no option to specify HOME directory. I fixed both
problems and starting with Bazel 0.14.0 both features are included in
released Bazel version: [1], [2].

There is still one not implemented option, limit the cache directory
with max size: [3]. But for now the advantage to activate the caches per
default far outweigh the disadvantage of unlimited growth of size of
cache directory beyound imaginary max size of say 10 GB. In meantime we
add a warning to watch the size of the directory cache and periodically
clean cache directory:

  $ rm -rf ~/.gerritcodereview/bazel-cache/cas/*

[1] https://bazel-review.googlesource.com/#/c/bazel/+/16810
[2] https://github.com/bazelbuild/bazel/pull/4852
[3] https://github.com/bazelbuild/bazel/issues/5139

Change-Id: I42e8f6fb9770a5976751ffef286c0fe80b75cf93
2018-06-04 13:29:30 +00:00

6 lines
273 B
Plaintext

build --workspace_status_command=./tools/workspace-status.sh --strategy=Closure=worker
build --disk_cache=~/.gerritcodereview/bazel-cache/cas
build --repository_cache=~/.gerritcodereview/bazel-cache/repository
build --experimental_strict_action_env
test --build_tests_only