Skip to content

Use CPU in the benchmark artifacts name #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/Benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

- name: Download benchmark from most recent release
run: |
just bench-download ${{ runner.os }} ${{ matrix.hypervisor }}
just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} ${{ matrix.cpu }}
continue-on-error: true
working-directory: ./src/hyperlight_wasm
env:
Expand All @@ -74,6 +74,6 @@ jobs:
- name: Upload Benchmarks
uses: actions/upload-artifact@v4
with:
name: benchmarks_${{runner.os}}_${{matrix.hypervisor}}
name: benchmarks_${{runner.os}}_${{matrix.hypervisor}}_${{ matrix.cpu }}
path: ./target/criterion/
if-no-files-found: error
54 changes: 14 additions & 40 deletions .github/workflows/CreateRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,59 +73,33 @@ jobs:
- name: Build rust wasm modules
run: just build-rust-wasm-examples ${{ env.CONFIG }}
shell: bash
- name: Download Benchmarks (Windows)
- name: Download all benchmarks
uses: actions/download-artifact@v4
with:
name: benchmarks_Windows_whp
path: benchmarks_Windows_whp
- name: Download Benchmarks (Linux hyperv)
uses: actions/download-artifact@v4
with:
name: benchmarks_Linux_hyperv
path: benchmarks_Linux_hyperv
- name: Download Benchmarks (Linux kvm)
uses: actions/download-artifact@v4
with:
name: benchmarks_Linux_kvm
path: benchmarks_Linux_kvm
pattern: benchmarks_*
- name: Archive benchmarks
run: |
tar -zcvf benchmarks_Windows_whp.tar.gz benchmarks_Windows_whp
tar -zcvf benchmarks_Linux_hyperv.tar.gz benchmarks_Linux_hyperv
tar -zcvf benchmarks_Linux_kvm.tar.gz benchmarks_Linux_kvm
- name: Install github-cli
run: |
$ProgressPreference = 'SilentlyContinue'
# check if gh cli is installed
$installed = [bool](Get-Command -ErrorAction Ignore -Type Application gh)
if ($installed) { Write-Host "gh cli already installed"; exit 0 }
# download and install gh cli
Invoke-WebRequest https://github.com/cli/cli/releases/download/v2.50.0/gh_2.50.0_windows_amd64.msi -OutFile gh.msi
msiexec.exe /i gh.msi /quiet /l log.txt | Out-Null
Write-Host "msiexec exited with code $LASTEXITCCODE"
if ($LASTEXITCODE -ne 0) { cat log.txt; exit 1 }
for BENCHMARK in benchmarks_*; do
tar -zcvf $BENCHMARK.tar.gz $BENCHMARK
done
- name: Create pre-release
if: ${{ github.ref=='refs/heads/main' }}
run: |
echo "PWD: $PWD"
ls -alR
gh release delete dev-latest -y --cleanup-tag || true
gh release create dev-latest -t "Latest Development Build From Dev Branch" --latest=false -p \
benchmarks_Windows_whp.tar.gz \
benchmarks_Linux_hyperv.tar.gz \
benchmarks_Linux_kvm.tar.gz
echo "PWD: $PWD"
ls -alR
gh release delete dev-latest -y --cleanup-tag || true
gh release create dev-latest -t "Latest Development Build From Dev Branch" --latest=false -p \
benchmarks_*.tar.gz
env:
GH_TOKEN: ${{ github.token }}
shell: bash
- name: Create Release
if: ${{ contains(github.ref, 'refs/heads/release/') }}
run: |
echo "PWD: $PWD"
ls -alR
gh release create v${{ env.HYPERLIGHTWASM_VERSION }} -t "Release v${{ env.HYPERLIGHTWASM_VERSION }}" --generate-notes \
benchmarks_Windows_whp.tar.gz \
benchmarks_Linux_hyperv.tar.gz \
benchmarks_Linux_kvm.tar.gz
echo "PWD: $PWD"
ls -alR
gh release create v${{ env.HYPERLIGHTWASM_VERSION }} -t "Release v${{ env.HYPERLIGHTWASM_VERSION }}" --generate-notes \
benchmarks_*.tar.gz
env:
GH_TOKEN: ${{ github.token }}
shell: bash
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/dep_build_wasm_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,31 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/wasm-clang-builder
- name: Calculate ghcr cache destination
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
else
echo "CACHE_TO=type=local,dest=/tmp/wasm-clang-builder-cache/" >> $GITHUB_ENV
echo "DO_PUSH=false" >> $GITHUB_ENV
fi
- name: Build and push wasm-clang-builder
# Only push if not from a fork, not from pull request, and not from dependabot
uses: docker/build-push-action@v6
with:
context: src/wasmsamples
file: src/wasmsamples/dockerfile
load: true
push: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) && github.actor != 'dependabot[bot]' }}
push: ${{ env.DO_PUSH }}
build-args: |
WASI_SDK_VERSION_FULL=20.0
GCC_VERSION=12
tags: ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:buildcache,mode=max
cache-to: ${{ env.CACHE_TO }}
- name: Build Modules
run: |
for FILENAME in $(find . -name '*.c')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dep_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:

- name: Download benchmarks from "latest"
run: |
just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} dev-latest
just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} ${{ matrix.cpu }} dev-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
Expand Down
6 changes: 3 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ bench-ci baseline target=default-target features="":
cd src/hyperlight_wasm && cargo bench --profile={{ if target == "debug" {"dev"} else { target } }} {{ if features =="" {''} else { "--features " + features } }} -- --verbose --save-baseline {{baseline}}
bench target=default-target features="":
cd src/hyperlight_wasm && cargo bench --profile={{ if target == "debug" {"dev"} else { target } }} {{ if features =="" {''} else { "--features " + features } }} -- --verbose
bench-download os hypervisor tag="":
gh release download {{ tag }} -D ./src/hyperlight_wasm/target/ -p benchmarks_{{ os }}_{{ hypervisor }}.tar.gz
bench-download os hypervisor cpu tag="":
gh release download {{ tag }} -D ./src/hyperlight_wasm/target/ -p benchmarks_{{ os }}_{{ hypervisor }}_{{ cpu }}.tar.gz
mkdir {{ mkdir-arg }} ./src/hyperlight_wasm/target/criterion
tar -zxvf ./src/hyperlight_wasm/target/benchmarks_{{ os }}_{{ hypervisor }}.tar.gz -C ./src/hyperlight_wasm/target/criterion/ --strip-components=1
tar -zxvf ./src/hyperlight_wasm/target/benchmarks_{{ os }}_{{ hypervisor }}_{{ cpu }}.tar.gz -C ./src/hyperlight_wasm/target/criterion/ --strip-components=1
Loading