Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cf0157f
Add Windows CI support (#221)
nesono Mar 15, 2026
4c0a56e
Fix Windows CI: remove shell wrappers, skip Rust on Windows
nesono Mar 17, 2026
06ded04
Add platforms bazel_dep for target_compatible_with select()
nesono Mar 17, 2026
ecd07b6
Fix Windows C++20, UTF-8 encoding, and fail-fast cascading
nesono Mar 18, 2026
7e87cbc
Exclude Rust targets on Windows via CI (replaces target_compatible_with)
nesono Mar 18, 2026
9630698
Use explicit target lists on Windows to avoid Rust toolchain resolution
nesono Mar 18, 2026
70cf6b5
Fix Windows CI: use variables instead of backslash continuations
nesono Mar 18, 2026
2b80cb4
Fix MSYS path conversion stripping // prefix from Bazel targets on Wi…
nesono Mar 22, 2026
133b989
Fix MSYS path handling: use MSYS2_ARG_CONV_EXCL and cygpath for cache…
nesono Mar 22, 2026
f4ebac3
Exclude Rust targets from Windows CI and skip release readiness sh_test
nesono Mar 22, 2026
89d6535
trigger CI
nesono Mar 22, 2026
216375c
Fix cp1252 encoding error in validate_release_readiness_test on Windows
nesono Mar 22, 2026
31e0ea7
Use .bazelrc platform flags instead of hardcoded target lists for Win…
nesono Mar 22, 2026
d175ef4
Fix BAZEL_EXTRA_OPTS: use shell export for $HOME expansion
nesono Mar 22, 2026
9085d84
Tag release_readiness_test with requires-shell for Windows exclusion
nesono Mar 27, 2026
abdee1e
Handle exit code 4 from bazel test when tag filters skip all targets
nesono Mar 28, 2026
2ce5af7
Remove fail-fast: false from CI tests
nesono Mar 29, 2026
12dee7b
Add Module.bazel.lock for integration test
nesono Mar 29, 2026
62d9b67
Document Windows support limitations in README
nesono Mar 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,27 @@
# Use Bzlmod for dependency management
common --enable_bzlmod

# Auto-select platform config (linux/macos/windows)
common --enable_platform_specific_config

# Python configuration
build --incompatible_default_to_explicit_init_py

# Test output
test --test_output=errors

# C++ configuration
build --cxxopt=-std=c++17
build --host_cxxopt=-std=c++17
# C++ configuration (platform-specific)
build:linux --cxxopt=-std=c++17
build:linux --host_cxxopt=-std=c++17
build:macos --cxxopt=-std=c++17
build:macos --host_cxxopt=-std=c++17
build:windows --cxxopt=/std:c++20
build:windows --host_cxxopt=/std:c++20

# Windows: exclude Rust targets and shell-based tests
# (rules_rust toolchain cannot build, sh_test scripts cannot execute on Windows)
build:windows --build_tag_filters=-requires-rust,-requires-shell
test:windows --test_tag_filters=-requires-rust,-requires-shell

# Java configuration - use Java 17 for records support
build --java_language_version=17
Expand Down
36 changes: 24 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
bazel-version: ["7.x", "8.x", "9.x"]
steps:
- name: Checkout code
Expand All @@ -57,14 +57,18 @@ jobs:
bazel-${{ matrix.os }}-

- name: Run Bazel tests
shell: bash
env:
USE_BAZEL_VERSION: ${{ matrix.bazel-version }}
run: bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors
run: |
bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors

- name: Build all targets
shell: bash
env:
USE_BAZEL_VERSION: ${{ matrix.bazel-version }}
run: bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" //...
run: |
bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" //...

typecheck:
name: Type Checking
Expand All @@ -87,8 +91,11 @@ jobs:
run: bazel build --config=ci --config=typecheck --repository_cache="$HOME/.cache/bazel-repo" //...

failure-tests:
name: Run Failure Tests
runs-on: ubuntu-latest
name: Failure Tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -99,19 +106,22 @@ jobs:
path: |
~/.cache/bazel-repo-failure
~/.cache/bazelisk
key: bazel-failure-tests-ubuntu-latest-${{ hashFiles('MODULE.bazel.lock') }}
key: bazel-failure-tests-${{ matrix.os }}-${{ hashFiles('MODULE.bazel.lock') }}
restore-keys: |
bazel-failure-tests-ubuntu-latest-
bazel-failure-tests-${{ matrix.os }}-

- name: Run failure tests
shell: bash
run: |
export BAZEL_EXTRA_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo-failure"
./fire/starlark/failure_test/run_failure_tests.sh

integration-test:
name: Integration Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
name: Integration Test (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout code
Expand All @@ -123,12 +133,14 @@ jobs:
path: |
~/.cache/bazel-repo
~/.cache/bazelisk
key: bazel-integration-py${{ matrix.python-version }}-${{ hashFiles('integration_test/MODULE.bazel.lock') }}
key: bazel-integration-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('integration_test/MODULE.bazel.lock') }}
restore-keys: |
bazel-integration-py${{ matrix.python-version }}-
bazel-integration-
bazel-integration-${{ matrix.os }}-py${{ matrix.python-version }}-
bazel-integration-${{ matrix.os }}-

- name: Run integration test
shell: bash
run: |
export BAZEL_EXTRA_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo"
cd integration_test
./run.sh --python-version ${{ matrix.python-version }}
172 changes: 168 additions & 4 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,63 @@ cat bazel-bin/path/to/RELEASE_REPORT.md

Use `release_readiness_test` as a CI gate — it fails the build when the report
status is `NOT READY FOR RELEASE`.

## Windows Support

FIRE supports Windows with the following limitations:

### Rust code generation

The `rules_rust` toolchain cannot build on Windows due to an upstream linker
issue with the process_wrapper. All Rust targets must be tagged with
`requires-rust` so they are automatically excluded on Windows via `.bazelrc`:

```starlark
rust_library(
name = "my_params_rs",
srcs = [":my_params_rs_src"],
tags = ["requires-rust"],
)
```

### Shell-based test rules

`release_readiness_test` generates a shell script as its test executable, which
Windows cannot run via `CreateProcessW`. Tag these targets with `requires-shell`
to exclude them on Windows:

```starlark
release_readiness_test(
name = "release_readiness",
report = ":release_report",
tags = ["requires-shell"],
)
```

### Platform configuration

Windows exclusions are handled automatically via `.bazelrc` platform config.
Projects consuming FIRE should include these lines in their `.bazelrc`:

```text
common --enable_platform_specific_config

build:windows --build_tag_filters=-requires-rust,-requires-shell
test:windows --test_tag_filters=-requires-rust,-requires-shell
```

### C++ standard

Windows (MSVC) requires C++20 for designated initializer support. Configure
in `.bazelrc`:

```text
build:windows --cxxopt=/std:c++20
build:windows --host_cxxopt=/std:c++20
```

### File encoding

Python scripts that read or write files containing Unicode characters (e.g.,
`✓`, `⚠️`) must specify `encoding="utf-8"` explicitly, as Windows defaults to
`cp1252`.
Loading
Loading