-
Notifications
You must be signed in to change notification settings - Fork 5
93 lines (80 loc) · 2.73 KB
/
dep_benchmarks.yml
File metadata and controls
93 lines (80 loc) · 2.73 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Run benchmarks
on:
workflow_call:
inputs:
download-benchmarks:
required: true
type: boolean
upload-benchmarks:
required: true
type: boolean
environment:
required: false
type: string
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: FULL
permissions:
id-token: write
contents: read
jobs:
benchmark:
environment: ${{ inputs.environment }}
strategy:
fail-fast: true
matrix:
build: [windows-2025-release, linux-kvm-release, linux-hyperv3-release]
include:
- build: windows-2025-release
os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2025-amd"]
hypervisor: whp
- build: linux-kvm-release
os: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd"]
hypervisor: kvm
- build: linux-hyperv3-release
os: [self-hosted, Linux, X64, "1ES.Pool=hld-azlinux3-mshv-amd"]
hypervisor: hyperv3
runs-on: ${{ fromJson(
format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-amd", "JobId=benchmark-{2}-{3}-{4}-{5}"]',
matrix.hypervisor == 'whp' && 'Windows' || 'Linux',
matrix.hypervisor == 'whp' && 'win2025' || matrix.hypervisor == 'hyperv3' && 'azlinux3-mshv' || 'kvm',
matrix.build,
github.run_id,
github.run_number,
github.run_attempt)) }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: hyperlight-dev/ci-setup-workflow@v1.9.0
with:
rust-toolchain: "1.89"
- name: Install github-cli (Azure Linux)
if: runner.os == 'Linux' && matrix.hypervisor == 'mshv3'
run: sudo dnf install gh -y
- name: Install github-cli (Linux ubuntu)
if: runner.os == 'Linux' && matrix.hypervisor == 'kvm'
run: sudo apt install gh -y
- name: Build
run: |
just build-rust release
## Download benchmarks from "latest" release
- name: Download benchmarks from latest release
run: |
just bench-download ${{ runner.os }} ${{ matrix.hypervisor }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
if: ${{ inputs.download-benchmarks }}
- name: Run benchmarks
run: |
just bench-ci dev release
working-directory: ./src/hyperlight-js
- name: Upload benchmarks
uses: actions/upload-artifact@v7
with:
name: benchmarks_${{runner.os}}_${{matrix.hypervisor}}
path: ./target/criterion/
if-no-files-found: error
if: ${{ inputs.upload-benchmarks }}