blob: 11aae33db0dac6b0eb7e104adcf01fb400d3e082 [file] [log] [blame]
Tim Windelschmidt6c851e22024-01-11 15:23:48 +01001# Set this flag to enable re-tries of failed tests on CI.
2# When any test target fails, try one or more times. This applies regardless of whether the "flaky"
3# tag appears on the target definition.
4# This is a tradeoff: legitimately failing tests will take longer to report,
5# but we can paper over flaky tests that pass most of the time.
6# The alternative is to mark every flaky test with the `flaky = True` attribute, but this requires
7# the buildcop to make frequent code edits.
8# Not recommended for local builds so that the flakiness is observed during development and thus
9# is more likely to get fixed.
10# Note that when passing after the first attempt, Bazel will give a special "FLAKY" status.
11# Docs: https://bazel.build/docs/user-manual#flaky-test-attempts
12test --flaky_test_attempts=2
13
14# Announce all announces command options read from the bazelrc file(s) when starting up at the
15# beginning of each Bazel invocation. This is very useful on CI to be able to inspect what Bazel rc
16# settings are being applied on each run.
17# Docs: https://bazel.build/docs/user-manual#announce-rc
18build --announce_rc
19
20# Add a timestamp to each message generated by Bazel specifying the time at which the message was
21# displayed.
22# Docs: https://bazel.build/docs/user-manual#show-timestamps
23build --show_timestamps
24
25# Only show progress every 60 seconds on CI.
26# We want to find a compromise between printing often enough to show that the build isn't stuck,
27# but not so often that we produce a long log file that requires a lot of scrolling.
28# https://bazel.build/reference/command-line-reference#flag--show_progress_rate_limit
29build --show_progress_rate_limit=60
30
31# Use cursor controls in screen output.
32# Docs: https://bazel.build/docs/user-manual#curses
33build --curses=yes
34
35# Use colors to highlight output on the screen. Set to `no` if your CI does not display colors.
36# Docs: https://bazel.build/docs/user-manual#color
37build --color=yes
38
39# The terminal width in columns. Configure this to override the default value based on what your CI system renders.
40# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/runtime/UiOptions.java#L151
41build --terminal_columns=143
42
43######################################
44# Generic remote cache configuration #
45######################################
46
47# Only download remote outputs of top level targets to the local machine.
48# Docs: https://bazel.build/reference/command-line-reference#flag--remote_download_toplevel
49build --remote_download_toplevel
50
51# The maximum amount of time to wait for remote execution and cache calls.
52# https://bazel.build/reference/command-line-reference#flag--remote_timeout
53build --remote_timeout=3600
54
55# Upload locally executed action results to the remote cache.
56# Docs: https://bazel.build/reference/command-line-reference#flag--remote_upload_local_results
57build --remote_upload_local_results
58
59# Fall back to standalone local execution strategy if remote execution fails. If the grpc remote
60# cache connection fails, it will fail the build, add this so it falls back to the local cache.
61# Docs: https://bazel.build/reference/command-line-reference#flag--remote_local_fallback
62build --remote_local_fallback
63
64# Fixes builds hanging on CI that get the TCP connection closed without sending RST packets.
65# Docs: https://bazel.build/reference/command-line-reference#flag--grpc_keepalive_time
66build --grpc_keepalive_time=30s