Skip to content
Open
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
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.'cfg(target_os = "macos")']
runner = "dev/macos-sign-and-run.sh"
6 changes: 3 additions & 3 deletions .github/workflows/Benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
steps:
- uses: actions/checkout@v5

- uses: hyperlight-dev/ci-setup-workflow@v1.8.0
- uses: hyperlight-dev/ci-setup-workflow@v2.3.1
with:
rust-toolchain: "1.94"

Expand All @@ -58,8 +58,8 @@ jobs:
- name: Download Wasm Modules
uses: actions/download-artifact@v5
with:
name: guest-modules-lts
path: ./x64/${{ matrix.config }}
name: guest-modules-X64-lts
path: ./build/${{ matrix.config }}

### Benchmarks ###

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CreateRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fetch-depth: 0
# Ensures just is installed using setup wokflow to ensure just version consistency
- name: Hyperlight setup
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
uses: hyperlight-dev/ci-setup-workflow@v2.3.1
with:
rust-toolchain: "1.94"
- name: Set HYPERLIGHTWASM_VERSION
Expand Down
55 changes: 50 additions & 5 deletions .github/workflows/dep_build_wasm_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ permissions:
jobs:
build-docker-image:
if: ${{ inputs.docs_only == 'false' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
arch:
- name: X64
runner: ubuntu-latest
docker-platform: linux/amd64
- name: arm64
runner: ubuntu-24.04-arm
docker-platform: linux/arm64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -46,15 +55,18 @@ jobs:
with:
images: ${{ github.repository_owner }}/wasm-clang-builder
- name: Calculate ghcr cache destination
id: ghcr-dest
env:
CAN_WRITE: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) && github.actor != 'dependabot[bot]' }}
run: |
if [ "$CAN_WRITE" = "true" ]; then
echo "CACHE_TO=type=registry,ref=ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:buildcache,mode=max" >> $GITHUB_ENV
echo "DO_PUSH=true" >> $GITHUB_ENV
echo "DO_PUSH=false" >> $GITHUB_OUTPUT
else
echo "CACHE_TO=type=local,dest=/tmp/wasm-clang-builder-cache/" >> $GITHUB_ENV
echo "DO_PUSH=false" >> $GITHUB_ENV
echo "DO_PUSH=false" >> $GITHUB_OUTPUT
fi
- name: Build and push wasm-clang-builder
# Only push if not from a fork, not from pull request, and not from dependabot
Expand All @@ -67,28 +79,61 @@ jobs:
build-args: |
WASI_SDK_VERSION_FULL=25.0
GCC_VERSION=12
tags: ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:latest
platforms: ${{ matrix.arch.docker-platform }}
tags: ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:latest-${{ matrix.arch.name }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:buildcache
cache-to: ${{ env.CACHE_TO }}
outputs:
do_push: ${{ steps.ghcr-dest.outputs.DO_PUSH }}

build-wasm-examples:
merge-docker-image:
needs: build-docker-image
if: ${{ needs.build-docker-image.outputs.do_push }}

@ludfjig ludfjig Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you emit true in the writable branch and compare this output with 'true'? Both branches currently emit the string false, which is truthy here. Fork and Dependabot runs would attempt a registry push.

runs-on: ubuntu-latest
steps:
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create manifest
run: |
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:latest \
ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:latest-X64 \
ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:latest-arm64
build-wasm-examples:
needs: merge-docker-image
# Required because merge-docker-image is skipped on some runs,
# and a skipped dependency transitively skips all downstream
# jobs. See: https://github.com/actions/runner/issues/2205
if: ${{ !cancelled() && !failure() }}
strategy:
matrix:
wasmtime_version:
- name: lts
features: ""
- name: latest
features: "wasmtime_latest"
arch:
- name: X64
runner: ubuntu-latest
- name: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.arch.runner }}
env:
CI_BUILD_WASM_MODULES: true
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Remove default clang
run: sudo rm /usr/bin/clang
- name: Fake /dev/kvm for ci-setup-workflow action
run: sudo touch /dev/kvm
- name: Hyperlight setup workflow
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
uses: hyperlight-dev/ci-setup-workflow@v2.3.1
with:
rust-toolchain: "1.94"
- name: Set up Docker Buildx
Expand All @@ -110,6 +155,6 @@ jobs:
- name: Upload Wasm Modules (wasmtime ${{ matrix.wasmtime_version.name }})
uses: actions/upload-artifact@v4
with:
name: guest-modules-${{ matrix.wasmtime_version.name }}
name: guest-modules-${{ matrix.arch.name }}-${{ matrix.wasmtime_version.name }}

