blob: c5c66abb9644e9fb18f21138b6d3c4d30eba8729 [file] [log] [blame]
Nikhil Marathef8a94b92020-06-29 01:43:00 -07001common --enable_platform_specific_config
Xdng Yng24fcc3e2024-08-29 00:45:43 -07002common --incompatible_use_plus_in_repo_names
Xdng Yngc46b9ce2024-10-01 14:21:54 -07003common --experimental_google_legacy_api # needed by protobuf
Nikhil Marathef8a94b92020-06-29 01:43:00 -07004
Googler8ce16612024-11-05 02:58:48 -08005# For @rules_java doc generation only, can be dropped after Bazel 8
Googler678b01a2024-10-05 23:16:32 -07006common --experimental_rule_extension_api
7
Jakob Buchgraber60df9052019-07-11 06:08:00 -07008# Shared configuration flags to build and test Bazel on RBE.
Jakob Buchgraber60df9052019-07-11 06:08:00 -07009build:remote_shared --remote_instance_name=projects/bazel-untrusted/instances/default_instance
10build:remote_shared --remote_executor=grpcs://remotebuildexecution.googleapis.com
Tiago Quelhas24470be2023-03-14 02:44:21 -070011build:remote_shared --remote_download_toplevel
Jakob Buchgraber60df9052019-07-11 06:08:00 -070012build:remote_shared --remote_timeout=600
13build:remote_shared --google_default_credentials
14build:remote_shared --jobs=100
15build:remote_shared --action_env=PATH=/bin:/usr/bin:/usr/local/bin
Ivo Listbba4b342021-01-19 08:31:40 -080016build:remote_shared --java_runtime_version=rbe_jdk
17build:remote_shared --tool_java_runtime_version=rbe_jdk
Jakob Buchgraber60df9052019-07-11 06:08:00 -070018
19# Configuration to build and test Bazel on RBE on Ubuntu 18.04 with Java 11
Googler40824e12024-03-11 02:38:48 -070020build:ubuntu2004 --extra_toolchains=@rbe_ubuntu2004//java:all
21build:ubuntu2004 --crosstool_top=@rbe_ubuntu2004//cc:toolchain
22build:ubuntu2004 --extra_toolchains=@rbe_ubuntu2004//config:cc-toolchain
23build:ubuntu2004 --extra_execution_platforms=//:rbe_ubuntu2004_platform,//:rbe_ubuntu2004_highcpu_platform
24build:ubuntu2004 --host_platform=//:rbe_ubuntu2004_platform
25build:ubuntu2004 --platforms=//:rbe_ubuntu2004_platform
26build:ubuntu2004 --config=remote_shared
Jakob Buchgraber60df9052019-07-11 06:08:00 -070027
Jakob Buchgraber60df9052019-07-11 06:08:00 -070028# Alias
Googler40824e12024-03-11 02:38:48 -070029build:remote --config=ubuntu2004
Jakob Buchgraber60df9052019-07-11 06:08:00 -070030
Gowroji Sunil417c6b82024-06-04 09:23:45 -070031build:macos --macos_minimum_os=10.13
Nikhil Marathef8a94b92020-06-29 01:43:00 -070032
Googler138f06f2023-08-10 01:53:06 -070033build:windows_arm64 --platforms=//:windows_arm64
34build:windows_arm64 --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows
35
Googler15d4a052023-12-12 09:47:46 -080036# Check direct Bazel module dependencies are up-to-date
37common --check_direct_dependencies=error
38
39# Add mirrors for certain download URLs
40common --experimental_downloader_config=bazel_downloader.cfg
Yun Peng89ea68b2021-11-23 11:24:51 -080041
Googler48c8d9c2024-10-04 12:19:51 -070042common --noenable_workspace
Googler6591e702024-08-27 05:53:49 -070043
Tiago Quelhasba38aa22023-11-13 07:16:07 -080044# Enable modern C++ features
45build:linux --cxxopt=-std=c++17
46build:linux --host_cxxopt=-std=c++17
47build:macos --cxxopt=-std=c++17
48build:macos --host_cxxopt=-std=c++17
49build:windows --cxxopt=/std:c++17
50build:windows --host_cxxopt=/std:c++17
51
Googler8de2fb22024-11-08 09:24:09 -080052# Suppress warnings from external repos, we have no direct control on them anyway.
53build:linux --per_file_copt=external/.*@-w
54build:linux --host_per_file_copt=external/.*@-w
55build:macos --per_file_copt=external/.*@-w
56build:macos --host_per_file_copt=external/.*@-w
57build:windows --per_file_copt=external/.*@/w
58build:windows --host_per_file_copt=external/.*@/w
59
Googler707d0652024-03-11 04:15:38 -070060# Enable Java 21 language features
61build --java_runtime_version=21
62build --java_language_version=21
63build --tool_java_language_version=21
64build --tool_java_runtime_version=21
cushon0c650822022-01-18 08:26:40 -080065
Xavier Bonaventura0bc33312023-01-12 23:27:06 -080066# Fail if a glob doesn't match anything (https://github.com/bazelbuild/bazel/issues/8195)
salma-samy89222e22024-02-12 08:30:37 -080067common --incompatible_disallow_empty_glob
Xavier Bonaventura0bc33312023-01-12 23:27:06 -080068
John Millikin8e8e43e2019-10-31 07:39:40 -070069# User-specific .bazelrc
Emil Kattainen5ade86d2022-08-30 07:51:18 -070070try-import %workspace%/user.bazelrc
fweikert69895ba2022-07-13 04:56:04 -070071
72build:docs --workspace_status_command=scripts/docs/get_workspace_status.sh
Yun Peng136dae12023-09-08 12:39:10 -070073
74# Flags for CI builds
Yun Penga7b1d362023-11-08 09:09:59 -080075## Common
76common:ci-common --lockfile_mode=error
77
Yun Peng136dae12023-09-08 12:39:10 -070078## For Linux
Yun Penga7b1d362023-11-08 09:09:59 -080079common:ci-linux --config=ci-common
Yun Peng136dae12023-09-08 12:39:10 -070080build:ci-linux --repository_cache=/var/lib/buildkite-agent/bazeltest/repo_cache
81test:ci-linux --test_env=TEST_INSTALL_BASE=/var/lib/buildkite-agent/bazeltest/install_base
82test:ci-linux --test_env=REPOSITORY_CACHE=/var/lib/buildkite-agent/bazeltest/repo_cache
83test:ci-linux --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80
84test:ci-linux --sandbox_writable_path=/var/lib/buildkite-agent/bazeltest
85test:ci-linux --sandbox_default_allow_network=false
86
87## For macOS
Yun Penga7b1d362023-11-08 09:09:59 -080088common:ci-macos --config=ci-common
Yun Peng136dae12023-09-08 12:39:10 -070089build:ci-macos --repository_cache=/Users/buildkite/bazeltest/repo_cache
Googler2fb85642024-05-31 04:41:52 -070090build:ci-macos --experimental_collect_system_network_usage
Yun Peng136dae12023-09-08 12:39:10 -070091test:ci-macos --test_env=TEST_INSTALL_BASE=/Users/buildkite/bazeltest/install_base
92test:ci-macos --test_env=REPOSITORY_CACHE=/Users/buildkite/bazeltest/repo_cache
93test:ci-macos --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80
94test:ci-macos --sandbox_writable_path=/Users/buildkite/bazeltest
Googler355b0002024-09-24 06:02:19 -070095# TODO(pcloudy): Revert to false once https://github.com/bazelbuild/bazel/issues/23726 is resolved.
96test:ci-macos --sandbox_default_allow_network=true
Yun Penge46f3d12024-02-21 07:54:31 -080097test:ci-macos --test_tag_filters=-no_macos
Yun Peng136dae12023-09-08 12:39:10 -070098
99## For Windows
Yun Penga7b1d362023-11-08 09:09:59 -0800100common:ci-windows --config=ci-common
Yun Peng136dae12023-09-08 12:39:10 -0700101build:ci-windows --repository_cache=C:/b/bazeltest_repo_cache
102test:ci-windows --test_env=BAZEL_VC
103test:ci-windows --test_env=JAVA_HOME
104test:ci-windows --test_env=TEST_INSTALL_BASE=C:/b/bazeltest_install_base
105test:ci-windows --test_env=REPOSITORY_CACHE=C:/b/bazeltest_repo_cache
106test:ci-windows --test_tag_filters=-no_windows,-slow