Skip to content

Show HN: Simplify the CI of your CMake-based project with this script

github.com/xrootd
2 pointsamadiodiscuss
On HN

This is not quite a project, but I think this is useful enough to be posted here. It's a simple CMake script you can drop at the top level of your own CMake-based project to perform the tedious bits of the configure/build/test cycle. CMake unfortunately doesn't set sane defaults for you when running via CTest (most annoying of which is the CMake generator), so the script serves to detect said defaults. The script works as a CDash dashboard submitter as well. It supports enabling clang-tidy, memcheck, coverage, customizations, etc, in a simple manner. If you want to try it out, just drop the script at the top level of your project, create a CTestConfig.cmake and .ci/config.cmake (optional) as appropriate, make sure to include(CTest) at your top level CMakeLists.txt, then call

ctest -VV -S test.cmake

If you don't have a CMake project to try it out, just use XRootD itself. The docs on how to use this script are here: https://github.com/xrootd/xrootd/blob/master/docs/TESTING.md

You can also see how the GitHub Actions workflows look like when using this script here: https://github.com/xrootd/xrootd/blob/master/.github/workflo...

I hope you enjoy!

Comments

No comments yet.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.