# 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. This is still a relatively small number # and should work for the CI runners we use, if we switch to bigger runners 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. build:ci --jobs=64 # 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 # 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-disable-benchmarks --build_tag_filters=-off-by-default,-requires-container-engine,-workerd-benchmark test:ci-disable-benchmarks --test_tag_filters=-off-by-default,-requires-fuzzilli,-requires-container-engine,-workerd-benchmark build:ci-limit-storage --config=ci-disable-benchmarks 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 --repo_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 # Build container tests on Linux CI build:ci-linux --build_tag_filters=-off-by-default build:ci-linux-arm --build_tag_filters=-off-by-default build:ci-macOS --config=ci-disable-benchmarks 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 # Windows CI always runs in the release configuration to prevent breaking the release build. # build:ci-windows --config=windows_no_dbg build:ci-windows --config=release_windows 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= # Run container tests on Linux CI test:ci-linux --test_tag_filters=-off-by-default,-requires-fuzzilli test:ci-linux-arm --test_tag_filters=-off-by-default,-requires-fuzzilli # 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 ensures that test targets are fetched, even under remote_download_minimal. common:wpt-report --remote_download_regex=".*src/wpt/.*" # Let tests know they're running in CI test:ci-test --test_env=CI=true # release CI – use remote_download_minimal, but always fetch the workerd binary so we can add it to # the release artifacts. build:ci-release --remote_download_minimal --remote_download_regex=".*src/workerd/server/workerd.*"