Skip to content

Patschkowski/cpp-reference-cicd-pipeline

Repository files navigation

C++ Reference CI/CD Pipeline

We believe that code quality and fast software development can go hand-in-hand when facilitated by a strong CI/CD pipeline without the need of a complex quality management system (QMS).

Verify and Validate Quality Gate Status

Verification and Validation

Two levels of testing are set up in this project: unit testing and system testing.

For both testing approaches OpenCppCoverage is used in the pipeline to generate the line coverage that is then directly imported into SonarCloud. As this is a C++ project, SonarCloud receives the test reports in the CPPUnit format which is accomplished by applying an XSLT transformation tests\junit-to-cppunit.xsl to the generated JUnit test reports.

Unit Testing

Unit testing is done in terms of the Boost.Test unit testing framework as it integrates well with Visual Studio and most-likely, one will anyway already be using Boost. In this project it the tests are also wrapped by CTest as it can generate test reports in the JUnit format. The expectation is that the project practices Test Driven Development (TDD).

System Testing

System testing is done using the behave framework. Again, the expectation is that the project practices Behavior Driven Development (BDD) as we believe that documenting the requirements in a formal way using Gherkin syntax is more practical than using a separate requirements management tool that is difficult to keep in sync with the repository. Behave generates JUnit formatted test reports as well.

Static Analysis

For the MSVC compiler the Microsoft code analysis is enabled (c.f. CMakePresets.json). For the Clang compiler clang-tidy is executed, controlled via .clang-tidy. Furthermore, cppcheck runs during the build pipeline.

Formal Verification

Frama-C

SeaHorn

Documentation

Doxygen generates the documentation from the source files itself, supported by Doxygen Awesome to give it a modern look.

Naming Convention

As per C++ Core Guidelines - NL: Naming and layout suggestions defined in the .clang-format.

Folder Structure

The folder structure is based on P1204R0 - Canonical Project Structure with the exception that for C++ modules the extension .cppm is used as per Clang's file name requirements.

Dependency management

In principle external dependencies are managed using vcpkg with the vcpkg.json configuration file. However, some external dependencies have to be drawn in directly. That is done via the third_party folder and git submodules.

About

C++ Reference CI/CD Pipeline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •