[PATCH v2 14/15] github: add guest OS selection for CI testing
Daniel Gomez <[email protected]> Wed, 29 Oct 2025 13:40:56 +0100
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Message-ID | <[email protected]> |
From: Daniel Gomez <[email protected]> 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]> --- .github/actions/configure/action.yml | 22 +++++++++++++++++++++- .github/workflows/kdevops.yml | 10 ++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/actions/configure/action.yml b/.github/actions/configure/action.yml index 68c4e743..9c35b4a6 100644 --- a/.github/actions/configure/action.yml +++ b/.github/actions/configure/action.yml @@ -20,6 +20,10 @@ inputs: required: false type: string default: 'kdevops-ci' + guest_os: + required: false + type: string + default: 'default' runs: using: "composite" @@ -112,11 +116,27 @@ runs: echo "Using Linux CI configuration (4GB/8core VMs)" fi + # Configure guest OS if specified + GUEST_OS_CONFIG= + if [[ "${{ inputs.guest_os }}" != "default" ]]; then + GUEST_OS_CONFIG="defconfigs/configs/guestfs-${{ inputs.guest_os }}.config" + + if [[ ! -f "$GUEST_OS_CONFIG" ]]; then + echo "Error: Guest OS config not found: $GUEST_OS_CONFIG" + exit 1 + fi + + echo "Using guest OS configuration: $GUEST_OS_CONFIG" + else + echo "Using default guest OS from defconfig" + fi + ./scripts/kconfig/merge_config.sh \ -n .config \ defconfigs/configs/diy.config \ defconfigs/configs/ci.config \ - ${VM_CONFIG_ARG} + ${VM_CONFIG_ARG} \ + ${GUEST_OS_CONFIG} - name: Run kdevops make shell: bash diff --git a/.github/workflows/kdevops.yml b/.github/workflows/kdevops.yml index 6fc583c6..d94a7e7f 100644 --- a/.github/workflows/kdevops.yml +++ b/.github/workflows/kdevops.yml @@ -88,6 +88,15 @@ on: options: - 'kdevops-ci' - 'linux-ci' + guest_os: + description: 'Guest OS for testing' + required: false + default: 'default' + type: choice + options: + - default # Use defconfig's default (typically Debian 13 on debian hosts) + - debian-13 # Force Debian 13 Trixie + - fedora-41 # Force Fedora 41 tests: description: 'Custom test to run (for kdevops-ci mode only)' required: false @@ -231,6 +240,7 @@ jobs: uses: ./.github/actions/configure with: ci_workflow: ${{ matrix.ci_workflow }} + guest_os: ${{ github.event.inputs.guest_os || 'default' }} kernel_ref: >- ${{ github.event_name == 'schedule' && needs.generate_kernel_ref.outputs.kernel_ref -- 2.51.0