blob: e126d778de144df64c1111624310088e093cc450 [file] [log] [blame]
common --enable_platform_specific_config
# Shared configuration flags to build and test Bazel on RBE.
build:remote_shared --remote_instance_name=projects/bazel-untrusted/instances/default_instance
build:remote_shared --remote_executor=grpcs://remotebuildexecution.googleapis.com
build:remote_shared --remote_download_toplevel
build:remote_shared --remote_timeout=600
build:remote_shared --google_default_credentials
build:remote_shared --jobs=100
build:remote_shared --action_env=PATH=/bin:/usr/bin:/usr/local/bin
build:remote_shared --java_runtime_version=rbe_jdk
build:remote_shared --tool_java_runtime_version=rbe_jdk
# Workaround for singlejar incompatibility with RBE
build:remote_shared --noexperimental_check_desugar_deps
# Configuration to build and test Bazel on RBE on Ubuntu 18.04 with Java 11
# Workaround for https://github.com/bazelbuild/bazel/issues/19837.
# TODO(bazel-team): Remove this toolchain when .bazelversion is 7.0.0rc2 or later.
build:ubuntu2004_java11 --extra_toolchains=//:bazel_rbe_java_toolchain_definition
build:ubuntu2004_java11 --extra_toolchains=@rbe_ubuntu2004_java11//java:all
build:ubuntu2004_java11 --crosstool_top=@rbe_ubuntu2004_java11//cc:toolchain
build:ubuntu2004_java11 --extra_toolchains=@rbe_ubuntu2004_java11//config:cc-toolchain
build:ubuntu2004_java11 --extra_execution_platforms=//:rbe_ubuntu2004_java11_platform,//:rbe_ubuntu2004_java11_highcpu_platform
build:ubuntu2004_java11 --host_platform=//:rbe_ubuntu2004_java11_platform
build:ubuntu2004_java11 --platforms=//:rbe_ubuntu2004_java11_platform
build:ubuntu2004_java11 --config=remote_shared
# Alias
build:remote --config=ubuntu2004_java11
build:macos --macos_minimum_os=10.11
# On Windows, we need pywin32 pip package, which doesn't work with the Python hermetic toolchain.
# See https://github.com/bazelbuild/rules_python/issues/1356
# Therefore, use the local detected Python toolchain on Windows.
build:windows --extra_toolchains=@bazel_tools//tools/python:autodetecting_toolchain
build:windows_arm64 --platforms=//:windows_arm64
build:windows_arm64 --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows
# When cross-compiling, the local Java runtime, which is used by default, will not be compatible
# with the target.
build:windows_arm64 --java_runtime_version=remotejdk_11
# Check direct Bazel module dependencies are up-to-date
common --check_direct_dependencies=error
# Add mirrors for certain download URLs
common --experimental_downloader_config=bazel_downloader.cfg
# Enable modern C++ features
build:linux --cxxopt=-std=c++17
build:linux --host_cxxopt=-std=c++17
build:macos --cxxopt=-std=c++17
build:macos --host_cxxopt=-std=c++17
build:windows --cxxopt=/std:c++17
build:windows --host_cxxopt=/std:c++17
# Enable Java 11 language features (https://github.com/bazelbuild/bazel/issues/14592)
build --java_language_version=11
build --tool_java_language_version=11
# Fail if a glob doesn't match anything (https://github.com/bazelbuild/bazel/issues/8195)
common --incompatible_disallow_empty_glob
# Manually enable cc toolchain resolution before it is flipped. https://github.com/bazelbuild/bazel/issues/7260
build --incompatible_enable_cc_toolchain_resolution
# Fix non-deterministic Java compilation failures (https://github.com/bazelbuild/bazel/issues/3236)
build --incompatible_sandbox_hermetic_tmp
# User-specific .bazelrc
try-import %workspace%/user.bazelrc
build:docs --workspace_status_command=scripts/docs/get_workspace_status.sh
# Flags for CI builds
## Common
common:ci-common --lockfile_mode=error
## For Linux
common:ci-linux --config=ci-common
build:ci-linux --repository_cache=/var/lib/buildkite-agent/bazeltest/repo_cache
test:ci-linux --test_env=TEST_INSTALL_BASE=/var/lib/buildkite-agent/bazeltest/install_base
test:ci-linux --test_env=REPOSITORY_CACHE=/var/lib/buildkite-agent/bazeltest/repo_cache
test:ci-linux --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80
test:ci-linux --sandbox_writable_path=/var/lib/buildkite-agent/bazeltest
test:ci-linux --sandbox_default_allow_network=false
## For macOS
common:ci-macos --config=ci-common
build:ci-macos --repository_cache=/Users/buildkite/bazeltest/repo_cache
test:ci-macos --test_env=TEST_INSTALL_BASE=/Users/buildkite/bazeltest/install_base
test:ci-macos --test_env=REPOSITORY_CACHE=/Users/buildkite/bazeltest/repo_cache
test:ci-macos --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80
test:ci-macos --sandbox_writable_path=/Users/buildkite/bazeltest
test:ci-macos --sandbox_default_allow_network=false
test:ci-macos --test_tag_filters=-no_macos
## For Windows
common:ci-windows --config=ci-common
build:ci-windows --repository_cache=C:/b/bazeltest_repo_cache
test:ci-windows --test_env=BAZEL_VC
test:ci-windows --test_env=JAVA_HOME
test:ci-windows --test_env=TEST_INSTALL_BASE=C:/b/bazeltest_install_base
test:ci-windows --test_env=REPOSITORY_CACHE=C:/b/bazeltest_repo_cache
test:ci-windows --test_tag_filters=-no_windows,-slow