blob: dd6457e55c55a0a1ced834c1193f706a28031a5d [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
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020018common --announce_rc
Tim Windelschmidt6c851e22024-01-11 15:23:48 +010019
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
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020023common --show_timestamps
Tim Windelschmidt6c851e22024-01-11 15:23:48 +010024
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
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020029common --show_progress_rate_limit=60
Tim Windelschmidt6c851e22024-01-11 15:23:48 +010030
31# Use cursor controls in screen output.
32# Docs: https://bazel.build/docs/user-manual#curses
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020033common --curses=yes
Tim Windelschmidt6c851e22024-01-11 15:23:48 +010034
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
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020037common --color=yes
Tim Windelschmidt6c851e22024-01-11 15:23:48 +010038
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
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020041common --terminal_columns=143
Tim Windelschmidt6c851e22024-01-11 15:23:48 +010042
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
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020049common --remote_download_toplevel
Tim Windelschmidt6c851e22024-01-11 15:23:48 +010050
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
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020053common --remote_timeout=3600
Tim Windelschmidt6c851e22024-01-11 15:23:48 +010054
55# Upload locally executed action results to the remote cache.
56# Docs: https://bazel.build/reference/command-line-reference#flag--remote_upload_local_results
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020057common --remote_upload_local_results
Tim Windelschmidt6c851e22024-01-11 15:23:48 +010058
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
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020062common --remote_local_fallback
Tim Windelschmidt6c851e22024-01-11 15:23:48 +010063
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
Tim Windelschmidt54a2cf92025-06-25 01:06:37 +020066common --grpc_keepalive_time=30s