Skip to content

Commit

Permalink
add basic test within firecracker
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Sep 6, 2023
1 parent 0f42675 commit 176f97c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ jobs:
- name: Install QEMU, NASM
run: |
sudo apt-get update
sudo apt-get install qemu-system-x86 nasm libcap-ng-dev libseccomp-dev socat
sudo apt-get install qemu-system-x86 nasm
- name: Checkout hermit-rs
uses: actions/checkout@v4
with:
Expand All @@ -369,7 +369,7 @@ jobs:
- 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
- name: Download loader (x86_64)
uses: dsaltares/[email protected]
with:
repo: hermitcore/rusty-loader
Expand Down Expand Up @@ -403,3 +403,24 @@ jobs:
-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
- name: Download loader (x86_64-fc)
uses: dsaltares/[email protected]
with:
repo: hermitcore/rusty-loader
file: rusty-loader-x86_64-fc
- name: Download firecracker
uses: dsaltares/[email protected]
with:
repo: firecracker-microvm/firecracker
file: firecracker-v1.4.1-x86_64.tgz
target: 'firecracker-x86_64.tgz'
- name: Install firecracker
run: |
tar xzvf firecracker-x86_64.tgz --one-top-level=fc --strip-components 1
- name: Build minimal profile (debug)
run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --no-default-features --package hello_world
- name: Test minimal profile
run: |
./fc/firecracker-v1.4.1-x86_64 --no-api --config-file ./kernel/fc-config.json &
sleep 1
kill -KILL $(pidof firecracker-v1.4.1-x86_64)
13 changes: 13 additions & 0 deletions fc-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"boot-source": {
"kernel_image_path": "./rusty-loader-x86_64-fc",
"initrd_path": "target/x86_64-unknown-hermit/debug/hello_world",
"boot_args": ""
},
"drives": [],
"machine-config": {
"vcpu_count": 1,
"mem_size_mib": 256,
"smt": false
}
}

0 comments on commit 176f97c

Please sign in to comment.