ci: fix Windows cross-compile by gating unix-only harmony code #291
Reference in New Issue
Block a user
No description provided.
Delete Branch "ci/fix-fleet-operator"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The harmony_composer CI job builds for x86_64-pc-windows-gnu. It was
failing because workspace members that explicitly request the
kvmfeature (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:
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
kvmkvmfrom harmony's default features; callers that need italready opt in explicitly
#[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.