Loading .gitlab-ci.yml +32 −5 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ stages: # build targets BUILD_TESTS: "no" BUILD_MATRIX_TESTS: "no" WITH_COVERAGE: "no" WITH_COVERAGE: "yes" BUILD_DOC: "no" BUILD_BENCHMARKS: "no" BUILD_EXAMPLES: "no" Loading Loading @@ -100,6 +100,25 @@ stages: - .gitlab-ci.yml interruptible: true # template for collecting code coverage .coverage_template: after_script: - mkdir coverage_html - if [[ ${CXX} == "clang++" ]]; then GCOV_COMMAND="llvm-cov gcov"; else GCOV_COMMAND="gcov"; fi - gcovr --print-summary --html-details coverage_html/coverage.html --xml coverage.xml --xml-pretty --gcov-executable "${GCOV_COMMAND}" --exclude-unreachable-branches --root "${CI_PROJECT_DIR}" --filter "${CI_PROJECT_DIR}/src/TNL/" coverage: /^\s*lines:\s*\d+.\d+\%/ artifacts: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} expire_in: 7 days reports: cobertura: coverage.xml paths: - coverage_html/ # Dummy build job to ensure that a pipeline is created for a merge request, even # when there were no changes. dummy build job: Loading @@ -123,7 +142,9 @@ dummy build job: # significantly more time than debug builds). cuda_tests_Debug: extends: .build_template extends: - .build_template - .coverage_template stage: build:cuda tags: - docker Loading @@ -148,7 +169,9 @@ cuda_tests_Release: cuda_matrix_tests_Debug: extends: .build_template extends: - .build_template - .coverage_template stage: build:cuda tags: - docker Loading Loading @@ -232,7 +255,9 @@ cuda_mpi_nontests_Release: default_tests_Debug: extends: .build_template extends: - .build_template - .coverage_template variables: <<: *default_cmake_flags BUILD_TYPE: Debug Loading @@ -246,7 +271,9 @@ default_tests_Release: BUILD_TESTS: "yes" default_matrix_tests_Debug: extends: .build_template extends: - .build_template - .coverage_template variables: <<: *default_cmake_flags BUILD_TYPE: Debug Loading Loading
.gitlab-ci.yml +32 −5 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ stages: # build targets BUILD_TESTS: "no" BUILD_MATRIX_TESTS: "no" WITH_COVERAGE: "no" WITH_COVERAGE: "yes" BUILD_DOC: "no" BUILD_BENCHMARKS: "no" BUILD_EXAMPLES: "no" Loading Loading @@ -100,6 +100,25 @@ stages: - .gitlab-ci.yml interruptible: true # template for collecting code coverage .coverage_template: after_script: - mkdir coverage_html - if [[ ${CXX} == "clang++" ]]; then GCOV_COMMAND="llvm-cov gcov"; else GCOV_COMMAND="gcov"; fi - gcovr --print-summary --html-details coverage_html/coverage.html --xml coverage.xml --xml-pretty --gcov-executable "${GCOV_COMMAND}" --exclude-unreachable-branches --root "${CI_PROJECT_DIR}" --filter "${CI_PROJECT_DIR}/src/TNL/" coverage: /^\s*lines:\s*\d+.\d+\%/ artifacts: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} expire_in: 7 days reports: cobertura: coverage.xml paths: - coverage_html/ # Dummy build job to ensure that a pipeline is created for a merge request, even # when there were no changes. dummy build job: Loading @@ -123,7 +142,9 @@ dummy build job: # significantly more time than debug builds). cuda_tests_Debug: extends: .build_template extends: - .build_template - .coverage_template stage: build:cuda tags: - docker Loading @@ -148,7 +169,9 @@ cuda_tests_Release: cuda_matrix_tests_Debug: extends: .build_template extends: - .build_template - .coverage_template stage: build:cuda tags: - docker Loading Loading @@ -232,7 +255,9 @@ cuda_mpi_nontests_Release: default_tests_Debug: extends: .build_template extends: - .build_template - .coverage_template variables: <<: *default_cmake_flags BUILD_TYPE: Debug Loading @@ -246,7 +271,9 @@ default_tests_Release: BUILD_TESTS: "yes" default_matrix_tests_Debug: extends: .build_template extends: - .build_template - .coverage_template variables: <<: *default_cmake_flags BUILD_TYPE: Debug Loading