diff options
author | Dmitry V. Levin <ldv@strace.io> | 2021-07-22 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2021-08-05 18:57:22 +0000 |
commit | b2117312c4cfec300211ae3648aeb95cab6ca9cf (patch) | |
tree | 3caa00ce5b4b7da32c70aa223e4b71720cc1b475 | |
parent | 3305f7db5c959d1218a56fd4f881ea8f2952133e (diff) | |
download | strace-ldv/codecov.tar.gz |
ci: upload coverage using codecov/codecov-action@v2ldv/codecov
According to https://github.com/codecov/codecov-bash/#readme,
https://codecov.io/bash is deprecated and will cease to function.
* .github/workflows/ci.yml (coverage): Upload coverage using
codecov/codecov-action@v2.
* ci/install-dependencies.sh [CHECK == coverage]: Install lcov instead
of downloading codecov.bash.
* ci/run-build-and-tests.sh [CHECK == coverage]: Collect coverage info
using "make code-coverage-capture" instead of codecov.bash.
-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-} |