Skip to content

Commit 2de515b

Browse files
committed
github: add guest OS selection for CI testing
Add manual guest OS selection to GitHub Actions workflows, allowing testing of distribution-specific fixes across Debian and Fedora guests. The workflow_dispatch trigger accepts 'default', 'debian-13', or 'fedora-41', merging the corresponding guestfs config fragment to override the defconfig's guest OS choice. This enables validation of cross-distribution compatibility for fixes like the locale and SELinux changes in this series. Link: https://lore.kernel.org/kdevops/[email protected]/ Generated-by: Claude AI Signed-off-by: Daniel Gomez <[email protected]>
1 parent 3f8f6c0 commit 2de515b

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/actions/configure/action.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ inputs:
2020
required: false
2121
type: string
2222
default: 'kdevops-ci'
23+
guest_os:
24+
required: false
25+
type: string
26+
default: 'default'
2327

2428
runs:
2529
using: "composite"
@@ -112,11 +116,27 @@ runs:
112116
echo "Using Linux CI configuration (4GB/8core VMs)"
113117
fi
114118
119+
# Configure guest OS if specified
120+
GUEST_OS_CONFIG=
121+
if [[ "${{ inputs.guest_os }}" != "default" ]]; then
122+
GUEST_OS_CONFIG="defconfigs/configs/guestfs-${{ inputs.guest_os }}.config"
123+
124+
if [[ ! -f "$GUEST_OS_CONFIG" ]]; then
125+
echo "Error: Guest OS config not found: $GUEST_OS_CONFIG"
126+
exit 1
127+
fi
128+
129+
echo "Using guest OS configuration: $GUEST_OS_CONFIG"
130+
else
131+
echo "Using default guest OS from defconfig"
132+
fi
133+
115134
./scripts/kconfig/merge_config.sh \
116135
-n .config \
117136
defconfigs/configs/diy.config \
118137
defconfigs/configs/ci.config \
119-
${VM_CONFIG_ARG}
138+
${VM_CONFIG_ARG} \
139+
${GUEST_OS_CONFIG}
120140
121141
- name: Run kdevops make
122142
shell: bash

.github/workflows/kdevops.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ on:
8888
options:
8989
- 'kdevops-ci'
9090
- 'linux-ci'
91+
guest_os:
92+
description: 'Guest OS for testing'
93+
required: false
94+
default: 'default'
95+
type: choice
96+
options:
97+
- default # Use defconfig's default (typically Debian 13 on debian hosts)
98+
- debian-13 # Force Debian 13 Trixie
99+
- fedora-41 # Force Fedora 41
91100
tests:
92101
description: 'Custom test to run (for kdevops-ci mode only)'
93102
required: false
@@ -231,6 +240,7 @@ jobs:
231240
uses: ./.github/actions/configure
232241
with:
233242
ci_workflow: ${{ matrix.ci_workflow }}
243+
guest_os: ${{ github.event.inputs.guest_os || 'default' }}
234244
kernel_ref: >-
235245
${{
236246
github.event_name == 'schedule' && needs.generate_kernel_ref.outputs.kernel_ref

0 commit comments

Comments
 (0)