GammaRay
GammaRay copied to clipboard
Test probe only
Way back in #765, I submitted some patches to fix the GAMMARAY_CLIENT_ONLY_BUILD, which had stealth-broken because it wasn't being tested in CI.
The same is now true of GAMMARAY_PROBE_ONLY_BUILD, so to avoid the possibility of similar stealth breakage, this PR adds test runs for probe-only builds to the standard CI, by first adding configurations for them to the CMakePresets.json.
Along the way, it makes some adjustments to the existing configuration(s), to facilitate adding additional CI build configurations
Presets file CMakePresets.json
- The presets file is adjusted to make better use of inheritance, removing duplicate manual settings of
"generator"or"binaryDir"when those can simply be inherited. - To keep the file more streamlined, the new configs (and any they depend on) take advantage of a CMake feature that permits a string value for
"inherits", rather than a list value, when only one configuration is being inherited from.
(Not all configurations were adjusted, mostly just the ones I was touching anyway. But in both cases, they all could be changed the same way.)
CI configuration build.yml
- To control whether (and which type) of unit tests are run, a new
matrix.config.tests_withvalue is optionally added to matrix members, set to eitherqt5orqt6. This allows the complicated version checks:
to be replaced with a simple:startsWith(matrix.config.qt_version, '6.')
and (along withmatrix.config.tests_with == 'qt6'runner.os) not only controls which tests are run, but its absence will prevent tests from being run at all. (Mostly because unit tests on aPROBE_ONLYbuild are simultaneously both pointless and redundant.)