Skip to content

Commit a787e60

Browse files
committed
workflows: add guest OS selection for CI testing
Add support for selecting guest OS in GitHub Actions CI workflows to enable testing with different distributions. This allows manual validation of guest OS-specific fixes and provides foundation for automated multi-OS testing. The implementation adds a workflow_dispatch input for guest OS selection that gets merged into the kdevops configuration using the existing merge_config.sh mechanism. Config fragments override the defconfig's default guest OS choice. Changes: - Add guest_os workflow_dispatch input with three options: * default: Use defconfig's default guest OS (typically Debian 13) * debian-13: Force Debian 13 Trixie guest * fedora-41: Force Fedora 41 guest - Update configure action to accept guest_os input and conditionally merge the corresponding guestfs config fragment when non-default value is selected - Create guestfs-debian-13.config fragment for Debian 13 guest configuration to complement existing guestfs-fedora-41.config This enables manual testing of Fedora guests to validate the locale and package installation fixes from commits d901509 and 3ec8bf0. The guest OS parameter defaults to 'default' to maintain backward compatibility with existing workflows. Future enhancement: Add matrix strategy to automatically test both Debian and Fedora guests in scheduled CI runs. Link: https://lore.kernel.org/kdevops/[email protected]/ [1] Generated-by: Claude AI Signed-off-by: Daniel Gomez <[email protected]>
1 parent c900a39 commit a787e60

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-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
@@ -87,6 +87,15 @@ on:
8787
options:
8888
- 'kdevops-ci'
8989
- 'linux-ci'
90+
guest_os:
91+
description: 'Guest OS for testing'
92+
required: false
93+
default: 'default'
94+
type: choice
95+
options:
96+
- default # Use defconfig's default (typically Debian 13 on debian hosts)
97+
- debian-13 # Force Debian 13 Trixie
98+
- fedora-41 # Force Fedora 41
9099
tests:
91100
description: 'Custom test to run (for kdevops-ci mode only)'
92101
required: false
@@ -230,6 +239,7 @@ jobs:
230239
uses: ./.github/actions/configure
231240
with:
232241
ci_workflow: ${{ matrix.ci_workflow }}
242+
guest_os: ${{ github.event.inputs.guest_os || 'default' }}
233243
kernel_ref: >-
234244
${{
235245
github.event_name == 'schedule' && needs.generate_kernel_ref.outputs.kernel_ref
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_GUESTFS_DEBIAN=y
2+
CONFIG_GUESTFS_DEBIAN_TRIXIE=y
3+
CONFIG_VIRT_BUILDER_OS_VERSION="debian-13"

0 commit comments

Comments
 (0)