diff --git a/.github/workflows/library-httpbingo2.13.4.yaml b/.github/workflows/library-httpbingo2.13.4.yaml index 42d95578..ec878f06 100644 --- a/.github/workflows/library-httpbingo2.13.4.yaml +++ b/.github/workflows/library-httpbingo2.13.4.yaml @@ -78,3 +78,34 @@ jobs: with: name: index.unikraft.io/unikraft.org/httpbingo:2.13.4 push: true + + run: + name: Test httpbingo:2.13.4 (Local build) + needs: [build] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install kraft CLI + run: | + echo "deb [trusted=yes] https://deb.pkg.kraftkit.sh/ /" | sudo tee /etc/apt/sources.list.d/kraftkit.list + sudo apt-get update + sudo apt-get install -y kraftkit + - name: Build, run and validate unikernel + run: | + set -euo pipefail + sudo chmod 666 /dev/kvm + cd library/httpbingo/2.13.4 + echo "Build httpbingo:2.13.4 unikernel" + kraft build --no-cache --no-update --plat qemu --arch x86_64 + + echo "Run httpbingo:2.13.4 unikernel" + kraft run --rm -M 256M --plat qemu --arch x86_64 . & + PID=$! + sleep 5 + + echo "httpbingo:2.13.4 unikernel started successfully locally" + + echo "Cleanup httpbingo:2.13.4 unikernel" + sudo kill "$PID" || true