Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
57 changes: 1 addition & 56 deletions .github/actions/check-nvx-rs/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Check nvx-rs
description: >-
Format, lint, document, and test the nvx crate, and the runtime adapter that builds on it
as an independent adapter
description: Format, lint, document, and test the nvx crate

inputs:
toolchain:
Expand Down Expand Up @@ -164,56 +162,3 @@ runs:
directory="${PWD}/../build/nvx-rs-guest-binaries"
python3 ../scripts/nvx.py build-guest-binaries --output "${directory}"
python3 ../scripts/nvx.py test-guest-binaries --binaries "${directory}"

# The runtime adapter builds on nvx-rs as an independent adapter does: with a lockfile of its
# own, default features off, and the public API only. Its tests check that each configuration
# builds that way, and each configuration also builds with nvx-rs's minimum Rust version. As
# for nvx-rs, each configuration's documentation builds with warnings denied, with
# RUSTDOCFLAGS set for that command alone so that it doesn't reach the doctests.
- name: Check the runtime adapter's protocol-only configuration
shell: bash
working-directory: tests/runtime-adapter
run: |
set -euo pipefail
cargo "+${{ steps.toolchains.outputs.toolchain }}" fmt --all --check
cargo "+${{ steps.toolchains.outputs.toolchain }}" clippy --locked --all-targets \
-- -D warnings
cargo "+${{ steps.toolchains.outputs.toolchain }}" build --locked
cargo "+${{ steps.toolchains.outputs.toolchain }}" test --locked
RUSTDOCFLAGS="-D warnings" cargo "+${{ steps.toolchains.outputs.toolchain }}" doc \
--locked --no-deps
cargo "+${{ steps.toolchains.outputs.msrv }}" check --locked --all-targets

- name: Check the runtime adapter's host-only configuration
shell: bash
working-directory: tests/runtime-adapter
run: |
set -euo pipefail
cargo "+${{ steps.toolchains.outputs.toolchain }}" clippy --locked --all-targets \
--features host -- -D warnings
cargo "+${{ steps.toolchains.outputs.toolchain }}" build --locked --features host
cargo "+${{ steps.toolchains.outputs.toolchain }}" test --locked --features host
RUSTDOCFLAGS="-D warnings" cargo "+${{ steps.toolchains.outputs.toolchain }}" doc \
--locked --no-deps --features host
cargo "+${{ steps.toolchains.outputs.msrv }}" check --locked --all-targets --features host

