11# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
22
3- # Reusable workflow to run benchmarks on a single hypervisor/cpu combination.
3+ # Reusable workflow to run benchmarks on a single hypervisor/cpu_vendor combination.
44#
55# Baseline comparison:
66# The workflow supports two mutually exclusive ways to load a baseline for
2020#
2121# Artifact upload:
2222# Benchmark results are always uploaded as workflow artifacts named
23- # benchmarks_<OS>_<hypervisor>_<cpu >. The retention_days input controls
23+ # benchmarks_<OS>_<hypervisor>_<cpu_vendor >. The retention_days input controls
2424# how long they are kept (default: 5 days).
2525
2626name : Run Benchmarks
3737 description : Hypervisor for this run (passed from caller matrix)
3838 required : true
3939 type : string
40- cpu :
41- description : CPU architecture for the build (passed from caller matrix)
40+ cpu_vendor :
41+ description : CPU vendor for the build, amd or intel (passed from caller matrix)
42+ required : true
43+ type : string
44+ arch :
45+ description : CPU architecture for the build, X64 or arm64 (passed from caller matrix)
4246 required : true
4347 type : string
4448 baseline_tag :
@@ -72,14 +76,15 @@ jobs:
7276 run-benchmarks :
7377 if : ${{ inputs.docs_only == 'false' }}
7478 timeout-minutes : ${{ fromJSON(vars.BENCHMARKS_JOB_TIMEOUT || '60') }}
75- runs-on : ${{ fromJson(
76- format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}", "JobId=run-benchmarks-{3}-{4}-{5}"]',
77- inputs.hypervisor == 'hyperv-ws2025' && 'Windows' || 'Linux',
78- inputs.hypervisor == 'hyperv-ws2025' && 'win2025' || inputs.hypervisor == 'mshv3' && 'azlinux3-mshv' || inputs.hypervisor,
79- inputs.cpu,
80- github.run_id,
81- github.run_number,
82- github.run_attempt)) }}
79+ runs-on : ${{ fromJson(inputs.arch == 'X64'
80+ && format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}", "JobId=run-benchmarks-{3}-{4}-{5}"]',
81+ inputs.hypervisor == 'hyperv-ws2025' && 'Windows' || 'Linux',
82+ inputs.hypervisor == 'hyperv-ws2025' && 'win2025' || inputs.hypervisor == 'mshv3' && 'azlinux3-mshv' || inputs.hypervisor,
83+ inputs.cpu_vendor,
84+ github.run_id,
85+ github.run_number,
86+ github.run_attempt)
87+ || '["self-hosted", "Linux", "arm64", "kvm", "ubuntu-24.04"]') }}
8388 steps :
8489 - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
8590
@@ -97,19 +102,19 @@ jobs:
97102 - name : Rust cache
98103 uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
99104 with :
100- shared-key : " ${{ runner.os }}-${{ inputs.hypervisor }}-release"
105+ shared-key : " ${{ inputs.arch }}-${{ runner.os }}-${{ inputs.hypervisor }}-release"
101106 save-if : " false"
102107
103108 - name : Download Rust guests
104109 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
105110 with :
106- name : rust-guests-X64 -release
111+ name : rust-guests-${{ inputs.arch }} -release
107112 path : src/tests/rust_guests/bin/release/
108113
109114 - name : Download C guests
110115 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
111116 with :
112- name : c-guests-X64 -release
117+ name : c-guests-${{ inputs.arch }} -release
113118 path : src/tests/c_guests/bin/release/
114119
115120 - name : Build
@@ -119,15 +124,15 @@ jobs:
119124 if : ${{ inputs.baseline_run_id != '' }}
120125 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
121126 with :
122- name : benchmarks_${{ runner.os }}_${{ inputs.hypervisor }}_${{ inputs.cpu }}
127+ name : benchmarks_${{ runner.os }}_${{ inputs.hypervisor }}_${{ inputs.cpu_vendor }}
123128 path : ./target/criterion/
124129 run-id : ${{ inputs.baseline_run_id }}
125130 github-token : ${{ secrets.GITHUB_TOKEN }}
126131 continue-on-error : true
127132
128133 - name : Download baseline from release
129134 if : ${{ inputs.baseline_run_id == '' }}
130- run : just bench-download ${{ runner.os }} ${{ inputs.hypervisor }} ${{ inputs.cpu }} ${{ inputs.baseline_tag }}
135+ run : just bench-download ${{ runner.os }} ${{ inputs.hypervisor }} ${{ inputs.cpu_vendor }} ${{ inputs.baseline_tag }}
131136 env :
132137 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
133138 continue-on-error : true
@@ -137,7 +142,7 @@ jobs:
137142
138143 - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
139144 with :
140- name : benchmarks_${{ runner.os }}_${{ inputs.hypervisor }}_${{ inputs.cpu }}
145+ name : benchmarks_${{ runner.os }}_${{ inputs.hypervisor }}_${{ inputs.cpu_vendor }}
141146 path : ./target/criterion/
142147 if-no-files-found : error
143148 retention-days : ${{ inputs.retention_days }}
0 commit comments