-
Notifications
You must be signed in to change notification settings - Fork 3
/
.bazelrc
74 lines (55 loc) · 2.9 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Enable Bzlmod for every Bazel command
common --enable_bzlmod
## BUILD
build --macos_minimum_os=13
build --host_macos_minimum_os=13
# https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env
build --incompatible_strict_action_env
# Disable the worker, which has sandboxing disabled by default, which can hide
# issues with non-hermetic bugs.
build --spawn_strategy=sandboxed,local
build --worker_sandboxing=true
build --incompatible_disallow_empty_glob
build --features=swift.use_global_module_cache
# Enable indexing while building.
build --features swift.use_global_index_store
build --features swift.index_while_building
# Since there's no way to set the deployment version for swift_{binary,test},
# this forces all targets' minimum macOS to Github Actions macOS version.
build --macos_minimum_os=12.6
## TEST
# `bazel test` tries to build everything also by default, so skip that so the
# *_library targets in examples/... aren't built (and fail since they are
# platform specific).
test --build_tests_only
# Show detailed errors for test failures
test --test_output=errors
# Use llvm-cov instead of gcov (default).
coverage --experimental_use_llvm_covmap
## REMOTE CACHE
# Do actions locally when it makes sense.
build --modify_execution_info=^(BitcodeSymbolsCopy|BundleApp|BundleTreeApp|DsymDwarf|DsymLipo|GenerateAppleSymbolsFile|ObjcBinarySymbolStrip|CppLink|ObjcLink|ProcessAndSign|SignBinary|SwiftArchive|SwiftStdlibCopy)$=+no-remote,^(BundleResources|ImportedDynamicFrameworkProcessor)$=+no-remote-exec
build:remote_cache --bes_results_url=https://app.buildbuddy.io/invocation/
build:remote_cache --bes_backend=grpcs://remote.buildbuddy.io
build:remote_cache --remote_cache=grpcs://remote.buildbuddy.io
# https://bazel.build/reference/command-line-reference#flag--remote_download_toplevel
build:remote_cache --remote_download_toplevel
# https://bazel.build/reference/command-line-reference#flag--remote_timeout
build:remote_cache --remote_timeout=3600
# https://bazel.build/reference/command-line-reference#flag--experimental_remote_cache_compression
build:remote_cache --experimental_remote_cache_compression
# https://bazel.build/reference/command-line-reference#flag--experimental_remote_cache_compression_threshold
build:remote_cache --experimental_remote_cache_compression_threshold=100
# https://bazel.build/reference/command-line-reference#flag--legacy_important_outputs
build:remote_cache --nolegacy_important_outputs
# Only wait for BES upload in CI builds but not dev builds.
#
# https://bazel.build/reference/command-line-reference#flag--bes_upload_mode
build:remote_cache --bes_upload_mode=nowait_for_upload_complete
build:ci --bes_upload_mode=wait_for_upload_complete
# By default don't upload local results to remote cache, only CI does this.
build --noremote_upload_local_results
build:ci --remote_upload_local_results
## LOCAL CONFIG
# Load a user.bazelrc
try-import %workspace%/user.bazelrc