Skip to content

github-actions: Upload kselftests/LTP tarballs; add no_pr dispatch input#1283

Open
kemotaha wants to merge 4 commits into
mainfrom
gha/upload-test-suite-tarballs
Open

github-actions: Upload kselftests/LTP tarballs; add no_pr dispatch input#1283
kemotaha wants to merge 4 commits into
mainfrom
gha/upload-test-suite-tarballs

Conversation

@kemotaha
Copy link
Copy Markdown
Collaborator

@kemotaha kemotaha commented May 29, 2026

Summary

Follow-on to #1225 (kernel binaries tarball). Three changes to the multi-arch workflow:

  1. New upload-artifact steps publish the kselftests and LTP install-tree tarballs produced by ctrliq/kernel-container-build#33:
    • kselftests-binaries-<arch>output/kselftests-*.tar.xz
    • ltp-binaries-<arch>output/ltp-*.tar.xz
      Both honor existing skip_kselftests / skip_ltp metadata; both use if-no-files-found: warn so a missing tarball is non-fatal.
  2. New workflow_dispatch input no_pr (bool, default false) lets manual reruns suppress the create-pr job — useful for integration testing without producing a spurious created-by-kernelci PR. workflow_run events (normal CI) are unaffected.
  3. Tightened create-pr if-condition to honor no_pr when set on a workflow_dispatch event.

Order of operations

Land ctrliq/kernel-container-build#33 first. Until that's merged, the upload step will find no file in output/ and log a warning (non-fatal). Once kernel-container-build is producing the tarballs, this PR can land.

Cleanup before merge

The TEST ONLY commit on this branch (832854d7) pins the workflow's kernel-container-build checkout to the extract-test-suite-tarballs branch so we can exercise the change via workflow_dispatch before either side merges. Revert that commit before flipping out of draft — or use "Squash and merge" and hand-edit the diff to drop it.

Wiki note

