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
69 changes: 69 additions & 0 deletions .github/actions/build-openvmm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ runs:
echo "path=${cache_tools}" >> "${GITHUB_OUTPUT}"

- name: Restore OpenVMM inputs on Linux
id: restore-openvmm-inputs-linux
if: runner.os != 'Windows'
uses: actions/cache/restore@v5
env:
Expand All @@ -65,6 +66,7 @@ runs:
openvmm-inputs-v1-${{ runner.os }}-${{ runner.arch }}-

- name: Restore OpenVMM inputs on Windows
id: restore-openvmm-inputs-windows
if: runner.os == 'Windows'
uses: actions/cache/restore@v5
with:
Expand Down Expand Up @@ -192,3 +194,70 @@ runs:
build/openvmm.provenance.json
${{ inputs.binary-path }}
key: openvmm-binary-v6-${{ inputs.backend }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('rust-toolchain.toml') }}-${{ steps.openvmm.outputs.sha }}

# No other job builds OpenVMM, since OpenVMM's own CI runs its tests
# (doc/ci.md#openvmm-ci), so a dev push whose build missed the binary
# cache saves the inputs and the Cargo cache that the builds restore.
- name: Save OpenVMM inputs on Linux
if: >-
success() &&
github.event_name == 'push' &&
github.ref == 'refs/heads/dev' &&
runner.os != 'Windows' &&
steps.restore-openvmm-binary-linux.outputs.cache-hit != 'true' &&
steps.restore-openvmm-inputs-linux.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
env:
PATH: ${{ steps.cache-tools-linux.outputs.path }}
with:
path: |
openvmm/flowey-persist/flowey_lib_common__download_gh_release
openvmm/flowey-persist/flowey_lib_common__cache
key: openvmm-inputs-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.openvmm.outputs.sha }}

- name: Save OpenVMM inputs on Windows
if: >-
success() &&
github.event_name == 'push' &&
github.ref == 'refs/heads/dev' &&
runner.os == 'Windows' &&
steps.restore-openvmm-binary-windows.outputs.cache-hit != 'true' &&
steps.restore-openvmm-inputs-windows.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: |
openvmm/flowey-persist/flowey_lib_common__download_gh_release
openvmm/flowey-persist/flowey_lib_common__cache
key: openvmm-inputs-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.openvmm.outputs.sha }}

- name: Save shared Cargo cache on Linux
if: >-
success() &&
github.event_name == 'push' &&
github.ref == 'refs/heads/dev' &&
runner.os != 'Windows' &&
steps.restore-openvmm-binary-linux.outputs.cache-hit != 'true' &&
steps.restore-cargo-linux.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
env:
PATH: ${{ steps.cache-tools-linux.outputs.path }}
with:
path: |
${{ format('{0}/cargo-home/registry', runner.temp) }}
${{ format('{0}/cargo-home/git', runner.temp) }}
key: openvmm-cargo-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('openvmm/Cargo.lock') }}

- name: Save shared Cargo cache on Windows
if: >-
success() &&
github.event_name == 'push' &&
github.ref == 'refs/heads/dev' &&
runner.os == 'Windows' &&
steps.restore-openvmm-binary-windows.outputs.cache-hit != 'true' &&
steps.restore-cargo-windows.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: |
${{ format('{0}/cargo-home/registry', runner.temp) }}
${{ format('{0}/cargo-home/git', runner.temp) }}
key: openvmm-cargo-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('openvmm/Cargo.lock') }}
5 changes: 3 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@
- The session ends 59 minutes after it starts, setup included, on 4 vCPUs. Run the
narrowest affected check first. Rebuild OpenVMM, which takes about 5 minutes and
4 GB, only when the `openvmm` gitlink changed or the cached binary is missing,
and guest artifacts only when their inputs changed. Leave `test-openvmm-unit`,
`test-openvmm`, `build-guest --guest all`, `verify-guest-determinism`, and
and guest artifacts only when their inputs changed. Leave `test-openvmm-unit`
and `test-openvmm` to OpenVMM's own CI, whose results NVX CI checks for the
pin, and `build-guest --guest all`, `verify-guest-determinism`, and
`benchmark` to CI.
- `nvx-rs/target/release/nvx-rs run` and `nvx-rs/target/release/nvx-rs sandbox`
run microVMs and sandboxes. Build `nvx-rs` there, in about a minute, with
Expand Down
23 changes: 22 additions & 1 deletion .github/skills/nvx-openvmm-promote/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,24 @@ unit-test, and formatting gates required by the nested instructions before relyi
NVX CI. For a pin-only promotion of an already reviewed source, record existing exact-
head OpenVMM evidence and do not claim unexecuted local checks.

NVX CI runs none of OpenVMM's tests. Its `openvmm-ci` job requires OpenVMM's checkin
gates to have passed the x86-64 Linux and Windows unit tests and the KVM, MSHV, and
Windows VMM tests for the pinned SHA, in an OpenVMM PR or OpenVMM CI run whose head is
that SHA in `microsoft/openvmm`; see [OpenVMM CI](../../../doc/ci.md#openvmm-ci). The
OpenVMM pull request gets those runs only once it is ready for review, from a branch
of `microsoft/openvmm`. Record that evidence with the platform launcher:

```bash
python3 scripts/nvx.py check-openvmm-ci --revision <revision>
```

```powershell
python scripts\nvx.py check-openvmm-ci --revision <revision>
```

A pending job means that OpenVMM's CI still runs; a failed one needs a rerun or a fix
in OpenVMM before the promotion can pass.

Choose additional NVX runtime checks from the changed behavior and its dependencies.
Use `nvx-run` for a smoke test, `nvx-debug` for a failure, and `nvx-benchmark` only
when performance evidence is required. Report unavailable KVM, MSHV, or WHP coverage
Expand Down Expand Up @@ -319,7 +337,10 @@ Ask for Draft or Ready state before creation. Ready pull requests start the comp
[NVX matrix](../../workflows/ci.yml); changing an already active pull request to Draft
does not cancel its current run. After each push, follow only the workflow run whose
head SHA matches the current pull-request head. Treat older runs as superseded and use
`nvx-ci-investigation` for a failed or unexpectedly cancelled current-head run.
`nvx-ci-investigation` for a failed or unexpectedly cancelled current-head run. The
run's `openvmm-ci` job waits up to 300 minutes while OpenVMM's CI of the pin runs; when
it fails because a required OpenVMM job failed, rerun that job in OpenVMM, then the
`openvmm-ci` job.

`.gitmodules` tracks `feature/microvm/dev`, so the pinned revision must be on that branch
before the NVX pull request merges. `microsoft/openvmm` allows only squash merges, which
Expand Down
Loading
Loading