ci: port CentOS Stream test to GitHub Actions using Lima

Move the CentOS Stream 9 based test from Cirrus CI to GitHub
Actions using Lima VMs. Expand coverage to a matrix of CentOS
Stream 9 and 10 on x86_64.

Extract the common Lima VM setup steps (Lima install, image
caching, KVM enablement, VM start, source copy) into a reusable
composite action at .github/actions/lima-vm-setup.

Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2026-03-15 14:25:56 +00:00 committed by Radostin Stoyanov
parent cb8d1bec11
commit 07d496e43d
4 changed files with 97 additions and 49 deletions

View file

@ -0,0 +1,35 @@
name: 'Lima VM Setup'
description: 'Install Lima, enable KVM, start a VM and copy the CRIU source into it'
inputs:
template:
description: 'Lima VM template name (e.g. fedora, centos-stream-9)'
required: true
cache-key-prefix:
description: 'Prefix for the Lima image cache key'
required: true
runs:
using: composite
steps:
- name: Install Lima
uses: lima-vm/lima-actions/setup@v1
- name: Cache Lima images
uses: actions/cache@v4
with:
path: ~/.cache/lima
key: ${{ inputs.cache-key-prefix }}-${{ github.sha }}
restore-keys: ${{ inputs.cache-key-prefix }}-
- name: Start VM
shell: bash
# Enable VNC display so QEMU attaches a VGA device instead of
# passing -vga none. Without it the kernel only registers a CGA
# text console and VT ioctls (TIOCSLCKTRMIOS, TIOCSWINSZ) fail,
# which breaks the zdtm/static/vt test on restore.
run: limactl start --plain --name=default --cpus=4 --memory=12 --set '.video.display = "vnc"' template://${{ inputs.template }}
- name: Copy source into VM
shell: bash
run: |
lima sudo mkdir -p /home/criu
lima sudo chown "$(lima whoami)" /home/criu
limactl copy -r . default:/home/criu

View file

@ -95,6 +95,31 @@ jobs:
ZDTM_SHARD_INDEX=${{ matrix.shard }}
ZDTM_SHARD_COUNT=4
centos-stream-test:
name: CentOS Stream ${{ matrix.version }}
# aarch64 is not supported by lima-vm/lima-actions
# https://github.com/lima-vm/lima-actions/pull/1
needs: [alpine-test]
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
matrix:
version: [9, 10]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/lima-vm-setup
with:
template: centos-stream-${{ matrix.version }}
cache-key-prefix: lima-centos-stream-${{ matrix.version }}
- name: Setup VM
run: lima sudo /home/criu/scripts/ci/lima.sh centos-stream-setup
- name: Show VM info
run: |
lima uname -a
lima cat /proc/cmdline
- name: Run tests
run: ssh -tt lima-default sudo -i /home/criu/scripts/ci/lima.sh centos-stream-test
compat-test:
needs: [alpine-test]
runs-on: ubuntu-22.04
@ -187,21 +212,10 @@ jobs:
name: Next
steps:
- uses: actions/checkout@v4
- name: Install Lima
uses: lima-vm/lima-actions/setup@v1
- name: Cache Lima images
uses: actions/cache@v4
- uses: ./.github/actions/lima-vm-setup
with:
path: ~/.cache/lima
key: lima-fedora-${{ github.sha }}
restore-keys: lima-fedora-
- name: Start Fedora VM
run: limactl start --plain --name=default --cpus=4 --memory=12 template://fedora
- name: Copy source into VM
run: |
lima sudo mkdir -p /home/criu
lima sudo chown "$(lima whoami)" /home/criu
limactl copy -r . default:/home/criu
template: fedora
cache-key-prefix: lima-fedora
- name: Setup VM
run: lima sudo /home/criu/scripts/ci/lima.sh ${{ matrix.variant }}-setup
- name: Reboot VM to activate new kernel