Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Go (for kraft-hyperlight)
run: |
curl -sL https://go.dev/dl/go1.25.1.linux-amd64.tar.gz | sudo tar -C /usr/local -xz
echo "/usr/local/go/bin" >> $GITHUB_PATH
- uses: actions/setup-go@v5
with:
go-version: '1.25.1'
cache: false

- name: Install just
uses: extractions/setup-just@v2

- name: Cache kraft-hyperlight
id: kraft-cache
uses: actions/cache@v4
with:
path: /usr/local/bin/kraft-hyperlight
key: kraft-hyperlight-linux-${{ hashFiles('.github/workflows/benchmarks.yml') }}

- name: Build kraft-hyperlight
if: steps.kraft-cache.outputs.cache-hit != 'true'
run: |
git clone --branch hyperlight-platform --depth 1 \
https://github.com/danbugs/kraftkit.git /tmp/kraftkit
Expand Down Expand Up @@ -116,6 +124,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
with:
workspaces: host -> target

- name: Enable KVM permissions
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
Expand Down Expand Up @@ -313,14 +325,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
with:
workspaces: host -> target

- name: Install pyhl
shell: pwsh
run: |
cargo install --git https://github.com/${{ github.repository }} `
--branch ${{ github.head_ref || github.ref_name }} `
hyperlight-unikraft-host `
--bin pyhl `
--locked --force
cd host
cargo build --release --bin pyhl
Copy-Item target\release\pyhl.exe $env:USERPROFILE\.cargo\bin\ -Force

- name: Download prebuilt image
uses: actions/download-artifact@v4
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/host-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
with:
workspaces: host -> target

- name: Install Rust components for pinned toolchain
# The repo pins 1.89.0 via rust-toolchain.toml at the repo root.
# cargo fmt / clippy use the pinned channel, so install their
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/publish-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,29 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.25.1'
cache: false

- uses: Swatinem/rust-cache@v2
with:
workspaces: host -> target

- name: Cache kraft-hyperlight
id: kraft-cache
uses: actions/cache@v4
with:
path: /usr/local/bin/kraft-hyperlight
key: kraft-hyperlight-linux-${{ hashFiles('.github/workflows/publish-examples.yml') }}

- name: Install tools
run: |
# Install kraft-hyperlight
git clone --branch hyperlight-platform --depth 1 https://github.com/danbugs/kraftkit.git /tmp/kraftkit
cd /tmp/kraftkit && go build -o /usr/local/bin/kraft-hyperlight ./cmd/kraft
# Install kraft-hyperlight (if not cached)
if [ ! -f /usr/local/bin/kraft-hyperlight ]; then
git clone --branch hyperlight-platform --depth 1 https://github.com/danbugs/kraftkit.git /tmp/kraftkit
cd /tmp/kraftkit && go build -o /usr/local/bin/kraft-hyperlight ./cmd/kraft
fi
# Install hyperlight-unikraft
cd ${{ github.workspace }}/host && cargo build --release
sudo cp target/release/hyperlight-unikraft /usr/local/bin/
Expand Down
68 changes: 46 additions & 22 deletions .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Go (for kraft-hyperlight)
run: |
curl -sL https://go.dev/dl/go1.25.1.linux-amd64.tar.gz | sudo tar -C /usr/local -xz
echo "/usr/local/go/bin" >> $GITHUB_PATH
- uses: actions/setup-go@v5
with:
go-version: '1.25.1'
cache: false

- name: Install just
uses: extractions/setup-just@v2

- name: Cache kraft-hyperlight
id: kraft-cache
uses: actions/cache@v4
with:
path: /usr/local/bin/kraft-hyperlight
key: kraft-hyperlight-linux-${{ hashFiles('.github/workflows/test-examples.yml') }}

- name: Build kraft-hyperlight
if: steps.kraft-cache.outputs.cache-hit != 'true'
run: |
git clone --branch hyperlight-platform --depth 1 \
https://github.com/danbugs/kraftkit.git /tmp/kraftkit
Expand Down Expand Up @@ -224,6 +232,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
with:
workspaces: host -> target

- name: Enable KVM permissions (no-op if device absent)
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
Expand Down Expand Up @@ -387,15 +399,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Go (for kraft-hyperlight)
run: |
curl -sL https://go.dev/dl/go1.25.1.linux-amd64.tar.gz | sudo tar -C /usr/local -xz
echo "/usr/local/go/bin" >> $GITHUB_PATH
- uses: actions/setup-go@v5
with:
go-version: '1.25.1'
cache: false

- name: Install just
uses: extractions/setup-just@v2

- name: Cache kraft-hyperlight
id: kraft-cache
uses: actions/cache@v4
with:
path: /usr/local/bin/kraft-hyperlight
key: kraft-hyperlight-linux-${{ hashFiles('.github/workflows/test-examples.yml') }}

- name: Build kraft-hyperlight
if: steps.kraft-cache.outputs.cache-hit != 'true'
run: |
git clone --branch hyperlight-platform --depth 1 \
https://github.com/danbugs/kraftkit.git /tmp/kraftkit
Expand Down Expand Up @@ -532,17 +552,19 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install hyperlight-unikraft host binaries
- uses: Swatinem/rust-cache@v2
with:
workspaces: host -> target

- name: Build host binaries
shell: pwsh
run: |
cargo install --git https://github.com/${{ github.repository }} `
--branch ${{ github.head_ref || github.ref_name }} `
hyperlight-unikraft-host `
--bin hyperlight-unikraft `
--bin multifn-test `
--bin pydriver-run `
--bin pyhl `
--locked --force
cd host
cargo build --release --bin hyperlight-unikraft --bin multifn-test --bin pydriver-run --bin pyhl
Copy-Item target\release\hyperlight-unikraft.exe $env:USERPROFILE\.cargo\bin\ -Force
Copy-Item target\release\multifn-test.exe $env:USERPROFILE\.cargo\bin\ -Force
Copy-Item target\release\pydriver-run.exe $env:USERPROFILE\.cargo\bin\ -Force
Copy-Item target\release\pyhl.exe $env:USERPROFILE\.cargo\bin\ -Force

- name: Download prebuilt image
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -636,6 +658,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
with:
workspaces: host -> target

# Linux needs /dev/kvm access to run the guest.
- name: Enable KVM permissions (Linux only)
if: runner.os == 'Linux'
Expand All @@ -660,11 +686,9 @@ jobs:
- name: Install pyhl
shell: pwsh
run: |
cargo install --git https://github.com/${{ github.repository }} `
--branch ${{ github.head_ref || github.ref_name }} `
hyperlight-unikraft-host `
--bin pyhl `
--locked --force
cd host
cargo build --release --bin pyhl
Copy-Item target/release/pyhl* $env:USERPROFILE/.cargo/bin/ -Force

- name: Download prebuilt python-agent-driver image
uses: actions/download-artifact@v4
Expand Down
Loading