1 # Test goal: code coverage with newest GCC
2 # Test intents (should change rarely and conservatively):
3 # OS: Ubuntu newest supported
6 # Scope: configure, build, unit tests, coverage
7 # Test implementation choices (free to change as needed):
13 # Parallelism nt/ntomp: 4/2 (unit tests)
15 gromacs:gcc-11:coverage:configure:
17 - .gromacs:base:configure
19 - .rules:post-merge-acceptance
20 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11
22 CMAKE: /usr/local/cmake-3.18.4/bin/cmake
23 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AVX2_256"
24 CMAKE_EXTRA_OPTIONS: "-DGMX_BUILD_FOR_COVERAGE=ON"
25 COMPILER_MAJOR_VERSION: 11
27 gromacs:gcc-11:coverage:build:
31 - .before_script:default
33 - .rules:post-merge-acceptance
34 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11
36 CMAKE: /usr/local/cmake-3.18.4/bin/cmake
38 - job: gromacs:gcc-11:coverage:configure
40 gromacs:gcc-11:coverage:test:
43 - .rules:post-merge-acceptance
44 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11
46 CMAKE: /usr/local/cmake-3.18.4/bin/cmake
50 - job: gromacs:gcc-11:coverage:build
55 gromacs:coverage:analyse:
57 CMAKE: /usr/local/cmake-3.18.4/bin/cmake
58 VENVPATH: "/root/venv/py3.7"
59 GCOVR_GENERAL_OPTIONS: "-r ../ /. --gcov-executable=gcov-11 --exclude-unreachable-branches --exclude-throw-branches -j$KUBERNETES_CPU_LIMIT"
60 GCOVR_EXCLUDE_OPTIONS: "--exclude-directories '^src/external/.*' --exclude-directories '^src/gromacs/selection/.*' --exclude-directories '.*tests.*"
63 - .rules:post-merge-acceptance
65 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11
67 - job: gromacs:gcc-11:coverage:build
68 - job: gromacs:gcc-11:coverage:test
73 - echo ${GCOVR_GENERAL_OPTIONS}
74 - echo ${GCOVR_EXCLUDE_OPTIONS}
75 - source $VENVPATH/bin/activate
77 - outputdir=`pwd`/public
79 # run gcovr to write to stdout for GitLab pipeline grep.
80 - gcovr ${GCOVR_GENERAL_OPTIONS} ${GCOVR_EXCLUDE_OPTIONS}
81 # run gcovr to generate xml output. keep the generated files to produce the html output later.
82 # the invocations need to be separate due to a crash in gcovr where files can not be found.
83 - gcovr ${GCOVR_GENERAL_OPTIONS} ${GCOVR_EXCLUDE_OPTIONS} --xml $outputdir/cobertura-coverage.xml --xml-pretty --keep
84 # final gcovr run, using the generated files to produce nice looking html output
85 - gcovr ${GCOVR_GENERAL_OPTIONS} ${GCOVR_EXCLUDE_OPTIONS} --html $outputdir/coverage.html --use-gcov-files
90 cobertura: public/cobertura-coverage.xml