# The guest agent runs in Linux guests, as a static executable that a test checks.
- name: Check the runtime adapter's guest-only configuration
if: runner.os == 'Linux'
shell: bash
working-directory: tests/runtime-adapter
run: |
set -euo pipefail
for toolchain in "${{ steps.toolchains.outputs.toolchain }}" "${{ steps.toolchains.outputs.msrv }}"; do
rustup target add --toolchain "${toolchain}" x86_64-unknown-linux-musl
done
cargo "+${{ steps.toolchains.outputs.toolchain }}" clippy --locked --all-targets \
--features guest --target x86_64-unknown-linux-musl -- -D warnings
cargo "+${{ steps.toolchains.outputs.toolchain }}" build --locked \
--features guest --target x86_64-unknown-linux-musl
cargo "+${{ steps.toolchains.outputs.toolchain }}" test --locked \
--features guest --target x86_64-unknown-linux-musl
RUSTDOCFLAGS="-D warnings" cargo "+${{ steps.toolchains.outputs.toolchain }}" doc \
--locked --no-deps --features guest --target x86_64-unknown-linux-musl
cargo "+${{ steps.toolchains.outputs.msrv }}" check --locked --all-targets \
--features guest --target x86_64-unknown-linux-musl
3 changes: 0 additions & 3 deletions .github/actions/validate-nvx/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ runs:
python3 scripts/nvx.py test-openvmm-unit --help
python3 scripts/nvx.py test-openvmm --help
python3 scripts/nvx.py test-microvm --help
python3 scripts/nvx.py test-runtime-adapter --help
python3 scripts/nvx.py test-adversarial --help
python3 scripts/nvx.py benchmark --help
python3 scripts/nvx.py doctor --help
Expand Down Expand Up @@ -46,8 +45,6 @@ runs:
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
python scripts\nvx.py test-microvm --help
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
python scripts\nvx.py test-runtime-adapter --help
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
python scripts\nvx.py test-adversarial --help
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
python scripts\nvx.py benchmark --help
Expand Down
4 changes: 1 addition & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
quality and CLI test definitions. Start with the narrowest affected test, then
run the applicable commands from those actions.
- For changes under `nvx-rs/`, run the commands in
[check-nvx-rs](./actions/check-nvx-rs/action.yml). It also checks the
runtime adapter in `tests/runtime-adapter/`, which builds on `nvx`; run its
steps for changes to either.
[check-nvx-rs](./actions/check-nvx-rs/action.yml).
They need no hypervisor.
- OpenVMM source changes also require the package-scoped checks prescribed by the
nested repository. Do not claim unavailable hardware or cross-platform gates
Expand Down
5 changes: 2 additions & 3 deletions .github/skills/nvx-openvmm-promote/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ Each test stops at its first failure, which names a copy that the revision chang
After copying a vector file or an excerpt, record the revision in
[the vectors' README](../../../nvx-rs/tests/vectors/README.md#openvmms-vectors). Rerun the
comparison after each fix until it passes, since only the NVX CLI jobs run these ignored
tests. Then run the checks of [check-nvx-rs](../../actions/check-nvx-rs/action.yml), which
also build the runtime adapter that compiles the excerpts; they may need coordinated
changes too.
tests. Then run the checks of [check-nvx-rs](../../actions/check-nvx-rs/action.yml); they
may need coordinated changes too.

`nvx-rs run` also reads a copy of the identities of OpenVMM's built-in CPU profiles, from
which it guides a failed cold boot on a CPU that none serves. Compare it with the revision's
Expand Down
80 changes: 2 additions & 78 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -695,30 +695,6 @@ jobs:
if-no-files-found: error
retention-days: 1

# The Windows guest and sandbox job runs the runtime adapter's scenarios
# with its guest agent, a static musl executable that Linux builds, as
# it builds the images that the job reads. The Linux jobs build their
# own.
- name: Build the runtime adapter's guest agent
shell: bash
working-directory: tests/runtime-adapter
run: |
set -euo pipefail
toolchain=$(sed -n 's/^channel = "\([^"]*\)".*/\1/p' ../../rust-toolchain.toml)
test -n "${toolchain}"
rustup toolchain install "${toolchain}" --profile minimal --no-self-update \
--target x86_64-unknown-linux-musl
cargo "+${toolchain}" build --locked --release --features guest \
--target x86_64-unknown-linux-musl --bin runtime-adapter-guest

- name: Upload the runtime adapter's guest agent
uses: actions/upload-artifact@v7
with:
name: runtime-adapter-guest
path: tests/runtime-adapter/target/x86_64-unknown-linux-musl/release/runtime-adapter-guest
if-no-files-found: error
retention-days: 1

# A dev push and a merge group reuse the guest artifact components that the
# pull request that they merge built (see build-guest-artifacts). A
# same-repository pull request rehearses that selection and check on the
Expand Down Expand Up @@ -1090,13 +1066,10 @@ jobs:
OPENVMM_DEPLOY_KEY: ${{ secrets.OPENVMM_DEPLOY_KEY }}

# The steps that follow each backend's default suite, from the public
# managed sandbox acceptance to the runtime adapter scenarios, depend on
# managed sandbox acceptance to the Ubuntu sandbox steps, depend on
# none of its results, so a second job runs them beside it, on the same
# runner pool. They alone read the Ubuntu and Azure Linux artifacts, so
# only the jobs that run them wait for distro-artifacts. WHP, whose runtime
# adapter scenarios take about twice as long as on KVM and MSHV, runs them
# in a third job beside the other two, so that its guest and sandbox job no
# longer ends last in most runs (doc/ci.md#job-graph-and-runner-capacity).
# only the jobs that run them wait for distro-artifacts.
nvx-microvm-guests-kvm:
name: NVX microVM tests / Linux / KVM / Guests and sandboxes
needs: [artifacts, distro-artifacts, build-openvmm-linux-gnu, build-nvx-rs-linux-musl, openvmm-changes]
Expand Down Expand Up @@ -1129,7 +1102,6 @@ jobs:
openvmm-artifact: openvmm-linux-gnu
nvx-rs-artifact: nvx-rs-linux-musl
guests-and-sandboxes: true
runtime-adapter: true
secrets:
OPENVMM_DEPLOY_KEY: ${{ secrets.OPENVMM_DEPLOY_KEY }}

Expand Down Expand Up @@ -1165,7 +1137,6 @@ jobs:
openvmm-artifact: openvmm-linux-gnu
nvx-rs-artifact: nvx-rs-linux-musl
guests-and-sandboxes: true
runtime-adapter: true
secrets:
OPENVMM_DEPLOY_KEY: ${{ secrets.OPENVMM_DEPLOY_KEY }}

Expand Down Expand Up @@ -1204,41 +1175,6 @@ jobs:
secrets:
OPENVMM_DEPLOY_KEY: ${{ secrets.OPENVMM_DEPLOY_KEY }}

nvx-microvm-adapter-whp:
name: NVX microVM tests / Windows / WHP / Runtime adapter
needs: [artifacts, distro-artifacts, build-openvmm-windows-msvc, build-nvx-rs-windows-msvc, openvmm-changes]
if: >-
${{
always() &&
!cancelled() &&
(
github.event_name != 'pull_request' ||
github.event.pull_request.draft == false
) &&
(
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository
) &&
needs.artifacts.result == 'success' &&
needs.distro-artifacts.result == 'success' &&
needs.build-openvmm-windows-msvc.result == 'success' &&
needs.build-nvx-rs-windows-msvc.result == 'success' &&
(
needs.openvmm-changes.result != 'success' ||
needs.openvmm-changes.outputs.run-microvm-tests == 'true'
)
}}
uses: ./.github/workflows/run-nvx-microvm-tests.yml
with:
display-name: Windows / WHP / Runtime adapter
runner: '["self-hosted", "windows", "whp", "virtual-machine", "general"]'
backend: whp
openvmm-artifact: openvmm-windows-msvc
nvx-rs-artifact: nvx-rs-windows-msvc
runtime-adapter: true
secrets:
OPENVMM_DEPLOY_KEY: ${{ secrets.OPENVMM_DEPLOY_KEY }}

# Pull requests run the debug kernel on MSHV only, rather than on KVM, whose
# general runners queue the most, or on WHP, where it would lengthen the
# longest waits. Merge groups keep it on KVM alone, and dev pushes and full
Expand Down Expand Up @@ -1583,7 +1519,6 @@ jobs:
- nvx-microvm-guests-kvm
- nvx-microvm-guests-mshv
- nvx-microvm-guests-whp
- nvx-microvm-adapter-whp
- nvx-microvm-debug-kvm
- nvx-microvm-debug-mshv
- nvx-microvm-debug-whp
Expand Down Expand Up @@ -1640,10 +1575,6 @@ jobs:
needs.nvx-microvm-guests-whp.result == 'success' ||
needs.nvx-microvm-guests-whp.result == 'skipped'
) &&
(
needs.nvx-microvm-adapter-whp.result == 'success' ||
needs.nvx-microvm-adapter-whp.result == 'skipped'
) &&
(
needs.nvx-microvm-debug-kvm.result == 'success' ||
needs.nvx-microvm-debug-kvm.result == 'skipped'
Expand Down Expand Up @@ -1736,7 +1667,6 @@ jobs:
- nvx-microvm-guests-kvm
- nvx-microvm-guests-mshv
- nvx-microvm-guests-whp
- nvx-microvm-adapter-whp
- nvx-microvm-debug-kvm
- nvx-microvm-debug-mshv
- nvx-microvm-debug-whp
Expand Down Expand Up @@ -1791,7 +1721,6 @@ jobs:
MICROVM_GUESTS_KVM_RESULT: ${{ needs.nvx-microvm-guests-kvm.result }}
MICROVM_GUESTS_MSHV_RESULT: ${{ needs.nvx-microvm-guests-mshv.result }}
MICROVM_GUESTS_WHP_RESULT: ${{ needs.nvx-microvm-guests-whp.result }}
MICROVM_ADAPTER_WHP_RESULT: ${{ needs.nvx-microvm-adapter-whp.result }}
MICROVM_DEBUG_KVM_RESULT: ${{ needs.nvx-microvm-debug-kvm.result }}
MICROVM_DEBUG_MSHV_RESULT: ${{ needs.nvx-microvm-debug-mshv.result }}
MICROVM_DEBUG_WHP_RESULT: ${{ needs.nvx-microvm-debug-whp.result }}
Expand Down Expand Up @@ -1832,7 +1761,6 @@ jobs:
- nvx-microvm-guests-kvm
- nvx-microvm-guests-mshv
- nvx-microvm-guests-whp
- nvx-microvm-adapter-whp
- nvx-microvm-debug-kvm
- nvx-microvm-debug-mshv
- nvx-microvm-debug-whp
Expand Down Expand Up @@ -1887,10 +1815,6 @@ jobs:
needs.nvx-microvm-guests-whp.result == 'success' ||
needs.nvx-microvm-guests-whp.result == 'skipped'
) &&
(
needs.nvx-microvm-adapter-whp.result == 'success' ||
needs.nvx-microvm-adapter-whp.result == 'skipped'
) &&
(
needs.nvx-microvm-debug-kvm.result == 'success' ||
needs.nvx-microvm-debug-kvm.result == 'skipped'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ jobs:
run: |
set -euo pipefail
rust_toolchain=$(sed -n 's/^channel = "\([^"]*\)".*/\1/p' rust-toolchain.toml)
# The minimum supported Rust version of the nvx crate, with which
# check-nvx-rs also checks the runtime adapter.
# The minimum supported Rust version of the nvx crate, which
# check-nvx-rs checks.
crate_msrv=$(sed -n 's/^rust-version = "\(.*\)"$/\1/p' nvx-rs/Cargo.toml)
nextest=$(sed -n 's/^cargo_nextest\.version=//p' scripts/setup/tool-versions.conf)
{
Expand Down
Loading
Loading