Skip to content

Commit

Permalink
add KVM tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Sep 5, 2023
1 parent 394e35d commit 429715d
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,3 +345,52 @@ jobs:
sleep 5
curl http://127.0.0.1:9975/help
sleep 1
run-x86_64-kvm:
name: Run Hermit for Rust (x86_64 + kvm)
runs-on: [self-hosted]
steps:
- name: Install NASM
run: |
sudo apt-get update
sudo apt-get install -y nasm qemu-kvm
- uses: actions/checkout@v3
with:
submodules: true
- uses: mkroening/rust-toolchain-toml@main
- name: Download loader
uses: dsaltares/[email protected]
with:
repo: hermitcore/rusty-loader
file: rusty-loader-x86_64
- name: Build dev profile
run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --package rusty_demo
- name: Install uhyve
run: cargo +stable install --locked uhyve
- name: Check KVM availability
shell: bash
run: |
lscpu
kvm-ok
- name: Test debug version (Uhyve)
run: uhyve --verbose -c 1 target/x86_64-unknown-hermit/debug/rusty_demo
env:
RUST_LOG: debug
- name: Test debug profile (Qemu)
run: |
qemu-system-x86_64 -display none -smp 1 -m 128M -serial stdio \
-enable-kvm -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \
-kernel rusty-loader-x86_64 \
-initrd target/x86_64-unknown-hermit/debug/rusty_demo
- name: Build release profile
run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --package rusty_demo --release
- name: Test release version (Uhyve)
run: uhyve --verbose -c 1 target/x86_64-unknown-hermit/release/rusty_demo
env:
RUST_LOG: debug
- name: Test release profile (Qemu)
run: |
qemu-system-x86_64 -display none -smp 1 -m 128M -serial stdio \
-enable-kvm -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \
-kernel rusty-loader-x86_64 \
-initrd target/x86_64-unknown-hermit/release/rusty_demo

0 comments on commit 429715d

Please sign in to comment.