Files
komorebi/.github/workflows/_vm.yaml
T
LGUG2Z 996330f19b fix(ci): draw the host of a VM suite again when it has no KVM, in the same run
A hosted runner of the ubuntu-24.04 pool is not promised nested virtualization, and
3 of the 16 suites of run 42182554717 failed the check of /dev/kvm. rerun-no-kvm.yaml
could not help: a workflow_run workflow runs only from the default branch, where the
file is not, and a run cannot rerun its own failed jobs while it is in progress.

The step "Enable KVM" of the nix action is now the only one that enables KVM
(enable_kvm of install-nix-action is off), runs before the disk and the install,
waits for udev to settle and polls /dev/kvm for 30 seconds instead of testing it
once, 42 ms after an asynchronous udevadm trigger, and prints what tells a missing
device from a rule that was not applied yet. With defer-no-kvm a host without KVM
is an output, not a failure.

_vm.yaml calls _vm-attempt.yaml up to three times: the suites that found no KVM are
listed through the artifacts of the run and run again on new machines, and the last
attempt fails them. vm-fast and vm-slow are calls of it. rerun-no-kvm.yaml is
removed.
2026-11-06 09:18:43 -08:00

67 lines
1.9 KiB
YAML

# The KDE VM suites of a tier, with the draw of the host repeated for the ones that found no KVM.
#
# GitHub documents hardware acceleration on its Linux runners, and does not promise it of every host of
# the pool (docs/dev/ci.md, "KVM"). A suite whose machine has no /dev/kvm is run again on a new machine,
# in the attempt after, up to three in all. Everything is in this one run, so that it works on any
# branch and any event, and the check that a ruleset requires is the result of this workflow call: green
# when every suite ran and passed, red when a suite failed, or when no machine had KVM in three draws.
#
# The caller grants `actions: read`, which the planning of the later attempts needs.
name: vm
on:
workflow_call:
inputs:
suites:
description: The suites of the tier, as a JSON list
type: string
required: true
slow:
description: The slow tier
type: boolean
default: false
permissions:
contents: read
jobs:
attempt-1:
permissions:
contents: read
actions: read
uses: ./.github/workflows/_vm-attempt.yaml
with:
suites: ${{ inputs.suites }}
attempt: 1
slow: ${{ inputs.slow }}
defer-no-kvm: true
secrets: inherit
attempt-2:
needs: [attempt-1]
if: ${{ !cancelled() && needs.attempt-1.result != 'skipped' }}
permissions:
contents: read
actions: read
uses: ./.github/workflows/_vm-attempt.yaml
with:
attempt: 2
slow: ${{ inputs.slow }}
defer-no-kvm: true
secrets: inherit
# the last draw: a host with no KVM fails the suite
attempt-3:
needs: [attempt-2]
if: ${{ !cancelled() && needs.attempt-2.result != 'skipped' }}
permissions:
contents: read
actions: read
uses: ./.github/workflows/_vm-attempt.yaml
with:
attempt: 3
slow: ${{ inputs.slow }}
defer-no-kvm: false
secrets: inherit