diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3aec4f826d3c2b45ecae8775ee3244ce41808310..34c8432596e5f0bb5ece7450a105e7826fd29c0f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,3 +81,36 @@ reuse: before_script: "" script: - reuse lint + + +debian:12 gcc-12-20 (with checking, coverage, no python): + extends: .common + image: registry.dune-project.org/docker/ci/debian:12 + variables: + DUNECI_CXXFLAGS: " -DDUNE_CHECK_BOUNDS=1 -DDUNE_ISTL_WITH_CHECKING=1 -DDUNE_FMatrix_WITH_CHECKING=1 -DCHECK_RESERVEDVECTOR=1 --coverage -lgcov " + DUNECI_CMAKE_FLAGS: " -DCMAKE_DISABLE_FIND_PACKAGE_Python3:BOOL=ON " + DUNECI_TOOLCHAIN: gcc-12-20 + # Notes: + # - Only works for gcc + # - The gcov executable needs to match the version of the gcc toolchain + GCOVR_OPTS: + --gcov-executable gcov-12 + --root $CI_PROJECT_DIR + --exclude $CI_PROJECT_DIR/build-cmake + --exclude-unreachable-branches + --xml-pretty + --print-summary + --output $CI_PROJECT_DIR/coverage.xml + after_script: + # Create a coverage report + - gcovr $GCOVR_OPTS $CI_PROJECT_DIR/build-cmake + artifacts: + expire_in: 2 years + reports: + junit: junit/*.xml + coverage_report: + coverage_format: cobertura + path: coverage.xml + # gcovr reports results (`--print-summary` option above). With this line we extract the + # result (% of covered lines) to report them in gitlab + coverage: /^\s*lines:\s*\d+.\d+\%/