Integrating CDash submission into a normal CI

Hi, I’m having trouble integrating CDash into my project’s CI and haven’t found any good answers, so I’m asking here.

I manage a pretty standard CI that configures, builds, and tests a CMake project for a range of configurations. This project handles the entire test setup as part of the CMakeLists.txt, there is no CTestConfig in the root folder.

How do I:

  1. specify the site name and build name using the command line or environment variables?
  2. execute configuration, build, and tests as individual steps in the CI. I want to see quickly at which stage the CI fails. This rules out running everything as a single script.
  3. use CDash without a CTestConfig in the root?

Thanks a lot!

1 Like

In practice, I do place a CTestConfig.cmake file in the repo root.

My CI workflows typically run something like ctest -D Nightly, but you could break it up and run each test phase (update, configure, build, test) as a separate step in your CI, ex:

  • ctest -D NightlyStart
  • ctest -D NightlyUpdate
  • ctest -D NightlyConfigure

etc. See the cli docs.