Skip to content

Commit

Permalink
bazel: disable local repository and disk cache
Browse files Browse the repository at this point in the history
  • Loading branch information
malt3 committed Nov 6, 2023
1 parent 2f6093b commit ceaf435
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import %workspace%/bazel/bazelrc/debug.bazelrc
import %workspace%/bazel/bazelrc/performance.bazelrc
import %workspace%/bazel/bazelrc/cc.bazelrc

# share bazel cache between checkouts of the same project
# and keep old build caches around for longer
common --disk_cache=~/.cache/shared_bazel_action_cache
common --repository_cache=~/.cache/shared_bazel_repository_cache

# inject version information into binaries
common --stamp --workspace_status_command=tools/workspace_status.sh

Expand Down
9 changes: 0 additions & 9 deletions bazel/bazelrc/performance.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ build --experimental_reuse_sandbox_directories
# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles
build --nolegacy_external_runfiles

# Some actions are always IO-intensive but require little compute. It's wasteful to put the output
# in the remote cache, it just saturates the network and fills the cache storage causing earlier
# evictions. It's also not worth sending them for remote execution.
# For actions like PackageTar it's usually faster to just re-run the work locally every time.
# You'll have to look at an execution log to figure out what other action mnemonics you care about.
# In some cases you may need to patch rulesets to add a mnemonic to actions that don't have one.
# https://bazel.build/reference/command-line-reference#flag--modify_execution_info
build --modify_execution_info=PackageTar=+no-remote,OCIImage=+no-remote

# build only what is needed for tests
test --build_tests_only

Expand Down

0 comments on commit ceaf435

Please sign in to comment.