The Kernel CI Workflow Confluence page should be updated post-merge to reflect:

  • New artifacts (kernel-binaries-<arch>, kselftests-binaries-<arch>, ltp-binaries-<arch>)
  • LTP stage (test-ltp + compare-ltp jobs aren't currently documented)
  • workflow_dispatch usage incl. run_id and the new no_pr input
  • Helper script links should reference main instead of automated-testing-v1

Test plan

  • workflow_dispatch against this branch with no_pr=true and a real PR's run_id: verify kselftests-binaries-<arch> and ltp-binaries-<arch> appear in the Artifacts section, and that no PR is created/edited
  • Confirm the primary qcow2 artifacts still upload alongside

🤖 Generated with Claude Code

Test results

Validated end-to-end via workflow_dispatch on https://github.com/ctrliq/kernel-src-tree/actions/runs/26651444112 (3h36m, full pipeline).

Job Result
Build (x86_64 + aarch64) ✓ success
Boot verification (both arches) ✓ success
Kselftests (both arches) ✓ success
LTP (both arches) ✓ success
Compare kselftests / LTP (both) ✓ success
Create Pull Request skipped (no_pr=true honored)

Artifacts produced (all expected, plus existing qcow2 / logs / boot-logs):

  • kernel-binaries-x86_64 86 MB / kernel-binaries-aarch64 62 MB
  • kselftests-binaries-x86_64 46 MB / kselftests-binaries-aarch64 45 MB
  • ltp-binaries-x86_64 137 MB / ltp-binaries-aarch64 135 MB

PR-creation suppression confirmed: no new created-by-kernelci PR was created during the test run.

kemotaha and others added 2 commits May 29, 2026 11:07
Three changes to the multi-arch workflow:

1. Two new upload-artifact steps publish the kselftests and LTP install
   tree tarballs produced by ctrliq/kernel-container-build's Steps 3.5
   and 4.5 (see the paired PR there):
     - kselftests-binaries-<arch>:  output/kselftests-*.tar.xz
     - ltp-binaries-<arch>:         output/ltp-*.tar.xz
   Both honor the existing skip_kselftests / skip_ltp metadata and use
   if-no-files-found: warn so a missing tarball is non-fatal.

2. A new workflow_dispatch input no_pr (bool, default false) lets
   manual reruns suppress the PR creation/update step. Useful for
   integration testing without producing a spurious "[BASE_BRANCH]
   ..." PR labeled created-by-kernelci.

3. The create-pr job's if-condition now includes
   `(github.event_name != 'workflow_dispatch' || !inputs.no_pr)` so
   normal workflow_run events are unaffected and manual dispatches
   honor the new opt-out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
DO NOT MERGE — revert before opening for review.

Pins the workflow's kernel-container-build checkout to the
extract-test-suite-tarballs branch so workflow_dispatch can exercise
the new kselftests/LTP tarball extraction steps end-to-end before
ctrliq/kernel-container-build#33 lands on main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 29, 2026 17:08
Copy link
Copy Markdown

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 publish additional test-suite tarball artifacts and allow manual dispatch runs to skip PR creation.

Changes:

  • Adds kselftests-binaries-<arch> and ltp-binaries-<arch> artifact uploads.
  • Adds a workflow_dispatch no_pr input.
  • Updates the create-pr job condition to honor no_pr for manual runs.

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

with:
repository: ctrliq/kernel-container-build
ref: main
ref: extract-test-suite-tarballs
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed by reverting the TEST ONLY commit in b8c2bf9. All five ref: lines now point back to main.

with:
repository: ctrliq/kernel-container-build
ref: main
ref: extract-test-suite-tarballs
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed by reverting the TEST ONLY commit in b8c2bf9. All five ref: lines now point back to main.

with:
repository: ctrliq/kernel-container-build
ref: main
ref: extract-test-suite-tarballs
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed by reverting the TEST ONLY commit in b8c2bf9. All five ref: lines now point back to main.

with:
repository: ctrliq/kernel-container-build
ref: main
ref: extract-test-suite-tarballs
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed by reverting the TEST ONLY commit in b8c2bf9. All five ref: lines now point back to main.

with:
repository: ctrliq/kernel-container-build
ref: main
ref: extract-test-suite-tarballs
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed by reverting the TEST ONLY commit in b8c2bf9. All five ref: lines now point back to main.

Copilot AI review requested due to automatic review settings June 1, 2026 15:03
Copy link
Copy Markdown

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +1208 to +1212
if: |
always() &&
needs.build.result == 'success' &&
needs.boot.result == 'success'
needs.boot.result == 'success' &&
(github.event_name != 'workflow_dispatch' || !inputs.no_pr)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@kemotaha in general PR looks good but this comment from Copilot seems like worth looking at.
We can use something like inputs.no_pr != true

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 52b4808: switched from !inputs.no_pr to inputs.no_pr != true per the suggestion below, which is robust against the boolean/string coercion behavior you flagged.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done in 52b4808 — using inputs.no_pr != true as you suggested.

@shreeya-patel98
Copy link
Copy Markdown
Collaborator

I have triggered two runs with create PR true and false respectively for testing purpose
https://github.com/ctrliq/kernel-src-tree/actions/runs/26953633104
https://github.com/ctrliq/kernel-src-tree/actions/runs/26953697593

Address review feedback on the no_pr guard: `!inputs.no_pr` can be
ambiguous in GitHub Actions expressions because boolean inputs may
arrive as the string 'true'/'false' in some contexts, where the
negation `!` would always evaluate to false (strings are truthy).
Switch to explicit `inputs.no_pr != true` comparison which is robust
across both boolean and string forms.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kemotaha kemotaha marked this pull request as ready for review June 4, 2026 23:04
Copilot AI review requested due to automatic review settings June 4, 2026 23:04
Copy link
Copy Markdown

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +1205 to +1209
# The (workflow_dispatch || no_pr != true) clause lets manual reruns opt
# out of PR creation by passing -f no_pr=true. workflow_run events (normal
# CI) are unaffected since inputs.no_pr is not set there. The explicit
# `!= true` form avoids the boolean/string coercion ambiguity that affects
# `!inputs.no_pr` in some GHA expression contexts.
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.

3 participants