Skip to content

ci(coverage): add on-demand coverage workflows [4/4] - #8592

Closed
jainprad wants to merge 1 commit into
users/jainprad/coverage/pr3-plumbingfrom
users/jainprad/coverage/pr4-workflows
Closed

jainprad wants to merge 1 commit into
users/jainprad/coverage/pr3-plumbingfrom
users/jainprad/coverage/pr4-workflows

Conversation

@jainprad

@jainprad jainprad commented Sep 29, 2026 •

Copy link
Copy Markdown

Stack

Review and merge in order; each PR's diff shows only its own changes.

  1. build(coverage): add per-project code coverage build options [1/4] #8589 Build support for coverage
  2. feat(coverage): cross-repo coverage installer options and coverage docs [2/4] #8590 Coverage installer options and docs
  3. ci(coverage): plumbing for the coverage build variant and test jobs [3/4] #8591 Plumbing for the coverage build and test jobs
  4. ci(coverage): add on-demand coverage workflows [4/4] #8592 On-demand coverage workflows (this PR)

Based on #8591. Split out of #7783.

Motivation

Part 4 of 4 of the split of #7783 (code coverage): the coverage workflows, runnable on demand. Nothing triggers them automatically.

GitHub issue: #6572

Technical Details

  • .github/workflows/multi_arch_ci_coverage_linux.yml: the entry point, runnable by workflow_dispatch or a cross-repo workflow_call. It computes the coverage matrix, builds compiler-runtime and an instrumented math-libs, then fans out to the report workflow per project and GPU family.
  • .github/workflows/multi_arch_ci_coverage_report.yml: per project, installs the baseline and swaps in only that project's instrumented libraries. It then runs the tests, merges the profiles, and publishes lcov, a text summary and an HTML report, plus Codecov when CODECOV_TOKEN is set.
  • build_tools/github_actions/configure_coverage_ci.py:
    • CI matrix mode: project selection with the rocm_libraries_all / rocm_systems_all / all aliases, the job matrix, and the CMake coverage options;
    • per-project CI metadata in the registry: stage, test component, object globs, fetch args and Codecov flag.
  • build_tools/github_actions/merge_coverage_report.py: merges .profraw files with llvm-profdata and renders lcov, a text summary and HTML with llvm-cov.

Compared with #7783, the registry is trimmed to hipRAND and hipDNN. The handling only other projects need is deferred until those projects are onboarded: unsupported and blocked projects, sibling test subprojects (extra_cmake_targets), and stages without a build job. Deriving the registry from the build system is tracked in #7782.

Test Plan

  • configure_coverage_ci_test.py and merge_coverage_report_test.py.
  • workflow_permissions_test.py and workflow_dispatch_inputs_test.py.
  • pre-commit, including actionlint.
  • configure_coverage_ci.py --print with PROJECTS_TO_TEST=hiprand and with an empty selection.
  • To do before this leaves draft: workflow_dispatch only appears once a workflow is on the default branch. So run it through a cross-repo workflow_call pinned to this branch, once with baseline_run_id set to a recent nightly and once without, and link the runs here.

Test Result

Submission Checklist

- multi_arch_ci_coverage_linux.yml: entry point, runnable by
  workflow_dispatch or cross-repo workflow_call. Computes the coverage
  matrix, builds compiler-runtime and an instrumented math-libs, then fans
  out to the report workflow per project and GPU family.
- multi_arch_ci_coverage_report.yml: per project, runs the tests against
  the instrumented build, merges the profiles and publishes lcov, a text
  summary and an HTML report, plus Codecov when a token is set.
- configure_coverage_ci.py: CI matrix mode, and the per-project CI metadata
  in the registry (stage, test component, object globs, fetch args).
- merge_coverage_report.py: merges profraw files and renders the reports.

The registry starts with hipRAND and hipDNN. Handling that only other
projects need (unsupported and blocked projects, sibling test subprojects,
stages without a build job) comes with those projects.

Split out of #7783.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment on lines +130 to +139
- name: Checking out repository
id: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
timeout-minutes: 15
with:
# Cross-repo callers pass ROCm/TheRock + ref; same-repo defaults to github.repository.
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref }}

- name: Setting up Python
Comment on lines +272 to +279
- name: Checking out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
timeout-minutes: 15
with:
# Cross-repo callers pass ROCm/TheRock + ref; same-repo defaults to github.repository.
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref }}
- name: Evaluate workflow results
Comment on lines +97 to +104
- name: Checking out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
timeout-minutes: 15
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref }}

- name: Checkout CI config
@jainprad jainprad closed this Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants