Skip to content

github-actions: Add CBR support in kernelCI#983

Open
shreeya-patel98 wants to merge 1 commit intomainfrom
shreeya_kernelci_multiarch
Open

github-actions: Add CBR support in kernelCI#983
shreeya-patel98 wants to merge 1 commit intomainfrom
shreeya_kernelci_multiarch

Conversation

@shreeya-patel98
Copy link
Collaborator

@shreeya-patel98 shreeya-patel98 commented Mar 18, 2026

build_kernel.sh calls image_from_container.sh by name (PATH lookup), which resolves to /usr/local/bin/ in the builder container. Mount the version from kernel-container-build directly there so CI always uses the latest script.

Allow callers to skip the kselftests stage entirely. Useful for CBR (RHEL 7) where kselftest coverage is minimal due to the old kernel.

Now compare-results always runs when build+boot succeed, but gates the three kselftest-specific steps (download current logs, download baseline, compare results) on !inputs.skip_kselftests. Base branch detection always runs, ensuring create-pr has the base branch in all scenarios including force pushes with existing PRs.

Example PR #977

build_kernel.sh calls image_from_container.sh by name (PATH lookup),
which resolves to /usr/local/bin/ in the builder container. Mount the
version from kernel-container-build directly there so CI always uses
the latest script.

Allow callers to skip the kselftests stage entirely. Useful for CBR
(RHEL 7) where kselftest coverage is minimal due to the old kernel.

Now compare-results always runs when build+boot succeed, but gates
the three kselftest-specific steps (download current logs, download
baseline, compare results) on !inputs.skip_kselftests. Base branch
detection always runs, ensuring create-pr has the base branch in all
scenarios including force pushes with existing PRs.

Signed-off-by: Shreeya Patel <spatel@ciq.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the multi-arch kernel build/test GitHub Actions workflow to support CBR (RHEL 7) scenarios by making kselftests optional, ensuring the container build always uses the intended image_from_container.sh, and tightening when comparison/PR creation runs.

Changes:

  • Add skip_kselftests workflow input and gate kselftest-related jobs/steps accordingly.
  • Mount image_from_container.sh into /usr/local/bin in the builder container to avoid PATH resolving to a stale script.
  • Adjust compare-results and create-pr conditions to run when build+boot succeed, and expand valid base branch whitelist (adds ciqcbr7_9).
Comments suppressed due to low confidence (1)

.github/workflows/kernel-build-and-test-multiarch.yml:306

  • In compare-results, the workflow downloads the current kselftest artifact before determining base_branch. If the kselftest-logs-* artifact is missing/unavailable (e.g., test job failed before upload, artifact expired, or naming mismatch), actions/download-artifact will fail the job and prevent Determine base branch for comparison from running, which then breaks create-pr (it relies on needs.compare-results.outputs.base_branch). To make base-branch detection reliably run, move base-branch detection earlier and/or make the download step non-fatal (e.g., continue-on-error: true) when logs can’t be fetched.
    - name: Download current kselftest logs
      if: ${{ !inputs.skip_kselftests }}
      uses: actions/download-artifact@v4
      with:
        name: kselftest-logs-${{ matrix.arch }}
        path: output-current


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but you may need to rebase and fixup. I'm guessing it conflicts with the skip_kabi PR I merged a little bit ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants