Skip to content

Commit

Permalink
ci: reorder kvm setup
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Sep 8, 2023
1 parent 9069bac commit 6d9d904
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,20 +361,37 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install qemu-system-x86 nasm
- uses: mkroening/rust-toolchain-toml@main
- uses: Swatinem/rust-cache@v2
- name: Check KVM availability
shell: bash
run: |
lscpu
kvm-ok
- name: Download loader (x86_64)
uses: dsaltares/fetch-gh-release-asset@master
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
repo: hermitcore/rusty-loader
- name: Download loader (x86_64-fc)
uses: dsaltares/fetch-gh-release-asset@master
with:
file: rusty-loader-x86_64-fc
repo: hermitcore/rusty-loader
- name: Install firecracker
run: |
lscpu
kvm-ok
# https://github.com/firecracker-microvm/firecracker/blob/7c5fc8707f26c4244d48a747631ab0fb31fc4c39/docs/getting-started.md#getting-a-firecracker-binary
ARCH="$(uname -m)"
release_url="https://github.com/firecracker-microvm/firecracker/releases"
latest=$(basename $(curl -fsSLI -o /dev/null -w %{url_effective} ${release_url}/latest))
curl -L ${release_url}/download/${latest}/firecracker-${latest}-${ARCH}.tgz \
| tar -xz
# Rename the binary to "firecracker"
mv release-${latest}-$(uname -m)/firecracker-${latest}-${ARCH} firecracker
echo "$PWD" >> $GITHUB_PATH
- uses: dtolnay/rust-toolchain@stable
- run: cargo install uhyve
- 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: Test debug version (Uhyve)
Expand All @@ -399,23 +416,6 @@ 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/fetch-gh-release-asset@master
with:
repo: hermitcore/rusty-loader
file: rusty-loader-x86_64-fc
- name: Install firecracker
run: |
# https://github.com/firecracker-microvm/firecracker/blob/7c5fc8707f26c4244d48a747631ab0fb31fc4c39/docs/getting-started.md#getting-a-firecracker-binary
ARCH="$(uname -m)"
release_url="https://github.com/firecracker-microvm/firecracker/releases"
latest=$(basename $(curl -fsSLI -o /dev/null -w %{url_effective} ${release_url}/latest))
curl -L ${release_url}/download/${latest}/firecracker-${latest}-${ARCH}.tgz \
| tar -xz
# Rename the binary to "firecracker"
mv release-${latest}-$(uname -m)/firecracker-${latest}-${ARCH} firecracker
echo "$PWD" >> $GITHUB_PATH
- 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 debug profile (Firecracker)
Expand Down

0 comments on commit 6d9d904

Please sign in to comment.