Skip to content

[CI] Run ctest in multi-arch build jobs#4647

Merged
ScottTodd merged 5 commits intoROCm:mainfrom
ScottTodd:multi-arch-ctest
Apr 23, 2026
Merged

[CI] Run ctest in multi-arch build jobs#4647
ScottTodd merged 5 commits intoROCm:mainfrom
ScottTodd:multi-arch-ctest

Conversation

@ScottTodd
Copy link
Copy Markdown
Member

@ScottTodd ScottTodd commented Apr 17, 2026

Motivation

These tests haven't been running on multi-arch CI, which is all that runs by default now on PRs/commits, leading to #4640.

Technical Details

Here's where the tests are in non-multi-arch CI:

- name: Test Packaging
if: ${{ github.event.repository.name == 'TheRock' }}
run: |
ctest --test-dir build --output-on-failure

Multi-arch CI builds in multiple stages, so several subprojects/tests needed additional filtering so they would only be included in the stages that have all necessarily deps/files available.

Test Plan

  • Watch logs for workflow runs on this PR
    • Check coverage compared to non-multi-arch CI (should include all tests and not miss any)
    • Check if tests are run multiple times (fine if they are fast enough, though not ideal)

Test Result

https://github.com/ROCm/TheRock/actions/runs/24586388686?pr=4647

Submission Checklist

ScottTodd and others added 2 commits April 17, 2026 08:55
The cpp-sdk-user example project unconditionally enables HIP language
(LANGUAGES CXX HIP), which requires hip-lang-config.cmake in the dist
prefix. In multi-arch CI stages where HIP hasn't been built yet (e.g.
foundation), this causes ctest to fail and block all downstream stages.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Optional sysdeps (expat, gmp, mpfr, ncurses, hwloc, libpciaccess) were
included unconditionally via add_subdirectory, causing their tests to
register even in stages where they are prebuilt inbound artifacts. The
tests then fail because the build-tree paths don't exist.

Gate both the THEROCK_BUNDLED_* variable assignments and the
add_subdirectory calls on the corresponding THEROCK_ENABLE_SYSDEPS_*
feature flags, matching the pattern already used for amd-mesa. Core
sysdeps (in the 'sysdeps' artifact) remain unconditional.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@ScottTodd ScottTodd changed the title [CI] Run ctest for therock_test_validate_shared_lib tests in build jobs [CI] Run ctest in multi-arch build jobs Apr 17, 2026
Copy link
Copy Markdown
Member Author

@ScottTodd ScottTodd left a comment

Choose a reason for hiding this comment

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

Linux ctest steps are now all passing after the sysdeps changes properly skip building/testing across stages: https://github.com/ROCm/TheRock/actions/runs/24586388686?pr=4647

Comment on lines +172 to +174
- name: Test Packaging
run: |
ctest --test-dir ${BUILD_DIR} --output-on-failure
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The therock-examples-cpp-sdk-user test failed on Windows: https://github.com/ROCm/TheRock/actions/runs/24586388686/job/71907545675?pr=4647#step:18:86

HIP: Using hipcc from relative path: B:/build/dist/rocm/bin/hipcc.exe
hiprand version: 3.3.0
rocrand version: 4.4.0
CMake Error at CMakeLists.txt:65 (find_package):
  Could not find a package configuration file provided by "hipsparselt" with
  any of the following names:

    hipsparseltConfig.cmake
    hipsparselt-config.cmake

  Add the installation prefix of "hipsparselt" to CMAKE_PREFIX_PATH or set
  "hipsparselt_DIR" to a directory containing one of the above files.  If
  "hipsparselt" provides a separate development package or SDK, be sure it
  has been installed.


Configuring incomplete, errors occurred!

CMake Error at C:/home/runner/_work/TheRock/TheRock/examples/clean_configure_test_project.cmake:46 (message):
  Failed to execute test process



Errors while running CTest

We were only running ctest on Linux before in non-multi-arch CI, so this is probably a real test failure that we've just been missing coverage for. Could fix now, or proceed with this PR for just Linux as a start.

@ScottTodd ScottTodd marked this pull request as ready for review April 20, 2026 17:04
@ScottTodd ScottTodd requested review from amd-shiraz and marbre April 20, 2026 17:05
Copy link
Copy Markdown
Member

@marbre marbre left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@ScottTodd ScottTodd merged commit fa6c993 into ROCm:main Apr 23, 2026
123 of 131 checks passed
@ScottTodd ScottTodd deleted the multi-arch-ctest branch April 23, 2026 20:37
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Apr 23, 2026
@dgaliffiAMD dgaliffiAMD mentioned this pull request Apr 30, 2026
1 task
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