diff options
-rw-r--r-- | .github/workflows/ci.yml | 7 | ||||
-rwxr-xr-x | ci/install-dependencies.sh | 3 | ||||
-rwxr-xr-x | ci/run-build-and-tests.sh | 13 |
3 files changed, 13 insertions, 10 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98ed096e2..6681ab076 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,13 @@ jobs: run: ci/install-dependencies.sh - name: build check run: ci/run-build-and-tests.sh + - name: upload coverage + uses: codecov/codecov-action@v2 + with: + verbose: true + fail_ci_if_error: true + directory: coverage + files: coverage-info gcc9-x86-nostacktrace: # the fastest of all build jobs runs-on: ubuntu-20.04 diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 6b6dc02ee..e5903c002 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -143,8 +143,7 @@ esac case "${CHECK-}" in coverage) - curl -s -S https://codecov.io/bash > codecov.bash - chmod u+x codecov.bash + apt_get_install lcov ;; valgrind) apt_get_install valgrind diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 0baa32baa..da7d6918c 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -91,18 +91,15 @@ case "${CHECK-}" in coverage) make -k $j all VERBOSE=${VERBOSE-} CFLAGS='-g -Og' make -k $j2 check VERBOSE=${VERBOSE-} - echo 'BEGIN OF TEST SUITE INFORMATION' - tail -n 99999 -- tests*/test-suite.log tests*/ksysent.gen.log - echo 'END OF TEST SUITE INFORMATION' case "$CC" in gcc*) GCOV="gcov${CC#gcc}" ;; clang*) GCOV="llvm-cov${CC#clang} gcov" ;; - *) GCOV=gcov ;; + *) GCOV='' ;; esac - cd src - ../codecov.bash -Z -x "$GCOV" -a -abc - rm ../codecov.bash - cd - + make code-coverage-capture ${GCOV:+GCOV=}${GCOV:-$GCOV} + echo 'BEGIN OF TEST SUITE INFORMATION' + tail -n 99999 -- tests*/test-suite.log tests*/ksysent.gen.log + echo 'END OF TEST SUITE INFORMATION' ;; valgrind) make -k $j all VERBOSE=${VERBOSE-} |