Skip to content

Fix compilation of the xtask package under Windows and add to CI #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nicholasbishop
Copy link
Member

As reported in #433, the qemu code makes use of some APIs from the nix crate, which causes compilation to fail on Windows (native, not WSL). The qemu code can't be easily made to work on Windows, but the rest of xtask should still work fine building, running clippy, etc. Fix by adding #![cfg(unix)] to the qemu module, as well as the disk and net modules that are only used by the qemu code. Also changed the run_vm_tests action to panic on non-Unix targets.

Also add Windows compilation to CI. The new job builds the UEFI packages on a Windows runner instead of Ubuntu. This is a somewhat minimal test (just builds for a single target, doesn't run tests or clippy), but should be enough to ensure that development on Windows outside of WSL is in a working state.

The qemu code makes use of some APIs from the `nix` crate, which causes
compilation to fail on Windows (native, not WSL). The qemu code can't be
easily made to work on Windows, but the rest of xtask should still work
fine building, running clippy, etc. Fix by adding `#![cfg(unix)]` to the
`qemu` module, as well as the `disk` and `net` modules that are only
used by the qemu code. Also changed the `run_vm_tests` action to panic
on non-Unix targets.
The new job builds the UEFI packages on a Windows runner instead of
Ubuntu. This is a somewhat minimal test (just builds for a single
target, doesn't run tests or clippy), but should be enough to ensure
that development on Windows (outside of WSL) is in a working state.
@GabrielMajeri GabrielMajeri force-pushed the bishop-fix-xtask-win-comp-2 branch from 271590f to a28c037 Compare May 29, 2022 21:04
@GabrielMajeri GabrielMajeri merged commit 190bf5b into rust-osdev:main May 29, 2022
@nicholasbishop nicholasbishop deleted the bishop-fix-xtask-win-comp-2 branch November 25, 2022 22:38
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.

2 participants