diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 2d8b606b0..141ce60a7 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -23,22 +23,25 @@ jobs: - name: Install missing software on ubuntu run: | sudo apt-get update - sudo apt-get install libxml2-utils - sudo apt-get install lcov - sudo apt-get install libcppunit-dev + sudo apt-get install libxml2-utils lcov + + - name: Install missing Python packages on ubuntu + run: | python -m pip install pip --upgrade python -m pip install lcov_cobertura - name: Compile instrumented run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - make -j$(nproc) test CXXFLAGS="-g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes - - - name: Generate coverage report + make -j$(nproc) all CXXFLAGS="-g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes + + - name: Run instrumented tests run: | - rm -rf coverage_report ./testrunner test/cfg/runtests.sh + + - name: Generate coverage report + run: | gcov lib/*.cpp -o lib/ lcov --directory ./ --capture --output-file lcov_tmp.info -b ./ lcov --extract lcov_tmp.info "$(pwd)/*" --output-file lcov.info