In CI
In CI
A baseline is worth most when every build has one. Generate the report in CI and keep it with the
run, rather than committing it, so it can never describe code that has since changed.
Tezcatl does this for itself
Every push to Tezcatl builds it with coverage, runs its tests, measures itself and keeps the report
as a build artifact named tezcatl-self-report. The steps are in
scripts/self-report.sh:
cmake --preset linux-coverage && cmake --build --preset linux-coverage
ctest --preset linux-coverage
scripts/self-report.sh self-report
The script ends with receipts, not an exit code: it fails if gcov wrote no coverage records, and it
validates report.json against the schema before the report is kept.
In your own pipeline
- Build the project with its compilation database and, if you want coverage, with coverage
flags. See Coverage. - Run the tests.
- Run
tezcatl reportand keep the output directory as an artifact. - Decide what fails the build.
tezcatl reportexits 1 only when a unit fails to parse; it sets no
quality gates of its own. To gate on a figure, read it fromreport.json, whose shape is fixed by
its schema and itsschema_version.
On a shared runner, other build trees may sit under the root. Leave them out with
--exclude "build/**", or they are counted as the project’s code.