| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 1 | # 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 |
| 12 | test --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 Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 18 | common --announce_rc |
| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 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 |
| Tim Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 23 | common --show_timestamps |
| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 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 |
| Tim Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 29 | common --show_progress_rate_limit=60 |
| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 30 | |
| 31 | # Use cursor controls in screen output. |
| 32 | # Docs: https://bazel.build/docs/user-manual#curses |
| Tim Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 33 | common --curses=yes |
| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 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 |
| Tim Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 37 | common --color=yes |
| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 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 |
| Tim Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 41 | common --terminal_columns=143 |
| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 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 |
| Tim Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 49 | common --remote_download_toplevel |
| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 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 |
| Tim Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 53 | common --remote_timeout=3600 |
| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 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 |
| Tim Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 57 | common --remote_upload_local_results |
| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 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 |
| Tim Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 62 | common --remote_local_fallback |
| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 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 |
| Tim Windelschmidt | 54a2cf9 | 2025-06-25 01:06:37 +0200 | [diff] [blame^] | 66 | common --grpc_keepalive_time=30s |