-
Notifications
You must be signed in to change notification settings - Fork 734
Expand file tree
/
Copy path.bazelrc
More file actions
141 lines (116 loc) · 7.3 KB
/
Copy path.bazelrc
File metadata and controls
141 lines (116 loc) · 7.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
try-import %workspace%/user.bazelrc
common --enable_bzlmod
# Resolves to --config=linux on Linux, --config=macos on Mac, --windows on windows
common --enable_platform_specific_config
# Make bazel 8 work for us.
build --experimental_cc_static_library
build --experimental_cc_shared_library
build --incompatible_strict_action_env
# Actions get a fixed environment from the flag above, but repository rules and
# module extensions still see the client environment in full, and that is where
# the C++ toolchain gets configured -- rules_cc declares roughly thirty
# variables as inputs to cc_autoconf.
common:windows --experimental_strict_repo_env
common:windows --repo_env=BAZEL_SH
# publishing_rule.bzl declares this as an environ input and reads it straight out
# of the environment, which is how a developer picks a subset of the artifact
# variants to build.
common:windows --repo_env=WPI_PUBLISH_CLASSIFIER_FILTER
# Escape hatches for a Visual Studio install outside the default location.
common:windows --repo_env=BAZEL_VC
common:windows --repo_env=BAZEL_VS
common:windows --repo_env=BAZEL_VC_FULL_VERSION
common:windows --repo_env=BAZEL_WINSDK_FULL_VERSION
# Keep the pinned git away from the developer's ~/.gitconfig, where settings
# like core.autocrlf or url.*.insteadOf would make a fetch machine dependent. A
# nonexistent config path reads as an empty config. This has to live here rather
# than in the wrapper: exported to every process Bazel launches it would also
# reach `bazel run //:copybara`, which needs the real configuration to find a
# credential helper and an identity to push with.
common:windows --repo_env=GIT_CONFIG_GLOBAL=/dev/null
common:windows --repo_env=GIT_CONFIG_SYSTEM=/dev/null
build --java_language_version=25
build --java_runtime_version=remotejdk_25
build --tool_java_language_version=25
build --tool_java_runtime_version=remotejdk_25
# Disable bazel's "header" builds. They break modular jars if annotation processors are doing codegen (eg avaje)
build --nojava_header_compilation
test --test_output=errors
test --notest_verbose_timeout_warnings
import %workspace%/shared/bazel/compiler_flags/sanitizers.rc
import %workspace%/shared/bazel/compiler_flags/linux_flags.rc
import %workspace%/shared/bazel/compiler_flags/osx_flags.rc
import %workspace%/shared/bazel/compiler_flags/systemcore_flags.rc
import %workspace%/shared/bazel/compiler_flags/windows_flags.rc
import %workspace%/shared/bazel/compiler_flags/coverage_flags.rc
build:build_java --test_tag_filters=allwpilib-build-java --build_tag_filters=allwpilib-build-java
build:build_cpp --test_tag_filters=+allwpilib-build-cpp --build_tag_filters=+allwpilib-build-cpp
build:no_example --test_tag_filters=-wpi-example --build_tag_filters=-wpi-example
test:no_example --test_tag_filters=-wpi-example --build_tag_filters=-wpi-example
common:skip_robotpy --test_tag_filters=-robotpy --build_tag_filters=-robotpy
common:imgui_tests --//shared/bazel/rules:with_imgui_tests=true
# Build Buddy BES Setup
build:build_buddy_bes --bes_results_url=https://app.buildbuddy.io/invocation/
build:build_buddy_bes --bes_backend=grpcs://remote.buildbuddy.io
# Common Cache Settings
build:common_cache --remote_timeout=3600
build:common_cache --remote_cache_compression
common:common_cache --experimental_remote_merkle_tree_cache
# Build Buddy Cache Setup
build:build_buddy --config=common_cache
build:build_buddy --config=build_buddy_bes
build:build_buddy --remote_cache=grpcs://remote.buildbuddy.io
build:build_buddy --noslim_profile
build:build_buddy --experimental_profile_include_target_label
build:build_buddy --experimental_profile_include_primary_output
build:build_buddy --nolegacy_important_outputs
common:build_buddy_readonly --noremote_upload_local_results
# Bazel-remote cache setup
build:remote_cache --config=common_cache
build:remote_cache --remote_cache=grpcs://gitlib-bazel.wpi.edu
common:remote_cache_readonly --noremote_upload_local_results
# Stubs for remote execution.
build:remote --strategy=TsProject=remote,sandboxed
build --strategy=CopyFile=remote,local
build --strategy=CopyDirectory=remote,local
build --strategy=CopyToDirectory=remote,local
build --strategy=PyWriteBuildData=remote,local
# All tests have a strategy of TestRunner. Enable local for only tests.
# See the following for more details:
# https://github.com/bazelbuild/bazel/issues/7480
build:linux --strategy=TestRunner=remote,sandboxed,local
build:macos --strategy=TestRunner=remote,sandboxed,local
build:linux --strategy=NpmLifecycleHook=remote,sandboxed,local
build:macos --strategy=NpmLifecycleHook=remote,sandboxed,local
common:remote --config=common_cache
build:remote --experimental_remote_merkle_tree_cache --incompatible_allow_tags_propagation
# Specify your cluster as follows:
# build:remote --remote_executor=grpcs://engflow.example.com --bes_backend=grpcs://engflow.example.com --bes_results_url=https://engflow.example.com/invocation/
build:remote --jobs=100
build:remote --remote_timeout=1500
build:remote --spawn_strategy=remote,sandboxed
build:remote --grpc_keepalive_time=30s
# This config should be used locally. It downloads more than the CI version
build:remote_user --config=remote_cache
build:remote_user --config=remote_cache_readonly
build:remote_user --remote_download_toplevel
common:ci --color=yes
build:ci --remote_download_minimal
build:ci --progress_report_interval=60 --show_progress_rate_limit=60
test:ci --test_summary=short_uncached
build --build_metadata=REPO_URL=https://github.com/wpilibsuite/allwpilib.git
common --define="WPILIB_VERSION=2025.424242.3.1-unknown"
common --define="ROBOTPY_VERSION=2025.424242.3.1"
# List of artifact types to build in CI.
# Anything else gets skipped to speed up CI.
common:ci --repo_env="WPI_PUBLISH_CLASSIFIER_FILTER=headers,sources,linuxsystemcore,linuxsystemcoredebug,linuxsystemcorestatic,linuxsystemcorestaticdebug,linuxx86-64,linuxx86-64debug,linuxx86-64static,linuxx86-64staticdebug,osxuniversal,osxuniversaldebug,osxuniversalstatic,osxuniversalstaticdebug,windowsarm64,windowsarm64debug,windowsarm64static,windowsarm64staticdebug,windowsx86-64,windowsx86-64debug,windowsx86-64static,windowsx86-64staticdebug"
# The 2 configurations for windows are very slow to build each time.
# Instead, skip the cross transition for ARM on x86, and the reverse on x86.
common:ci_windows_x86 --repo_env="WPI_PUBLISH_CLASSIFIER_FILTER=headers,sources,linuxsystemcore,linuxsystemcoredebug,linuxsystemcorestatic,linuxsystemcorestaticdebug,linuxx86-64,linuxx86-64debug,linuxx86-64static,linuxx86-64staticdebug,osxuniversal,osxuniversaldebug,osxuniversalstatic,osxuniversalstaticdebug,windowsx86-64,windowsx86-64debug,windowsx86-64static,windowsx86-64staticdebug"
common:ci_windows_arm --repo_env="WPI_PUBLISH_CLASSIFIER_FILTER=headers,sources,linuxsystemcore,linuxsystemcoredebug,linuxsystemcorestatic,linuxsystemcorestaticdebug,linuxx86-64,linuxx86-64debug,linuxx86-64static,linuxx86-64staticdebug,osxuniversal,osxuniversaldebug,osxuniversalstatic,osxuniversalstaticdebug,windowsarm64,windowsarm64debug,windowsarm64static,windowsarm64staticdebug"
build --@rules_python//python/config_settings:bootstrap_impl=script
build --@rules_python//python/config_settings:venvs_use_declare_symlink=no
# AOS has both aos/flatbuffers/ and aos/flatbuffers.py; without this Bazel
# synthesizes an aos/flatbuffers/__init__.py that shadows the module.
build --incompatible_default_to_explicit_init_py
try-import %workspace%/bazel_auth.rc