diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb2f932a..4425273b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,16 +46,47 @@ jobs: with: fetch-depth: 1 submodules: recursive + - name: Configure Safe Directory + run: git config --global --add safe.directory $GITHUB_WORKSPACE - name: Update run: apt-get update - name: install dependencies - run: apt-get install -y gcc lcov + run: apt-get install -y gcc lcov gcovr bc - name: config run: make config - name: build-test - run: make build-test - - name: Generate Coverage Report - run: make gcov + run: | + export CFLAGS="-fprofile-arcs -ftest-coverage -fcondition-coverage -g" + make build-test + # - name: Generate Coverage Report + # run: make gcov + - name: Generate Coverage Report and Badges + run: | + mkdir -p docs/coverage + gcovr --verbose --txt-metric branch --xml-pretty --exclude-unreachable-branches -o docs/coverage/coverage_report.xml + gcovr --verbose --txt-metric branch --html --html-details -o docs/coverage/coverage_report.html + LINE_COVERAGE=$(grep -oP '(?<=