@ludfjig ludfjig Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the release workflow to download guest-modules-X64-lts into build/${{ env.CONFIG }}? It still requests guest-modules-lts, which this job does not produce.

path: |
x64/release/*.aot
build/release/*.aot
2 changes: 1 addition & 1 deletion .github/workflows/dep_cargo_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-tags: true

- name: Hyperlight setup
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
uses: hyperlight-dev/ci-setup-workflow@v2.3.1
with:
rust-toolchain: "1.94"

Expand Down
151 changes: 121 additions & 30 deletions .github/workflows/dep_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,39 +39,71 @@ jobs:
# failed-job rerun does not need to repeat the entire matrix.
fail-fast: false
matrix:
hypervisor: [hyperv, mshv3, kvm] # hyperv is windows, mshv and kvm are linux
cpu: [amd, intel]
hypervisor: [hyperv, mshv3, kvm, hvf] # hyperv is windows, mshv and kvm are linux
cpu: [amd, intel, apple, microsoft]
arch: [X64, arm64]
config: [debug, release]
wasmtime: [latest, lts]
exclude:
# Latest testing: skip debug builds to reduce CI load
- wasmtime: latest
config: debug

runs-on: ${{ fromJson(
format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}", "JobId=build-{3}-{4}-{5}-{6}-{7}"]',
matrix.hypervisor == 'hyperv' && 'Windows' || 'Linux',
matrix.hypervisor == 'hyperv' && 'win2025' || matrix.hypervisor == 'mshv3' && 'azlinux3-mshv' || matrix.hypervisor,
matrix.cpu,
matrix.config,
matrix.wasmtime,
github.run_id,
github.run_number,
github.run_attempt)) }}
- cpu: apple
hypervisor: hyperv
- cpu: apple
hypervisor: mshv3
- cpu: microsoft
hypervisor: mshv3
- cpu: microsoft
hypervisor: kvm
- cpu: microsoft
hypervisor: hvf
- arch: X64
hypervisor: hvf
- cpu: amd
arch: arm64
- cpu: intel
arch: arm64
- cpu: apple
arch: X64
- cpu: microsoft
arch: X64
runs-on: ${{ fromJson(matrix.arch == 'X64'
&& format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}", "JobId=build-{3}-{4}-{5}-{6}-{7}"]',
matrix.hypervisor == 'hyperv' && 'Windows' || 'Linux',
matrix.hypervisor == 'hyperv' && 'win2025' || matrix.hypervisor == 'mshv3' && 'azlinux3-mshv' || matrix.hypervisor,
matrix.cpu,
matrix.config,
matrix.wasmtime,
github.run_id,
github.run_number,
github.run_attempt)
|| matrix.hypervisor == 'hyperv'
&& format('["self-hosted", "Windows", "ARM64", "1ES.Pool=hl-windows-arm", "JobId=build-{0}-{1}-{2}-{3}"]',
matrix.config,
matrix.run_id,

@ludfjig ludfjig Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use github.run_* in both ARM Windows labels? These fields are not defined in matrix and expand to empty strings. Including matrix.wasmtime in the build ID and using the benchmark prefix would also distinguish the jobs.

matrix.run_number,
matrix.run_attempt)
|| format('["self-hosted", "{0}", "arm64", "{1}"]',
matrix.hypervisor == 'hvf' && 'macos' || 'Linux',
matrix.hypervisor)) }}
env:
# Features to pass to cargo.
# On Windows LTS builds, do not pass any features.
# On Windows latest builds, only add wasmtime_latest.
# On Linux, always pass the hypervisor feature (kvm/mshv3).
# On Linux latest builds, also add wasmtime_latest.
FEATURES: ${{ matrix.hypervisor != 'hyperv' && format('{0}{1}', matrix.hypervisor, matrix.wasmtime == 'latest' && ',wasmtime_latest' || '') || (matrix.wasmtime == 'latest' && 'wasmtime_latest' || '') }}
JUST_OVERRIDE_ARCH: ${{ matrix.arch == 'X64' && 'x86_64' || 'aarch64' }}
steps:
- uses: actions/checkout@v5

- name: Hyperlight setup
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
uses: hyperlight-dev/ci-setup-workflow@v2.3.1
with:
rust-toolchain: "1.94"
additional-toolchain-directory: src/tests/rust_guests
just-version: 1.59.0

- name: Add Nightly Rust
run: |
Expand All @@ -86,11 +118,32 @@ jobs:
if: runner.os == 'Windows'
run: rustup component add --toolchain nightly-x86_64-pc-windows-msvc rustfmt

- name: Configure ARM64 libclang
if: runner.os == 'Windows' && matrix.arch == 'arm64'
shell: pwsh
run: |
if (-not $env:VSINSTALLDIR) {
throw "Visual Studio developer environment did not set VSINSTALLDIR"
}
$libclang = Join-Path $env:VSINSTALLDIR "VC\Tools\Llvm\ARM64\bin\libclang.dll"
if (-not (Test-Path $libclang)) {
throw "ARM64 libclang not found at '$libclang'"
}
$llvmPath = Split-Path $libclang
"LIBCLANG_PATH=$llvmPath" >> $env:GITHUB_ENV
$llvmPath >> $env:GITHUB_PATH
- name: Install clang tools (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
brew install llvm
echo "$(brew --prefix llvm)/bin" >> "$GITHUB_PATH"
- name: Download Wasm Modules
uses: actions/download-artifact@v5
with:
name: guest-modules-${{ matrix.wasmtime }}
path: ./x64/${{ matrix.config }}
name: guest-modules-${{ matrix.arch }}-${{ matrix.wasmtime }}
path: ./build/${{ matrix.config }}

- name: Build Rust component model examples
run: |
Expand Down Expand Up @@ -144,38 +197,76 @@ jobs:
strategy:
fail-fast: false
matrix:
hypervisor: [hyperv, mshv3, kvm]
cpu: [amd, intel]
hypervisor: [hyperv, mshv3, kvm, hvf]
cpu: [amd, intel, apple, microsoft]
arch: [X64, arm64]
wasmtime: [lts]
exclude:
# Latest testing: skip debug builds to reduce CI load
- cpu: apple
hypervisor: hyperv
- cpu: apple
hypervisor: mshv3
- cpu: microsoft
hypervisor: mshv3
- cpu: microsoft
hypervisor: kvm
- cpu: microsoft
hypervisor: hvf
- arch: X64
hypervisor: hvf
- cpu: amd
arch: arm64
- cpu: intel
arch: arm64
- cpu: apple
arch: X64
- cpu: microsoft
arch: X64
include:
- hypervisor: kvm
cpu: amd
arch: X64
wasmtime: latest

runs-on: ${{ fromJson(
format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}", "JobId=benchmark-{3}-{4}-{5}-{6}"]',
matrix.hypervisor == 'hyperv' && 'Windows' || 'Linux',
matrix.hypervisor == 'hyperv' && 'win2025' || matrix.hypervisor == 'mshv3' && 'azlinux3-mshv' || matrix.hypervisor,
matrix.cpu,
matrix.wasmtime,
github.run_id,
github.run_number,
github.run_attempt)) }}
runs-on: ${{ fromJson(matrix.arch == 'X64'
&& format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}", "JobId=benchmark-{3}-{4}-{5}-{6}"]',
matrix.hypervisor == 'hyperv' && 'Windows' || 'Linux',
matrix.hypervisor == 'hyperv' && 'win2025' || matrix.hypervisor == 'mshv3' && 'azlinux3-mshv' || matrix.hypervisor,
matrix.cpu,
matrix.wasmtime,
github.run_id,
github.run_number,
github.run_attempt)
|| matrix.hypervisor == 'hyperv'
&& format('["self-hosted", "Windows", "ARM64", "1ES.Pool=hl-windows-arm", "JobId=build-{0}-{1}-{2}"]',
matrix.run_id,
matrix.run_number,
matrix.run_attempt)
|| format('["self-hosted", "{0}", "arm64", "{1}"]',
matrix.hypervisor == 'hvf' && 'macos' || 'Linux',
matrix.hypervisor)) }}
env:
FEATURES: ${{ matrix.hypervisor != 'hyperv' && format('{0}{1}', matrix.hypervisor, matrix.wasmtime == 'latest' && ',wasmtime_latest' || '') || (matrix.wasmtime == 'latest' && 'wasmtime_latest' || '') }}
steps:
- uses: actions/checkout@v5

- name: Hyperlight setup
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
uses: hyperlight-dev/ci-setup-workflow@v2.3.1
with:
rust-toolchain: "1.94"

- name: Install clang tools (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
brew install llvm
echo "$(brew --prefix llvm)/bin" >> "$GITHUB_PATH"
- name: Download Wasm Modules
uses: actions/download-artifact@v5
with:
name: guest-modules-${{ matrix.wasmtime }}
path: ./x64/release
name: guest-modules-${{ matrix.arch }}-${{ matrix.wasmtime }}
path: ./build/release

- name: Download benchmarks from "latest"
run: just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} ${{ matrix.cpu }} dev-latest
Expand Down
Loading
Loading