blob: 42e209c9da789e149a93e2c7bb7911076b6ea12c [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
Jakob Buchgraber60df9052019-07-11 06:08:00 -07005# Shared configuration flags to build and test Bazel on RBE.
Jakob Buchgraber60df9052019-07-11 06:08:00 -07006build:remote_shared --remote_instance_name=projects/bazel-untrusted/instances/default_instance
7build:remote_shared --remote_executor=grpcs://remotebuildexecution.googleapis.com
Tiago Quelhas24470be2023-03-14 02:44:21 -07008build:remote_shared --remote_download_toplevel
Jakob Buchgraber60df9052019-07-11 06:08:00 -07009build:remote_shared --remote_timeout=600
10build:remote_shared --google_default_credentials
11build:remote_shared --jobs=100
12build:remote_shared --action_env=PATH=/bin:/usr/bin:/usr/local/bin
Ivo Listbba4b342021-01-19 08:31:40 -080013build:remote_shared --java_runtime_version=rbe_jdk
14build:remote_shared --tool_java_runtime_version=rbe_jdk
Jakob Buchgraber60df9052019-07-11 06:08:00 -070015
16# Configuration to build and test Bazel on RBE on Ubuntu 18.04 with Java 11
Googler40824e12024-03-11 02:38:48 -070017build:ubuntu2004 --extra_toolchains=@rbe_ubuntu2004//java:all
18build:ubuntu2004 --crosstool_top=@rbe_ubuntu2004//cc:toolchain
19build:ubuntu2004 --extra_toolchains=@rbe_ubuntu2004//config:cc-toolchain
20build:ubuntu2004 --extra_execution_platforms=//:rbe_ubuntu2004_platform,//:rbe_ubuntu2004_highcpu_platform
21build:ubuntu2004 --host_platform=//:rbe_ubuntu2004_platform
22build:ubuntu2004 --platforms=//:rbe_ubuntu2004_platform
23build:ubuntu2004 --config=remote_shared
Jakob Buchgraber60df9052019-07-11 06:08:00 -070024
Jakob Buchgraber60df9052019-07-11 06:08:00 -070025# Alias
Googler40824e12024-03-11 02:38:48 -070026build:remote --config=ubuntu2004
Jakob Buchgraber60df9052019-07-11 06:08:00 -070027
Gowroji Sunil417c6b82024-06-04 09:23:45 -070028build:macos --macos_minimum_os=10.13
Nikhil Marathef8a94b92020-06-29 01:43:00 -070029
Googler138f06f2023-08-10 01:53:06 -070030build:windows_arm64 --platforms=//:windows_arm64
31build:windows_arm64 --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows
32
Googler15d4a052023-12-12 09:47:46 -080033# Check direct Bazel module dependencies are up-to-date
34common --check_direct_dependencies=error
35
36# Add mirrors for certain download URLs
37common --experimental_downloader_config=bazel_downloader.cfg
Yun Peng89ea68b2021-11-23 11:24:51 -080038
Googler6591e702024-08-27 05:53:49 -070039# Enable WORKSPACE functionality for android dependencies in WORKSPACE.bzlmod
40common --enable_workspace
41
Tiago Quelhasba38aa22023-11-13 07:16:07 -080042# Enable modern C++ features
43build:linux --cxxopt=-std=c++17
44build:linux --host_cxxopt=-std=c++17
45build:macos --cxxopt=-std=c++17
46build:macos --host_cxxopt=-std=c++17
47build:windows --cxxopt=/std:c++17
48build:windows --host_cxxopt=/std:c++17
49
Googler707d0652024-03-11 04:15:38 -070050# Enable Java 21 language features
51build --java_runtime_version=21
52build --java_language_version=21
53build --tool_java_language_version=21
54build --tool_java_runtime_version=21
cushon0c650822022-01-18 08:26:40 -080055
Xavier Bonaventura0bc33312023-01-12 23:27:06 -080056# Fail if a glob doesn't match anything (https://github.com/bazelbuild/bazel/issues/8195)
salma-samy89222e22024-02-12 08:30:37 -080057common --incompatible_disallow_empty_glob
Xavier Bonaventura0bc33312023-01-12 23:27:06 -080058
John Millikin8e8e43e2019-10-31 07:39:40 -070059# User-specific .bazelrc
Emil Kattainen5ade86d2022-08-30 07:51:18 -070060try-import %workspace%/user.bazelrc
fweikert69895ba2022-07-13 04:56:04 -070061
62build:docs --workspace_status_command=scripts/docs/get_workspace_status.sh
Yun Peng136dae12023-09-08 12:39:10 -070063
64# Flags for CI builds
Yun Penga7b1d362023-11-08 09:09:59 -080065## Common
66common:ci-common --lockfile_mode=error
67
Yun Peng136dae12023-09-08 12:39:10 -070068## For Linux
Yun Penga7b1d362023-11-08 09:09:59 -080069common:ci-linux --config=ci-common
Yun Peng136dae12023-09-08 12:39:10 -070070build:ci-linux --repository_cache=/var/lib/buildkite-agent/bazeltest/repo_cache
71test:ci-linux --test_env=TEST_INSTALL_BASE=/var/lib/buildkite-agent/bazeltest/install_base
72test:ci-linux --test_env=REPOSITORY_CACHE=/var/lib/buildkite-agent/bazeltest/repo_cache
73test:ci-linux --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80
74test:ci-linux --sandbox_writable_path=/var/lib/buildkite-agent/bazeltest
75test:ci-linux --sandbox_default_allow_network=false
76
77## For macOS
Yun Penga7b1d362023-11-08 09:09:59 -080078common:ci-macos --config=ci-common
Yun Peng136dae12023-09-08 12:39:10 -070079build:ci-macos --repository_cache=/Users/buildkite/bazeltest/repo_cache
Googler2fb85642024-05-31 04:41:52 -070080build:ci-macos --experimental_collect_system_network_usage
Yun Peng136dae12023-09-08 12:39:10 -070081test:ci-macos --test_env=TEST_INSTALL_BASE=/Users/buildkite/bazeltest/install_base
82test:ci-macos --test_env=REPOSITORY_CACHE=/Users/buildkite/bazeltest/repo_cache
83test:ci-macos --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80
84test:ci-macos --sandbox_writable_path=/Users/buildkite/bazeltest
Googler355b0002024-09-24 06:02:19 -070085# TODO(pcloudy): Revert to false once https://github.com/bazelbuild/bazel/issues/23726 is resolved.
86test:ci-macos --sandbox_default_allow_network=true
Yun Penge46f3d12024-02-21 07:54:31 -080087test:ci-macos --test_tag_filters=-no_macos
Yun Peng136dae12023-09-08 12:39:10 -070088
89## For Windows
Yun Penga7b1d362023-11-08 09:09:59 -080090common:ci-windows --config=ci-common
Yun Peng136dae12023-09-08 12:39:10 -070091build:ci-windows --repository_cache=C:/b/bazeltest_repo_cache
92test:ci-windows --test_env=BAZEL_VC
93test:ci-windows --test_env=JAVA_HOME
94test:ci-windows --test_env=TEST_INSTALL_BASE=C:/b/bazeltest_install_base
95test:ci-windows --test_env=REPOSITORY_CACHE=C:/b/bazeltest_repo_cache
96test:ci-windows --test_tag_filters=-no_windows,-slow