-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -345,3 +345,61 @@ 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 QEMU, NASM | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install qemu-system-x86 nasm libcap-ng-dev libseccomp-dev socat | ||
- name: Checkout hermit-rs | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: hermitcore/hermit-rs | ||
submodules: true | ||
- name: Remove hermit-kernel submodule | ||
run: git rm -r kernel | ||
- name: Checkout hermit-kernel | ||
uses: actions/checkout@v4 | ||
with: | ||
path: kernel | ||
- uses: mkroening/rust-toolchain-toml@main | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Build dev profile | ||
run: cargo build -Zbuild-std=std,panic_abort --package rusty_demo --target x86_64-unknown-hermit | ||
- name: Download loader | ||
uses: dsaltares/[email protected] | ||
with: | ||
repo: hermitcore/rusty-loader | ||
file: rusty-loader-x86_64 | ||
- 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 |