github-actions: Upload kselftests/LTP tarballs; add no_pr dispatch input#1283
github-actions: Upload kselftests/LTP tarballs; add no_pr dispatch input#1283kemotaha wants to merge 4 commits into
Conversation
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>
There was a problem hiding this comment.
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>andltp-binaries-<arch>artifact uploads. - Adds a
workflow_dispatchno_prinput. - Updates the
create-prjob condition to honorno_prfor 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Addressed by reverting the TEST ONLY commit in b8c2bf9. All five ref: lines now point back to main.
…-tarballs" This reverts commit 832854d.
| if: | | ||
| always() && | ||
| needs.build.result == 'success' && | ||
| needs.boot.result == 'success' | ||
| needs.boot.result == 'success' && | ||
| (github.event_name != 'workflow_dispatch' || !inputs.no_pr) |
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Done in 52b4808 — using inputs.no_pr != true as you suggested.
|
I have triggered two runs with create PR true and false respectively for testing purpose |
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>
| # 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. |
Summary
Follow-on to #1225 (kernel binaries tarball). Three changes to the multi-arch workflow:
upload-artifactsteps publish the kselftests and LTP install-tree tarballs produced by ctrliq/kernel-container-build#33:kselftests-binaries-<arch>—output/kselftests-*.tar.xzltp-binaries-<arch>—output/ltp-*.tar.xzBoth honor existing
skip_kselftests/skip_ltpmetadata; both useif-no-files-found: warnso a missing tarball is non-fatal.workflow_dispatchinputno_pr(bool, defaultfalse) lets manual reruns suppress thecreate-prjob — useful for integration testing without producing a spuriouscreated-by-kernelciPR.workflow_runevents (normal CI) are unaffected.create-prif-condition to honorno_prwhen set on aworkflow_dispatchevent.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 ONLYcommit on this branch (832854d7) pins the workflow'skernel-container-buildcheckout to theextract-test-suite-tarballsbranch so we can exercise the change viaworkflow_dispatchbefore 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:
kernel-binaries-<arch>,kselftests-binaries-<arch>,ltp-binaries-<arch>)workflow_dispatchusage incl.run_idand the newno_prinputmaininstead ofautomated-testing-v1Test plan
workflow_dispatchagainst this branch withno_pr=trueand a real PR'srun_id: verifykselftests-binaries-<arch>andltp-binaries-<arch>appear in the Artifacts section, and that no PR is created/edited🤖 Generated with Claude Code
Test results
Validated end-to-end via
workflow_dispatchon https://github.com/ctrliq/kernel-src-tree/actions/runs/26651444112 (3h36m, full pipeline).no_pr=truehonored)Artifacts produced (all expected, plus existing qcow2 / logs / boot-logs):
kernel-binaries-x86_6486 MB /kernel-binaries-aarch6462 MBkselftests-binaries-x86_6446 MB /kselftests-binaries-aarch6445 MBltp-binaries-x86_64137 MB /ltp-binaries-aarch64135 MBPR-creation suppression confirmed: no new
created-by-kernelciPR was created during the test run.