Repository navigation
173 lines (156 loc) · 5.25 KB
/
Copy pathrun-platform.yml
File metadata and controls
173 lines (156 loc) · 5.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: Run NVX platform
on:
workflow_call:
inputs:
display-name:
description: Platform name shown in the job list
required: true
type: string
runner:
description: JSON array of labels selecting the platform runner
required: true
type: string
backend:
description: NVX backend to run
required: true
type: string
release-platform:
description: Platform suffix used in release artifact names
required: true
type: string
benchmark-platform:
description: Platform identifier used for performance results
required: true
type: string
openvmm-artifact:
description: Base name of the compatible OpenVMM artifacts
required: true
type: string
nvx-rs-artifact:
description: Base name of the nvx-rs artifacts for the runner's OS
required: true
type: string
teardown-mode:
description: Guest teardown mode used by the benchmark
required: true
type: string
benchmark-cpus:
description: Host CPUs assigned to the benchmark
required: true
type: string
host-cpu-reserve:
description: Host CPU reserved from the benchmark
required: true
type: number
marker-timeout:
description: Guest readiness timeout in seconds
required: true
type: number
package-release:
description: >-
Whether the platform packages a release, which dev pushes upload for
the development release
required: true
type: boolean
secrets:
OPENVMM_DEPLOY_KEY:
description: SSH deploy key used to checkout OpenVMM
required: true
permissions:
contents: read
jobs:
run:
name: Platform / ${{ inputs.display-name }}
runs-on: ${{ fromJSON(inputs.runner) }}
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Checkout OpenVMM
uses: ./.github/actions/checkout-openvmm
with:
ssh-key: ${{ secrets.OPENVMM_DEPLOY_KEY }}
- name: Verify source pins on Linux
if: runner.os != 'Windows'
shell: bash
run: python3 scripts/nvx.py verify
- name: Verify source pins on Windows
if: runner.os == 'Windows'
shell: powershell
run: python scripts\nvx.py verify
# The runner qualification and the benchmarks boot the kernel and the
# Alpine initramfs; the release package also ships the Ubuntu and Azure
# Linux images.
- name: Download guest kernel
uses: actions/download-artifact@v8
with:
name: guest-kernel
path: build
- name: Download Alpine initramfs
uses: actions/download-artifact@v8
with:
name: guest-alpine
path: build
- name: Download Ubuntu initramfs
if: inputs.package-release
uses: actions/download-artifact@v8
with:
name: guest-ubuntu
path: build
- name: Download Ubuntu distro layer
if: inputs.package-release
uses: actions/download-artifact@v8
with:
name: guest-ubuntu-distro
path: build
- name: Download Azure Linux initramfs
if: inputs.package-release
uses: actions/download-artifact@v8
with:
name: guest-azurelinux
path: build
- name: Download OpenVMM executable
uses: actions/download-artifact@v8
with:
name: ${{ inputs.openvmm-artifact }}-executable
path: openvmm/target/release
- name: Download OpenVMM provenance
uses: actions/download-artifact@v8
with:
name: ${{ inputs.openvmm-artifact }}-provenance
path: build
- name: Make OpenVMM executable
if: runner.os != 'Windows'
shell: bash
run: chmod +x openvmm/target/release/openvmm
# Qualification verifies the downloaded OpenVMM's time ABI preflight and,
# because the benchmarks boot guests without the microVM scenarios' warp
# probes, runs the guest warp probe.
- name: Validate runner
uses: ./.github/actions/validate-runner
with:
backend: ${{ inputs.backend }}
verify-openvmm: "true"
warp-probe: "true"
- name: Run benchmark
uses: ./.github/actions/run-benchmark
with:
backend: ${{ inputs.backend }}
platform: ${{ inputs.benchmark-platform }}
runs: 10
warmups: 1
teardown-mode: ${{ inputs.teardown-mode }}
cpus: ${{ inputs.benchmark-cpus }}
host-cpu-reserve: ${{ inputs.host-cpu-reserve }}
marker-timeout: ${{ inputs.marker-timeout }}
# Pull requests package and archive the release too, so that they prove
# that it builds, but only dev pushes upload it for publication.
- name: Package release
if: inputs.package-release
uses: ./.github/actions/package-release
with:
platform: ${{ inputs.release-platform }}
nvx-rs-artifact: ${{ inputs.nvx-rs-artifact }}
upload: ${{ github.event_name == 'push' && github.ref == 'refs/heads/dev' }}