Bazel: Update local cache activation instructions
Since [1] two action cache option were merged, and the experimental prefix was removed. Also update the section about repository cache. This cache is now activated per default and we can only change the location of that cache. [1] https://github.com/bazelbuild/bazel/pull/4874 Change-Id: Iec4557a28987665182e9fe3f476d035421b751fe
This commit is contained in:

committed by
David Ostrovsky

parent
60c5618a7a
commit
47b79bd20f
@@ -365,38 +365,25 @@ JGit repository.
|
||||
|
||||
[[local-action-cache]]
|
||||
|
||||
To accelerate builds, local action cache can be activated. Note, that this
|
||||
experimental feature is not activated per default and only available since
|
||||
Bazel version 0.7.
|
||||
|
||||
To activate the local action cache, create accessible cache directory:
|
||||
To accelerate builds, local action cache can be activated.
|
||||
To activate the local action cache add these lines to your `~/.bazelrc` file:
|
||||
|
||||
----
|
||||
mkdir -p ~/.gerritcodereview/bazel-cache/cas
|
||||
----
|
||||
|
||||
and add these lines to your `~/.bazelrc` file:
|
||||
|
||||
----
|
||||
build --experimental_local_disk_cache_path=/home/<user>/.gerritcodereview/bazel-cache/cas
|
||||
build --experimental_local_disk_cache
|
||||
build --disk_cache=~/.gerritcodereview/bazel-cache/cas
|
||||
build --experimental_strict_action_env
|
||||
build --action_env=PATH
|
||||
----
|
||||
|
||||
[NOTE] `experimental_local_disk_cache_path` must be absolute path. Expansion of `~` is
|
||||
unfortunately not supported yet. This is also the reason why we can't activate this
|
||||
feature by default yet (by adjusting tools/bazel.rc file).
|
||||
|
||||
[[repository_cache]]
|
||||
|
||||
To accelerate fetches, local repository cache can be activated. This cache is
|
||||
only used for rules_closure external repository and transitive dependendcies.
|
||||
That's because rules_closure uses standard Bazel download facility. For all
|
||||
other gerrit dependencies, the download_artifacts repository cache is used
|
||||
To accelerate fetches, local repository cache is activated per default in Bazel.
|
||||
This cache is only used for rules_closure external repository and transitive
|
||||
dependendcies. That's because rules_closure uses standard Bazel download facility.
|
||||
For all other gerrit dependencies, the download_artifacts repository cache is used
|
||||
already.
|
||||
|
||||
To activate the local repository cache, create accessible cache directory:
|
||||
To change the default local repository cache directry, create accessible cache
|
||||
directory:
|
||||
|
||||
----
|
||||
mkdir -p ~/.gerritcodereview/bazel-cache/repository
|
||||
@@ -405,12 +392,9 @@ To activate the local repository cache, create accessible cache directory:
|
||||
and add this line to your `~/.bazelrc` file:
|
||||
|
||||
----
|
||||
build --experimental_repository_cache=/home/<user>/.gerritcodereview/bazel-cache/repository
|
||||
build --repository_cache=/home/<user>/.gerritcodereview/bazel-cache/repository
|
||||
----
|
||||
|
||||
[NOTE] `experimental_repository_cache` must be absolute path. Expansion of `~` is
|
||||
unfortunately not supported yet. This is also the reason why we can't activate this
|
||||
feature by default yet (by adjusting tools/bazel.rc file).
|
||||
GERRIT
|
||||
------
|
||||
Part of link:index.html[Gerrit Code Review]
|
||||
|
Reference in New Issue
Block a user