diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b603314060..4af80c298d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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) @@ -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)