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
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
53 changes: 48 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,59 @@ 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 }}
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 }}
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 +153,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 }}
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
116 changes: 95 additions & 21 deletions .github/workflows/dep_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,54 @@ 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,
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.
Expand All @@ -69,7 +98,7 @@ jobs:
- 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"

Expand All @@ -86,11 +115,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,12 +194,36 @@ 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(
Expand All @@ -167,15 +241,15 @@ jobs:
- 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: 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