Skip to content

Conversation

@scottopell
Copy link
Contributor

Summary

  • Add Windows build workflow triggered by 'build-windows' label
  • Update protobuf installation action for Windows support via chocolatey
  • Create PowerShell CI scripts (check, fmt, clippy, test, build)
  • Exclude Linux-specific features (logrotate_fs) on Windows builds
  • Generate Windows binary artifacts for download

Test plan

  • Verify workflow triggers on 'build-windows' label
  • Check all Windows CI steps pass (check, fmt, clippy, test, build)
  • Confirm Windows binary artifact is generated and downloadable
  • Validate Linux-specific code is properly excluded

This is experimental/alpha Windows support - kept separate from main CI pipeline.

🤖 Generated with Claude Code

@scottopell scottopell added the build-windows Trigger Windows CI build workflow label Sep 4, 2025
Cargo.toml Outdated
Comment on lines 18 to 20
# Platform-specific metrics-exporter-prometheus dependencies
# Unix platforms (Linux, macOS) get both HTTP and UDS listeners
# Windows gets only HTTP listener (no Unix Domain Sockets)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This note looks misplaced

Cargo.toml Outdated
[target.'cfg(unix)'.workspace.dependencies]
metrics-exporter-prometheus = { version = "0.15", default-features = false, features = [
"http-listener",
"uds-listener",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the uds listener in practice?


Write-Host "Building release binary for Windows..."
# Build with default features (platform-specific deps handled in Cargo.toml)
cargo build --locked --release --features default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we drop the --features default bit here? Presumably that's the default behavior

Copy link
Contributor

@GeorgeHahn GeorgeHahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good. Left a couple of comments on nits. I suspect there are a few more dependencies and lading modules that will need flagging off before the build succeeds. (I'm mostly thinking about nix and the observer module.)

This adds experimental Windows support to lading with opt-in CI builds
triggered by the 'build-windows' label on PRs. The implementation includes
comprehensive cross-platform compatibility fixes and Windows-specific
adaptations throughout the codebase.

## Key Changes

**CI Infrastructure:**
- New Windows build workflow with PowerShell scripts (check, test, build)
- Protobuf installation support for Windows runners
- Opt-in builds via 'build-windows' label (experimental feature)

**Cross-Platform Compatibility:**
- Fixed metrics-exporter-prometheus dependency for Windows builds
- Added conditional compilation for platform-specific code
- Windows-compatible process monitoring using sysinfo crate
- Platform-specific PID tracking and process tree management

**Test Infrastructure:**
- Converted integration tests from Unix sockets to TCP for Windows compatibility
- Skip Unix-specific sheepdog integration tests on Windows
- Updated ducks/sheepdog test configurations for cross-platform use

**Build System:**
- Updated workspace dependencies for Windows compatibility
- Fixed unused code warnings specific to Windows builds
- Improved error handling for platform-specific features

## Testing Status

- ✅ Compilation and basic functionality verified on Windows
- ✅ Core build, check, and test workflows functional
- ⚠️  UDP generators have known issues on Windows (documented)
- ⚠️  Some Unix-specific features disabled on Windows

This establishes the foundation for Windows support while maintaining
full compatibility with existing Unix/Linux deployments. The Windows
support is marked experimental pending further testing and validation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updates all Windows PowerShell CI scripts to match their Linux bash
counterparts exactly, ensuring consistent behavior across platforms:

- check.ps1: Use --all-features (was --features default)
- clippy.ps1: Use --all-features, remove --locked, --all-targets, and -D warnings
- test.ps1: Use --all-features (was --features default)
- build.ps1: Remove --locked flag (cleaner release build)

This works correctly now that we have platform-specific conditional
dependencies in Cargo.toml - --all-features only activates features
available for the target platform.

The scripts now have semantic parity with Linux CI behavior.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ofek
Copy link
Contributor

ofek commented Oct 13, 2025

After this gets rebased I'm still willing to test, if you would tell me the commands to do so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-windows Trigger Windows CI build workflow no-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants