Skip to content

C++ Library

C++

  • Build: CMake with Conan for dependencies; a Debug build with sanitizers for development and tests, a Release build for delivery.
  • Unit tests: Catch2, structured by GIVEN, WHEN, THEN.
  • Acceptance tests: pytest-bdd reads the scenarios from test/bdd/features/ and drives the built binary. C++ has no maintained Gherkin runner of its own, and Behave cannot separate the feature files from the step definitions.
  • Lint: clang-format and clang-tidy, whose naming and const-correctness checks fail the build.
  • Rationale: tests run against the Debug build, so sanitizers catch memory and undefined behavior errors early; the Release build is tested again at merge to main.

Library

  • Structure: a public API and its implementation; no executable of its own.
  • Acceptance tests: a library has no running process; where the profile has acceptance scenarios, they drive the public API, in C++ through a test-only CLI wrapper.
  • Pipeline: build, test, and, where the language has packages, package; no container image.
  • Rationale: a consumer depends on the published API, so the guidelines stress semantic versioning and a small public surface.

C++ on Linux

  • Debug and Release are built and tested against glibc and musl, catching libc incompatibilities before they reach production; release jobs use the musl image.

Packaging

  • Conan packages the library; a test package checks that a consumer can build against it.