forked from cloudflare/workerd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci.bazelrc
More file actions
112 lines (93 loc) · 5.54 KB
/
Copy pathci.bazelrc
File metadata and controls
112 lines (93 loc) · 5.54 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# CI-only configuration. Some of these settings are inspired by bazel-lib https://github.com/bazel-contrib/bazel-lib/blob/v2.9.3/.aspect/bazelrc/ci.bazelrc
# Not all shared options in the GitHub CI are ported since we use a different remote cache setup for
# internal CI.
build:ci --keep_going
build:ci --verbose_failures
# Use a higher jobs level to effectively fetch from CPU and and use the remote cache at the same
# time, see https://github.com/bazelbuild/bazel/issues/6394. 32 is still a fairly small number here
# and should work for the small CI runners we use, if we switch to a bigger runner consider
# increasing this closer towards the suggested value of 200. Note the number of maximum build jobs
# is controlled by the --local_resources=cpu flag and still limited to the number of cores by
# default.
# TODO (build perf): Temporarily setting this to 16, that might help with CI freezing on macOS
# release jobs?
build:ci --jobs=16
# Do not check for changes in external repository files, should speed up bazel invocations after the first one
build:ci --noexperimental_check_external_repository_files
# Only build runfile trees when needed. Runfile trees are useful for directly invoking bazel-built
# binaries, but not needed otherwise. Building runfile trees is slow on systems with slow disk I/O,
# so avoid doing so where we can. https://github.com/bazelbuild/bazel/commit/03246077f948f2790a83520e7dccc2625650e6df
build:ci --nobuild_runfile_links
# Rate limit progress updates for smaller logs, default is 0.2 which leads to very frequent updates.
build:ci --show_progress_rate_limit=3
# Enable color output
build:ci --color=yes
# Indicate support for more terminal columns, 100 is the line length recommended by KJ style.
build:ci --terminal_columns=100
# Emit build profile so that slow builds can be investigated
build:ci --profile build.bazel-profile.gz
test:ci --profile test.bazel-profile.gz
test:ci --test_output=errors --test_summary=terse
build:ci --disk_cache=~/bazel-disk-cache
# test CI jobs don't need any top-level artifacts and just verify things
build:ci-test --remote_download_minimal
# Enable v8-codegen-opt for test so that python tests run in an acceptable time frame but not for
# release builds – this sets -O2 and release should keep -O3. For Windows, we can enable /O2
# unconditionally, release already uses that and just adds "/clang:-O3" on top of it.
build:ci-test --config=v8-codegen-opt
build:ci-windows --config=v8-codegen-opt-windows
# limit storage usage on ci
# Exclude large benchmarking binaries created in debug and asan configurations to avoid
# running out of disk space on the runner (nominally 14GB). We typically have two copies
# of generated artifacts: one under bazel output-base and one in the bazel disk cache.
# Also only generate limited debug info – these binaries are only used for testing and
# don't need to run within a debugger, so information needed for symbolication is
# sufficient. The host configuration compiles in opt mode/without debug info by default, so
# there's no need to set host_copt here.
# LLVM produces a bit more debug info on macOS by default to facilitate debugging with
# LLDB. This is not needed for this use case, so disable it using -fno-standalone-debug –
# this is already the default for Linux/Windows.
build:ci-limit-storage --build_tag_filters=-off-by-default,-workerd-benchmark
build:ci-limit-storage --copt="-g1"
build:ci-limit-storage --copt="-fno-standalone-debug"
# ci-platform dependent configuration
build:ci-linux-common --copt='-Werror'
build:ci-linux-common --copt='-Wno-error=#warnings'
build:ci-linux-common --copt='-Wno-error=deprecated-declarations'
# keep in sync with .github/workflows/test.yml
build:ci-linux-common --action_env=CC=/usr/lib/llvm-19/bin/clang
build:ci-linux-common --host_action_env=CC=/usr/lib/llvm-19/bin/clang
build:ci-linux --config=ci-linux-common --remote_download_regex=".*src/workerd/server/workerd.*"
build:ci-linux-arm --config=ci-linux-common
build:ci-linux-debug --config=ci-linux-common --config=ci-limit-storage
build:ci-linux-debug --config=debug --config=rust-debug
build:ci-linux-arm-debug --config=ci-linux-debug
build:ci-linux-asan --config=ci-linux-common --config=ci-limit-storage
# we're really struggling to fit asan build into worker disk size
# having asan without symbols is better than none
build:ci-linux-asan --config=asan --copt="-g0" --strip=always
build:ci-linux-arm-asan --config=ci-linux-asan
# Unlike the bazel Unix toolchain the macOS toolchain sets "-O0 -DDEBUG" for fastbuild by
# default. This is unhelpful for compile speeds and test performance, remove the DEBUG
# define.
build:ci-macOS --copt=-UDEBUG
build:ci-macOS-debug --config=debug
# Unfortunately on macOS, we need to be able to invoke sudo to configure the network for sidecar tests
test:ci-macOS --spawn_strategy=local
build:ci-windows --config=windows_no_dbg
build:ci-windows-debug --config=debug
# Some tests (like Python import tests) take a long time to run, especially when debug is enabled
# For that reason, we only run them in the default configuration for each platform to minimize
# effect on CI pipeline runtime.
test:ci-linux --test_size_filters=
test:ci-macOS --test_size_filters=
test:ci-windows --test_size_filters=
# Enable reporting whenever WPT tests are run
test:ci-test --config=wpt-test
common:wpt-test --test_env=GEN_TEST_REPORT=1
common:wpt-test --test_env=GEN_TEST_STATS=1
# Config to produce a full WPT report (also disables test caching)
common:wpt-report --config=wpt-test
common:wpt-report --cache_test_results=no
# Let tests know they're running in CI
test:ci-test --test_env=CI=true