diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78f1add0..b43c1508 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,4 +87,6 @@ jobs: - name: Coverage if: matrix.config.do_coverage == 'ON' - run: bash ${{github.workspace}}/build/codecov.sh + uses: codecov/codecov-action@v4.2.0 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b860880..d6afc71b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -510,7 +510,6 @@ configure_file(config.h.in "${PROJECT_BINARY_DIR}/g2o/config.h") install(FILES ${PROJECT_BINARY_DIR}/g2o/config.h DESTINATION ${INCLUDES_DESTINATION}/g2o) configure_file("${g2o_SOURCE_DIR}/cmake_modules/Config.cmake.in" "${G2O_PROJECT_CONFIG}" @ONLY) -configure_file("${g2o_SOURCE_DIR}/script/codecov.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/codecov.sh" @ONLY) install( FILES "${G2O_PROJECT_CONFIG}" "${G2O_VERSION_CONFIG}" diff --git a/script/codecov.sh.in b/script/codecov.sh.in deleted file mode 100644 index 06314c46..00000000 --- a/script/codecov.sh.in +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -lcov --directory . --capture --output-file coverage.info -# filter out system and extra files. -# To also not include test code in coverage add them with full path to the patterns: '*/tests/*' -lcov --remove coverage.info '/usr/*' "@G2O_SRC_DIR@/g2o/EXTERNAL/*" "@G2O_SRC_DIR@/unit_test/*" --output-file coverage.info -# output coverage data for debugging (optional) -#lcov --list coverage.info -# Uploading to CodeCov -# '-f' specifies file(s) to use and disables manual coverage gathering and file search which has already been done above -bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"