Skip to content

Add Windows CI support#223

Merged
nesono merged 19 commits intomainfrom
feat/windows-support
Mar 29, 2026
Merged

Add Windows CI support#223
nesono merged 19 commits intomainfrom
feat/windows-support

Conversation

@nesono
Copy link
Copy Markdown
Owner

@nesono nesono commented Mar 15, 2026

Summary

  • Add windows-latest to Bazel test matrix (alongside ubuntu/macos), failure tests, and integration tests
  • Use --enable_platform_specific_config in .bazelrc for platform-specific C++ flags (/std:c++17 for MSVC vs -std=c++17 for GCC/Clang)
  • Add shell: bash to CI steps so shell scripts run via Git Bash on Windows

Closes #221

Test plan

  • Local build/test still passes with platform-specific .bazelrc changes
  • CI: Windows Bazel tests pass (unit tests + example tests across Bazel 7/8/9)
  • CI: Windows failure tests pass (bash script via Git Bash)
  • CI: Windows integration tests pass (all Python versions)

🤖 Generated with Claude Code

nesono and others added 3 commits March 15, 2026 14:14
- Add windows-latest to Bazel test, failure test, and integration test matrices
- Use --enable_platform_specific_config for platform-specific C++ flags
- MSVC uses /std:c++17 instead of -std=c++17
- Add shell: bash to CI steps for cross-platform compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace bash wrapper script in requirements.bzl with --output flag
  on the Python validation script (fixes CreateProcessW .sh error)
- Add target_compatible_with to Rust targets to skip on Windows
  (rules_rust process_wrapper linking fails on Windows)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Required for @platforms//os:windows repo mapping in Bzlmod.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nesono nesono force-pushed the feat/windows-support branch from 83efff0 to 06ded04 Compare March 17, 2026 20:48
nesono and others added 9 commits March 18, 2026 20:13
- Bump Windows C++ standard to /std:c++20 (MSVC requires C++20 for
  designated initializers)
- Add encoding="utf-8" to all open() calls in release_report.py and
  validate_release_readiness.py (Windows defaults to cp1252)
- Disable fail-fast on test and integration-test matrices so a
  Windows failure doesn't cancel Linux/macOS jobs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
target_compatible_with doesn't prevent Rust toolchain resolution, so
the process_wrapper still fails to link. Exclude Rust targets from
Windows builds at the CI level instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rules_rust eagerly builds its process_wrapper when any package
references Rust rules, even if individual targets are excluded.
Use explicit non-Rust target lists on Windows instead of //...

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backslash line continuations in YAML pipe blocks break on Windows
Git Bash, causing target paths to lose their leading //.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ndows

Git Bash on Windows (MSYS) converts Unix-style paths, which strips the
// prefix from Bazel target patterns like //examples:foo, causing
"invalid package name '/examples'" errors. Set MSYS_NO_PATHCONV=1 and
MSYS2_ARG_CONV_EXCL="*" in all CI steps and shell scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… paths

MSYS_NO_PATHCONV=1 broke repository_cache paths by preventing conversion
of $HOME to Windows format. Instead, use MSYS2_ARG_CONV_EXCL="*" to stop
Bazel target // conversion, and cygpath -w to explicitly convert cache
paths to Windows format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace //fire/starlark/... with explicit package list on Windows,
  skipping parameter_version (its BUILD loads rules_rust which triggers
  broken toolchain resolution)
- Skip release_readiness_test on Windows in integration test (the macro
  generates a .sh test script that CreateProcessW cannot execute)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add encoding="utf-8" to NamedTemporaryFile calls that write Unicode
characters (✓, ⚠️) which cp1252 cannot encode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nesono and others added 4 commits March 22, 2026 15:23
…dows

Address PR review feedback:
- Add build:windows --build_tag_filters=-requires-rust to .bazelrc so
  Rust targets are automatically excluded on Windows
- Tag all Rust targets with "requires-rust" in BUILD files
- Remove MSYS2_ARG_CONV_EXCL hacks and cygpath workarounds from CI
- Remove hardcoded --config=ci from scripts; accept BAZEL_EXTRA_OPTS
  from environment so scripts work on dev machines too
- Simplify CI yaml to use //... for all platforms

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GitHub Actions env: context doesn't expand $HOME — it passes the
literal string. Move to shell export so $HOME expands at runtime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add requires-shell tag to release_readiness_test (generates .sh test
  script that Windows cannot execute via CreateProcessW)
- Add -requires-shell to build/test tag filters in .bazelrc for Windows
- Remove manual IS_WINDOWS check from integration run.sh (handled by
  .bazelrc tag filters now)
- Add fail-fast: false to failure-tests matrix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On Windows, --test_tag_filters=-requires-shell causes bazel test with
an explicit target to return exit code 4 (no test targets found).
Treat this as a skip rather than a failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add section covering Rust exclusion tags, shell-based test rules,
required .bazelrc platform config, MSVC C++20 requirement, and
UTF-8 file encoding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nesono nesono enabled auto-merge (squash) March 29, 2026 16:33
@nesono nesono merged commit 1c35553 into main Mar 29, 2026
21 checks passed
@nesono nesono deleted the feat/windows-support branch March 29, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Windows support

1 participant