summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-06-26 12:16:31 +1000
committerDamien George <damien@micropython.org>2021-06-26 21:34:37 +1000
commitf3e4ed82a11243dfed0e0370ab0d77e947ff6d34 (patch)
tree1fbd560b0764268657fbaa0e46bc001c1c77291d
parentc940597314e504e1e3d59bfb6f6e667c9708ba79 (diff)
github/workflows: Switch from lcov to gcov.
Coverage calculated by Codecov has the same reliability/deterministic issues as Coveralls did, so the problem is likely to do with the output of lcov/gcov, rather than the analysis and display of the data. Switch from lcov to gcov for data generation to try and simplify this process of computing coverage. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--.github/workflows/ports_unix.yml8
-rwxr-xr-xtools/ci.sh1
2 files changed, 3 insertions, 6 deletions
diff --git a/.github/workflows/ports_unix.yml b/.github/workflows/ports_unix.yml
index ffba437f1..673e6152f 100644
--- a/.github/workflows/ports_unix.yml
+++ b/.github/workflows/ports_unix.yml
@@ -65,15 +65,13 @@ jobs:
run: source tools/ci.sh && ci_native_mpy_modules_build
- name: Test importing .mpy generated by mpy_ld.py
run: source tools/ci.sh && ci_unix_coverage_run_native_mpy_tests
- - name: Run lcov coverage analysis
+ - name: Run gcov coverage analysis
run: |
- mkdir -p coverage
- lcov --rc lcov_branch_coverage=1 --directory ports/unix/build-coverage --capture --output-file coverage/lcov.info.all
- lcov --remove coverage/lcov.info.all '*/lib/*' '*/ports/unix/*' '*/utils/*' --output-file coverage/lcov.info
+ (cd ports/unix && gcov -o build-coverage/py ../../py/*.c || true)
+ (cd ports/unix && gcov -o build-coverage/extmod ../../extmod/*.c || true)
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
- files: coverage/lcov.info
fail_ci_if_error: true
verbose: true
- name: Print failures
diff --git a/tools/ci.sh b/tools/ci.sh
index a82eedd20..ec122129d 100755
--- a/tools/ci.sh
+++ b/tools/ci.sh
@@ -394,7 +394,6 @@ function ci_unix_standard_run_perfbench {
}
function ci_unix_coverage_setup {
- sudo apt-get install lcov
sudo pip3 install setuptools
sudo pip3 install pyelftools
gcc --version