ci: remote Windows lint C++ actions

This commit is contained in:
Adam Perry
2026-06-22 11:51:14 -07:00
committed by Adam Perry @ OpenAI
parent b9afe5dcd1
commit d93ad01950
4 changed files with 40 additions and 0 deletions
+9
View File
@@ -255,6 +255,15 @@ if [[ ${#bazel_args[@]} -eq 0 || ${#bazel_targets[@]} -eq 0 ]]; then
exit 1
fi
if [[ "${RUNNER_OS:-}" == "Windows" ]]; then
for arg in "${bazel_args[@]}"; do
if [[ "$arg" == "--config=argument-comment-lint" ]]; then
ci_config=ci-windows-argument-lint
break
fi
done
fi
if [[ "${RUNNER_OS:-}" == "Windows" && $windows_cross_compile -eq 1 && -z "${BUILDBUDDY_API_KEY:-}" ]]; then
# Windows cross-compilation depends on authenticated RBE. Preserve the local
# Windows build shape when credentials are unavailable.
@@ -20,6 +20,7 @@ REMOTE_EXECUTION_CONFIGS = {
"--config=ci-linux",
"--config=ci-macos",
"--config=ci-v8",
"--config=ci-windows-argument-lint",
"--config=ci-windows-cross",
}
# Honor either explicit setting so the wrapper never overrides the caller's
@@ -98,6 +98,27 @@ class RunBazelWithBuildBuddyTest(unittest.TestCase):
],
)
def test_windows_argument_lint_configuration_uses_remote_execution(self) -> None:
env = {"BUILDBUDDY_API_KEY": "fork-token"}
self.assertEqual(
run_bazel_with_buildbuddy.bazel_args_with_remote_config(
[
"build",
"--config=ci-windows-argument-lint",
"//codex-rs/cli:codex",
],
env,
),
[
"build",
"--config=buildbuddy-generic-rbe",
"--remote_header=x-buildbuddy-api-key=fork-token",
"--config=ci-windows-argument-lint",
"//codex-rs/cli:codex",
],
)
def test_query_remote_configuration_is_inserted_before_expression(self) -> None:
expression = 'kind("rust_library rule", //codex-rs/...)'
env = {"BUILDBUDDY_API_KEY": "fork-token"}