-
Notifications
You must be signed in to change notification settings - Fork 162
69 lines (57 loc) · 2.25 KB
/
Benchmarks.yml
File metadata and controls
69 lines (57 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Benchmarks
on:
workflow_call: # This is called from CreateRelease.yml
permissions:
contents: read
jobs:
# this job requires the build-guest-binaries job be complete prior to
# its execution. this dependency should be expressed in the dependent
# workflow
benchmark:
timeout-minutes: 60
strategy:
fail-fast: true
matrix:
hypervisor: [hyperv, 'hyperv-ws2025', mshv3, kvm] # hyperv,hyperv-ws2025 are windows, mshv3 and kvm are linux
cpu: [amd, intel]
config: [release]
runs-on: ${{ fromJson(
format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}"]',
(matrix.hypervisor == 'hyperv' || matrix.hypervisor == 'hyperv-ws2025') && 'Windows' || 'Linux',
matrix.hypervisor == 'hyperv' && 'win2022' || matrix.hypervisor == 'hyperv-ws2025' && 'win2025' || matrix.hypervisor == 'mshv3' && 'azlinux3-mshv' || matrix.hypervisor,
matrix.cpu)) }}
steps:
### Setup ###
- uses: actions/checkout@v6
- uses: hyperlight-dev/ci-setup-workflow@v1.8.0
with:
rust-toolchain: "1.89"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download Rust Guest Binaries
uses: actions/download-artifact@v8
with:
name: rust-guests-release
path: src/tests/rust_guests/bin/release/
- name: Download C Guest Binaries
uses: actions/download-artifact@v8
with:
name: c-guests-release
path: src/tests/c_guests/bin/release/
### Benchmarks ###
- name: Fetch tags
run: git fetch --tags origin
- name: Download benchmarks from most recent release
run: just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} ${{ matrix.cpu }} # skip tag parameter to compare to latest stable release
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Benchmarks
run: just bench-ci main
- uses: actions/upload-artifact@v7
with:
name: benchmarks_${{runner.os}}_${{matrix.hypervisor}}_${{ matrix.cpu }}
path: ./target/criterion/
if-no-files-found: error
retention-days: 5