← Back to Pull requests

ci(packaging): run cpp-sdk-user find_package test after native Linux install #9677

Open
unknown opened this pull request with 338 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 02, 2026 04:47 UTC
Author

Motivation

The native Linux install job should check that an installed ROCm package works for a downstream CMake consumer, not only that the packages install. TheRock already has examples/cpp-sdk-user, which exercises the packaged find_package targets. Issue #9056 asks for the existing tests to run against installed packages.

ISSUE ID : #9056

After the native Linux packages install, the install job now configures, builds, and runs examples/cpp-sdk-user against the installed prefix. The step runs through build_tools/packaging/linux/downstream_cmake_smoke.py, which is a thin
launcher around the example's existing CMake driver.

  • The install includes amdrocm-hpc-sdk (see #9866, merged as 80522adef), so every THEROCK_ENABLE_ option in the example stays at its default of ON.

  • The launcher does not scan the prefix or pass THEROCK_ENABLE_ flags.

  • A missing package fails inside the example's find_package calls.
  • Technical Details

    Workflow (.github/workflows/test_native_linux_packages_install.yml):

  • Step find_package cmake test runs after "Package Installation Test" and before uninstall. It runs when install_prefix is set, which is the default.
  • Launcher (build_tools/packaging/linux/downstream_cmake_smoke.py):

  • Checks that the prefix is a non-empty directory, that examples/cpp-sdk-user/CMakeLists.txt and the driver exist, that the build directory is outside the prefix, and that a cmake executable is available.

  • Host compiler: <prefix>/lib/llvm/bin/clang++ when present, or --cxx-compiler. RHEL 8's GCC 8 cannot compile hip-host-test.cpp, so the prefix Clang is the default.

  • Runs examples/clean_configure_test_project.cmake with CMAKE_PREFIX_PATH=<prefix>.

  • An OS error from starting cmake is reported and returns 1, not a traceback.
  • Not covered in this change:

  • Native Windows packages and Python packages (Both were discussed/noted in review); proposing to be follow-up work.

  • Per-library install consumers beyond the example.


  • Test Plan

  • Unit tests: python -m unittest build_tools.packaging.linux.tests.downstream_cmake_smoke_test (8 tests)

  • Native install CI on ubuntu2404, rhel8, rhel10, and sles16 for this revision
  • Test Result


  • python -m unittest build_tools.packaging.linux.tests.downstream_cmake_smoke_test - Status: Passed

  • Verified locally on Ubuntu 24.04 with amdrocm and amdrocm-hpc-sdk 10.3 installed: cpp-sdk-user configured with prefix Clang and all components ON, and hip-host-test passed.

  • A prefix without amdrocm-hpc-sdk now fails in find_package.
  • Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
  • Diff: 338 lines (+253 / -85) across 4 files Reviewer: nunnikri Review duration: 42056m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.42) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 338 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.349
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #9677"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 24.1% · Safe to merge
    24.1%
    Repository