ci#

Run the full CI pipeline: build with coverage, run tests, and check coverage thresholds.

clibra ci --preset ci

Requires LIBRA_TESTS and LIBRA_COVERAGE to be ON in the preset’s CMake cache.

CMake equivalent#

Preferred — when a workflow preset named <n> exists in either CMakePresets.json or CMakeUserPresets.json:

cmake --workflow --preset <n>

Fallback — when no workflow preset exists (emits a warning):

cmake --preset <n>                              # if reconfigure needed
cmake --build --preset <n> --target all-tests
ctest --preset <n>
cmake --build --preset <n> --target gcovr-check

Note

Adding a workflow preset to CMakePresets.json is recommended. It makes the CI sequence explicit, reproducible, and usable directly with cmake --workflow without the CLI:

{
  "workflowPresets": [
    {
      "name": "ci",
      "steps": [
        { "type": "configure", "name": "ci" },
        { "type": "build",     "name": "ci" },
        { "type": "test",      "name": "ci" },
        { "type": "build",     "name": "ci",
          "targets": ["gcovr-check"] }
      ]
    }
  ]
}

Flag reference#

clibra ci#

Run the CI pipeline: build with coverage, run tests, and check coverage.

The resolved preset defaults to ci if --preset is not given and no default is configured.

If a workflow preset named exists, delegates to cmake --workflow --preset <n>. Otherwise sequences individual cmake/ctest invocations and emits a warning.

The fallback requires LIBRA_TESTS=ON and LIBRA_COVERAGE=ON and the targets all-tests and gcovr-check to be present.

Usage: clibra ci [OPTIONS]

Options:#

  • -D <VAR=VALUE> — Forward -DVAR=VALUE to the CMake configure step when active. Ignored (with a warning) if the build directory exists and neither –reconfigure nor –fresh is given

  • -r, --reconfigure — Force the configure step even if the build directory exists

  • -f, --fresh — Reconfigure with a –fresh cmake build directory