Use local MSVC toolchains for native Windows Bazel tests (#53443)

## Why

Hermetic LLVM targets the GNU ABI on Windows even when an MSVC platform is selected. Native MSVC builds need the runner's MSVC toolchains and SDK environment.

## What changed

- Register the local x64 and ARM64 C++ toolchains in `ci-windows-msvc`.
- Apply `--config=ci-windows-msvc` to the native Windows Bazel test job.
- Allow the native Windows test job to run on `workflow_dispatch` as well as pushes to `main` so toolchain changes can be tested manually.

GitOrigin-RevId: b9fbd3f2bba8a3a8bf226cafda19a921c8738acd
This commit is contained in:
Eric Traut
2026-10-12 18:20:04 +00:00
committed by copyberry
parent 6c7d409a6d
commit 3ece80b784
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -251,8 +251,8 @@ jobs:
test-windows-native-main:
# Native Windows Bazel tests are slower and frequently approach the
# 30-minute PR budget. Run this only for post-merge commits to main and give
# it a larger timeout.
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# it a larger timeout. Also allow manual runs for native toolchain changes.
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
timeout-minutes: 40
runs-on:
group: ${{ github.event.repository.name }}-runners
@@ -290,6 +290,7 @@ jobs:
bazel_test_args=(
test
--config=ci-windows-msvc
--platforms=//:windows_x86_64_msvc
--test_tag_filters=-argument-comment-lint
--test_verbose_timeout_warnings