Repository navigation
112 lines (102 loc) · 4.61 KB
/
Copy pathlab.yml
File metadata and controls
112 lines (102 loc) · 4.61 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
name: Lab
# A probe of spin-machine-dev lab, run on the bench fleet (spin-stack/ci, one instance type) over
# the trees the dispatch names: `spin-machine-dev lab dispatch` is how a person starts one, and
# `lab show RUN_ID` reads what it found (docs/cli.md).
#
# A workflow and not a laptop because a boot time is only worth comparing on a quiet host, and a
# developer's machine is not one: three runs of one kernel on one read 59.5, 96.8 and 167.7 ms,
# and 61 ms against 105 ms minutes apart on 2026-09-29, a hybrid CPU putting the vCPU on an
# efficiency core. The runner is the host report.yml measures releases on.
#
# trees is `NAME=SPEC; NAME=SPEC`, each SPEC lab tree's flags - a release, a Kernel or QEMU run's
# build in it, this checkout's spin-machine, an edit of every overlay - made on the runner, every
# part of each named in its manifest and in the result. The probe boots them interleaved, the only
# comparison this runner's minute-to-minute drift leaves honest. check:TARGET runs boot:TARGET, a
# pass/fail check or a probe still a Go test, on the first tree instead. It is not a sandbox:
# whoever can dispatch this can push code that runs on the same runner.
on:
workflow_dispatch:
inputs:
probe:
description: "A spin-machine-dev lab probe, or check:TARGET for boot:TARGET on the first tree"
required: true
type: choice
options:
- ssh-first
- restore-first
- prestart
- initcalls
- check:firmware
- check:firmware-stages
- check:waits
- check:roms
trees:
description: "NAME=SPEC; NAME=SPEC - lab tree's flags, e.g. release=--from release; kaslr=--kernel run:44584704610"
required: true
type: string
default: "release=--from release"
reps:
description: "Repetitions of each tree"
required: false
type: string
default: "20"
options:
description: "The probe's options, NAME=VALUE; NAME=VALUE, e.g. cpus=1; memory=512; flags=--max-cpus 16 --max-memory 8192 --hotplug-disks 1"
required: false
type: string
host:
description: "Where it runs: bench (nested KVM, the default) or bench-metal (bare metal, the same CPU), spin-stack/ci's two bench fleets"
required: true
type: choice
default: bench
options:
- bench
- bench-metal
permissions:
contents: read
actions: read
# No concurrency group: the bench fleet runs one job at a time and queues the rest, and a group
# keeps one run pending and cancels the one before it, which lost two of three experiments
# queued back to back. lab dispatch waits for the run before its own instead.
# As ci.yml: go-tools' downloads ask GitHub with it, which sheds anonymous ones first.
env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
lab:
# A number compares only with one taken on the same kind of host, so the host is named.
runs-on: runs-on/fleet=${{ inputs.host }}/env=production
# bench-metal is a c8i.metal-48xl, on-demand when spot has none (spin-stack/ci#20): its bound
# is what one run may cost. 360 elsewhere, where an hour of a c8i.4xlarge's spot is cents.
timeout-minutes: ${{ inputs.host == 'bench-metal' && 60 || 360 }}
env:
GH_TOKEN: ${{ github.token }}
PROBE: ${{ inputs.probe }}
TREES: ${{ inputs.trees }}
REPS: ${{ inputs.reps }}
OPTIONS: ${{ inputs.options }}
# GitHub reads a workflow command (::error::) only at the start of a line, where Task's
# prefixed output puts the task's name.
TASK_OUTPUT: interleaved
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# Go's caches come back from the fleet's cache (its S3 bucket): the instance starts with
# nothing.
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
# The guests' vsock transport, loaded and made this user's: a module on the fleet's kernel
# that nothing loads before the first QEMU opens /dev/vhost-vsock.
- name: Load vhost_vsock
run: go tool task vsock
# Makes the trees, runs the probe, writes result.json and puts the table on the summary.
- name: Run the experiment
run: go tool task lab:ci
- name: Keep the result
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: lab-${{ github.run_id }}
path: _output/lab/result/result.json
if-no-files-found: ignore