Skip to content

ci: run the checks of the Makefile on GitHub Actions - #23

Open
xaionaro wants to merge 3 commits into
mainfrom
github-actions
Open

xaionaro wants to merge 3 commits into
mainfrom
github-actions

Conversation

@xaionaro

Copy link
Copy Markdown
Member

Just enabling the existing auto-tests in the CI via GitHub Actions.

@xaionaro
xaionaro force-pushed the github-actions branch 2 times, most recently from 74c75b6 to c79a963 Compare October 15, 2026 10:44
Nothing runs the checks of the Makefile on a change before it lands.
Add a workflow that runs them on ubuntu-24.04 for every pull request
and every push to main:
- lint-and-test: make setup, then make -k -o qemu, which runs every
  check but the QEMU boots.
- qemu: the packages of tests/qemu/ubuntu-packages, the udev rule
  that GitHub documents to open /dev/kvm to the runner user, then
  make qemu. The kernel RPMs and DriverSample.efi are cached under a
  key of the files that pin them and saved only when the job passes,
  as run.sh reuses DriverSample.efi unchecked. The logs of failed
  boots are uploaded.
The actions are pinned to commit SHAs, and the token can only read
the repository.

Signed-off-by: Dmitrii Okunev <xaionaro@meta.com>
On some GitHub runners every boot failed its health checks although
all tests passed: run.sh boots the guest with -cpu host, and on Intel
hosts that hide IBRS from the guest, Linux 6.17 logs a RETBleed error
while it boots (arch/x86/kernel/cpu/bugs.c, retbleed_update_mitigation).
init failed on any kernel error since boot, so what the host's CPU
makes the kernel log decided the result.

init now writes a start record to /dev/kmsg and snapshots the taint
and the warning count right before the test, then fails on a kernel
error after the start record, on a changed taint or warning count, or
when the start record is gone. The warning count catches a WARN whose
taint bit the boot already set. The values are read with cat, as
busybox read gets only the first digit of a sysctl.

run.sh prints the host's CPU model with the tool versions, which the
logs of the failing runner lacked.

Signed-off-by: Dmitrii Okunev <xaionaro@meta.com>
make lint test did not work, as the Makefile had no lint target, and
the QEMU tests were called qemu, so CI ran make -k -o qemu to run
every check but the boots. Name the checks after what they do:
- lint runs fmt, clippy-x86_64, clippy-aarch64, clippy-uefi and doc.
  qemu-lint goes: the root cargo fmt --check already covers the QEMU
  test crates, as they are workspace members; doc now documents the
  whole workspace, publish-hiidb included; and the UEFI clippy of
  publish-hiidb becomes clippy-uefi.
- test-e2e-qemu, formerly qemu, boots the scenarios; it no longer
  runs the lints first, as test does not either.
CI runs make -k lint test and make test-e2e-qemu, in jobs of those
names.

Signed-off-by: Dmitrii Okunev <xaionaro@meta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant