Nikhil Marathe | f8a94b9 | 2020-06-29 01:43:00 -0700 | [diff] [blame] | 1 | common --enable_platform_specific_config |
| 2 | |
Jakob Buchgraber | 60df905 | 2019-07-11 06:08:00 -0700 | [diff] [blame] | 3 | # Shared configuration flags to build and test Bazel on RBE. |
Jakob Buchgraber | 60df905 | 2019-07-11 06:08:00 -0700 | [diff] [blame] | 4 | build:remote_shared --remote_instance_name=projects/bazel-untrusted/instances/default_instance |
| 5 | build:remote_shared --remote_executor=grpcs://remotebuildexecution.googleapis.com |
Tiago Quelhas | 24470be | 2023-03-14 02:44:21 -0700 | [diff] [blame] | 6 | build:remote_shared --remote_download_toplevel |
Jakob Buchgraber | 60df905 | 2019-07-11 06:08:00 -0700 | [diff] [blame] | 7 | build:remote_shared --remote_timeout=600 |
| 8 | build:remote_shared --google_default_credentials |
| 9 | build:remote_shared --jobs=100 |
| 10 | build:remote_shared --action_env=PATH=/bin:/usr/bin:/usr/local/bin |
Ivo List | bba4b34 | 2021-01-19 08:31:40 -0800 | [diff] [blame] | 11 | build:remote_shared --java_runtime_version=rbe_jdk |
| 12 | build:remote_shared --tool_java_runtime_version=rbe_jdk |
Jakob Buchgraber | 60df905 | 2019-07-11 06:08:00 -0700 | [diff] [blame] | 13 | |
| 14 | # Configuration to build and test Bazel on RBE on Ubuntu 18.04 with Java 11 |
Googler | 40824e1 | 2024-03-11 02:38:48 -0700 | [diff] [blame] | 15 | build:ubuntu2004 --extra_toolchains=@rbe_ubuntu2004//java:all |
| 16 | build:ubuntu2004 --crosstool_top=@rbe_ubuntu2004//cc:toolchain |
| 17 | build:ubuntu2004 --extra_toolchains=@rbe_ubuntu2004//config:cc-toolchain |
| 18 | build:ubuntu2004 --extra_execution_platforms=//:rbe_ubuntu2004_platform,//:rbe_ubuntu2004_highcpu_platform |
| 19 | build:ubuntu2004 --host_platform=//:rbe_ubuntu2004_platform |
| 20 | build:ubuntu2004 --platforms=//:rbe_ubuntu2004_platform |
| 21 | build:ubuntu2004 --config=remote_shared |
Jakob Buchgraber | 60df905 | 2019-07-11 06:08:00 -0700 | [diff] [blame] | 22 | |
Jakob Buchgraber | 60df905 | 2019-07-11 06:08:00 -0700 | [diff] [blame] | 23 | # Alias |
Googler | 40824e1 | 2024-03-11 02:38:48 -0700 | [diff] [blame] | 24 | build:remote --config=ubuntu2004 |
Jakob Buchgraber | 60df905 | 2019-07-11 06:08:00 -0700 | [diff] [blame] | 25 | |
Keith Smiley | 86ef4f4 | 2023-05-24 02:04:45 -0700 | [diff] [blame] | 26 | build:macos --macos_minimum_os=10.11 |
Nikhil Marathe | f8a94b9 | 2020-06-29 01:43:00 -0700 | [diff] [blame] | 27 | |
Googler | b66b8c5 | 2023-08-04 01:46:42 -0700 | [diff] [blame] | 28 | # On Windows, we need pywin32 pip package, which doesn't work with the Python hermetic toolchain. |
| 29 | # See https://github.com/bazelbuild/rules_python/issues/1356 |
| 30 | # Therefore, use the local detected Python toolchain on Windows. |
| 31 | build:windows --extra_toolchains=@bazel_tools//tools/python:autodetecting_toolchain |
| 32 | |
Googler | 138f06f | 2023-08-10 01:53:06 -0700 | [diff] [blame] | 33 | build:windows_arm64 --platforms=//:windows_arm64 |
| 34 | build:windows_arm64 --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows |
| 35 | |
Googler | 15d4a05 | 2023-12-12 09:47:46 -0800 | [diff] [blame] | 36 | # Check direct Bazel module dependencies are up-to-date |
| 37 | common --check_direct_dependencies=error |
| 38 | |
| 39 | # Add mirrors for certain download URLs |
| 40 | common --experimental_downloader_config=bazel_downloader.cfg |
Yun Peng | 89ea68b | 2021-11-23 11:24:51 -0800 | [diff] [blame] | 41 | |
Tiago Quelhas | ba38aa2 | 2023-11-13 07:16:07 -0800 | [diff] [blame] | 42 | # Enable modern C++ features |
| 43 | build:linux --cxxopt=-std=c++17 |
| 44 | build:linux --host_cxxopt=-std=c++17 |
| 45 | build:macos --cxxopt=-std=c++17 |
| 46 | build:macos --host_cxxopt=-std=c++17 |
| 47 | build:windows --cxxopt=/std:c++17 |
| 48 | build:windows --host_cxxopt=/std:c++17 |
| 49 | |
Googler | 707d065 | 2024-03-11 04:15:38 -0700 | [diff] [blame] | 50 | # Enable Java 21 language features |
| 51 | build --java_runtime_version=21 |
| 52 | build --java_language_version=21 |
| 53 | build --tool_java_language_version=21 |
| 54 | build --tool_java_runtime_version=21 |
cushon | 0c65082 | 2022-01-18 08:26:40 -0800 | [diff] [blame] | 55 | |
Xavier Bonaventura | 0bc3331 | 2023-01-12 23:27:06 -0800 | [diff] [blame] | 56 | # Fail if a glob doesn't match anything (https://github.com/bazelbuild/bazel/issues/8195) |
salma-samy | 89222e2 | 2024-02-12 08:30:37 -0800 | [diff] [blame] | 57 | common --incompatible_disallow_empty_glob |
Xavier Bonaventura | 0bc3331 | 2023-01-12 23:27:06 -0800 | [diff] [blame] | 58 | |
John Millikin | 8e8e43e | 2019-10-31 07:39:40 -0700 | [diff] [blame] | 59 | # User-specific .bazelrc |
Emil Kattainen | 5ade86d | 2022-08-30 07:51:18 -0700 | [diff] [blame] | 60 | try-import %workspace%/user.bazelrc |
fweikert | 69895ba | 2022-07-13 04:56:04 -0700 | [diff] [blame] | 61 | |
| 62 | build:docs --workspace_status_command=scripts/docs/get_workspace_status.sh |
Yun Peng | 136dae1 | 2023-09-08 12:39:10 -0700 | [diff] [blame] | 63 | |
| 64 | # Flags for CI builds |
Yun Peng | a7b1d36 | 2023-11-08 09:09:59 -0800 | [diff] [blame] | 65 | ## Common |
| 66 | common:ci-common --lockfile_mode=error |
| 67 | |
Yun Peng | 136dae1 | 2023-09-08 12:39:10 -0700 | [diff] [blame] | 68 | ## For Linux |
Yun Peng | a7b1d36 | 2023-11-08 09:09:59 -0800 | [diff] [blame] | 69 | common:ci-linux --config=ci-common |
Yun Peng | 136dae1 | 2023-09-08 12:39:10 -0700 | [diff] [blame] | 70 | build:ci-linux --repository_cache=/var/lib/buildkite-agent/bazeltest/repo_cache |
| 71 | test:ci-linux --test_env=TEST_INSTALL_BASE=/var/lib/buildkite-agent/bazeltest/install_base |
| 72 | test:ci-linux --test_env=REPOSITORY_CACHE=/var/lib/buildkite-agent/bazeltest/repo_cache |
| 73 | test:ci-linux --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80 |
| 74 | test:ci-linux --sandbox_writable_path=/var/lib/buildkite-agent/bazeltest |
| 75 | test:ci-linux --sandbox_default_allow_network=false |
| 76 | |
| 77 | ## For macOS |
Yun Peng | a7b1d36 | 2023-11-08 09:09:59 -0800 | [diff] [blame] | 78 | common:ci-macos --config=ci-common |
Yun Peng | 136dae1 | 2023-09-08 12:39:10 -0700 | [diff] [blame] | 79 | build:ci-macos --repository_cache=/Users/buildkite/bazeltest/repo_cache |
| 80 | test:ci-macos --test_env=TEST_INSTALL_BASE=/Users/buildkite/bazeltest/install_base |
| 81 | test:ci-macos --test_env=REPOSITORY_CACHE=/Users/buildkite/bazeltest/repo_cache |
| 82 | test:ci-macos --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80 |
| 83 | test:ci-macos --sandbox_writable_path=/Users/buildkite/bazeltest |
Googler | 1a0b3a0 | 2024-01-05 02:13:38 -0800 | [diff] [blame] | 84 | test:ci-macos --sandbox_default_allow_network=false |
Yun Peng | e46f3d1 | 2024-02-21 07:54:31 -0800 | [diff] [blame] | 85 | test:ci-macos --test_tag_filters=-no_macos |
Yun Peng | 136dae1 | 2023-09-08 12:39:10 -0700 | [diff] [blame] | 86 | |
| 87 | ## For Windows |
Yun Peng | a7b1d36 | 2023-11-08 09:09:59 -0800 | [diff] [blame] | 88 | common:ci-windows --config=ci-common |
Yun Peng | 136dae1 | 2023-09-08 12:39:10 -0700 | [diff] [blame] | 89 | build:ci-windows --repository_cache=C:/b/bazeltest_repo_cache |
| 90 | test:ci-windows --test_env=BAZEL_VC |
| 91 | test:ci-windows --test_env=JAVA_HOME |
| 92 | test:ci-windows --test_env=TEST_INSTALL_BASE=C:/b/bazeltest_install_base |
| 93 | test:ci-windows --test_env=REPOSITORY_CACHE=C:/b/bazeltest_repo_cache |
| 94 | test:ci-windows --test_tag_filters=-no_windows,-slow |