blob: 5f5074a4d29f9bfdc1f47b52a05de40f1d172a49 [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
Googler678b01a2024-10-05 23:16:32 -07005# @rules_java
6common --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
Googler707d0652024-03-11 04:15:38 -070052# Enable Java 21 language features
53build --java_runtime_version=21
54build --java_language_version=21
55build --tool_java_language_version=21
56build --tool_java_runtime_version=21
cushon0c650822022-01-18 08:26:40 -080057
Xavier Bonaventura0bc33312023-01-12 23:27:06 -080058# Fail if a glob doesn't match anything (https://github.com/bazelbuild/bazel/issues/8195)
salma-samy89222e22024-02-12 08:30:37 -080059common --incompatible_disallow_empty_glob
Xavier Bonaventura0bc33312023-01-12 23:27:06 -080060
John Millikin8e8e43e2019-10-31 07:39:40 -070061# User-specific .bazelrc
Emil Kattainen5ade86d2022-08-30 07:51:18 -070062try-import %workspace%/user.bazelrc
fweikert69895ba2022-07-13 04:56:04 -070063
64build:docs --workspace_status_command=scripts/docs/get_workspace_status.sh
Yun Peng136dae12023-09-08 12:39:10 -070065
66# Flags for CI builds
Yun Penga7b1d362023-11-08 09:09:59 -080067## Common
68common:ci-common --lockfile_mode=error
69
Yun Peng136dae12023-09-08 12:39:10 -070070## For Linux
Yun Penga7b1d362023-11-08 09:09:59 -080071common:ci-linux --config=ci-common
Yun Peng136dae12023-09-08 12:39:10 -070072build:ci-linux --repository_cache=/var/lib/buildkite-agent/bazeltest/repo_cache
73test:ci-linux --test_env=TEST_INSTALL_BASE=/var/lib/buildkite-agent/bazeltest/install_base
74test:ci-linux --test_env=REPOSITORY_CACHE=/var/lib/buildkite-agent/bazeltest/repo_cache
75test:ci-linux --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80
76test:ci-linux --sandbox_writable_path=/var/lib/buildkite-agent/bazeltest
77test:ci-linux --sandbox_default_allow_network=false
78
79## For macOS
Yun Penga7b1d362023-11-08 09:09:59 -080080common:ci-macos --config=ci-common
Yun Peng136dae12023-09-08 12:39:10 -070081build:ci-macos --repository_cache=/Users/buildkite/bazeltest/repo_cache
Googler2fb85642024-05-31 04:41:52 -070082build:ci-macos --experimental_collect_system_network_usage
Yun Peng136dae12023-09-08 12:39:10 -070083test:ci-macos --test_env=TEST_INSTALL_BASE=/Users/buildkite/bazeltest/install_base
84test:ci-macos --test_env=REPOSITORY_CACHE=/Users/buildkite/bazeltest/repo_cache
85test:ci-macos --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80
86test:ci-macos --sandbox_writable_path=/Users/buildkite/bazeltest
Googler355b0002024-09-24 06:02:19 -070087# TODO(pcloudy): Revert to false once https://github.com/bazelbuild/bazel/issues/23726 is resolved.
88test:ci-macos --sandbox_default_allow_network=true
Yun Penge46f3d12024-02-21 07:54:31 -080089test:ci-macos --test_tag_filters=-no_macos
Yun Peng136dae12023-09-08 12:39:10 -070090
91## For Windows
Yun Penga7b1d362023-11-08 09:09:59 -080092common:ci-windows --config=ci-common
Yun Peng136dae12023-09-08 12:39:10 -070093build:ci-windows --repository_cache=C:/b/bazeltest_repo_cache
94test:ci-windows --test_env=BAZEL_VC
95test:ci-windows --test_env=JAVA_HOME
96test:ci-windows --test_env=TEST_INSTALL_BASE=C:/b/bazeltest_install_base
97test:ci-windows --test_env=REPOSITORY_CACHE=C:/b/bazeltest_repo_cache
98test:ci-windows --test_tag_filters=-no_windows,-slow