Files
harmony/harmony
Jean-Gabriel Gill-Couture 277c5edb52
All checks were successful
Run Check Script / check (pull_request) Successful in 2m0s
ci: fix Windows cross-compile by gating unix-only harmony code
The harmony_composer CI job builds for x86_64-pc-windows-gnu. It was
failing because workspace members that explicitly request the `kvm`
feature (kvm examples) caused Cargo to unify that feature into the
harmony build for all targets, including Windows — even though
harmony_composer itself doesn't need kvm.

Three-part fix:
- Move `virt` (libvirt bindings) to `[target.'cfg(unix)'.dependencies]`
  so Cargo never tries to compile it for non-Unix targets, regardless
  of which workspace member requests `kvm`
- Remove `kvm` from harmony's default features; callers that need it
  already opt in explicitly
- Gate kvm and podman-topology code with `#[cfg(unix)]` / `#[cfg(all(feature = "kvm", unix))]`
  so harmony compiles cleanly on Windows. Podman score types
  (PodmanService, PodmanV0Score, ReconcileScore) remain available on
  all platforms since the fleet operator CRD definitions need them.
2026-05-23 11:26:09 -04:00
..