diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53155f01..ca62b012 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,3 +80,38 @@ jobs: - name: Run VM (hello_c, release) if: matrix.target == 'x86_64' run: cargo xtask ci qemu --target ${{ matrix.target }} --image hello_c --release + + run-kvm: + name: Run (KVM) + runs-on: [self-hosted] + steps: + - name: Install QEMU + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends qemu-system-x86 + - uses: actions/checkout@v4 + with: + lfs: true + - name: Install firecracker + run: | + # https://github.com/firecracker-microvm/firecracker/blob/v1.5.1/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 + + ./firecracker --version + - uses: dtolnay/rust-toolchain@stable + - name: Run QEMU (hello_world, dev) + run: cargo xtask ci qemu --target x86_64 --accel + - name: Run QEMU (hello_world, release) + run: cargo xtask ci qemu --target x86_64 --accel --release + - name: Run Firecracker (hello_world, dev) + run: cargo xtask ci firecracker --target x86_64-fc --features fc + - name: Run Firecracker (hello_world, release) + run: cargo xtask ci firecracker --target x86_64-fc --features fc --release \ No newline at end of file diff --git a/data/x86_64-fc/hello_world b/data/x86_64-fc/hello_world new file mode 100755 index 00000000..3503ef6f --- /dev/null +++ b/data/x86_64-fc/hello_world @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a903e3be2095e2e85c87d388a0cd017d0911a33c013a71895da40707801f1561 +size 1482928