ci: Perform coverage testing of mpy-cross.

Signed-off-by: Jeff Epler <jepler@gmail.com>
This commit is contained in:
Jeff Epler 2025-08-27 15:51:28 -05:00
parent 791b6d84da
commit 4454c9c8a2
2 changed files with 5 additions and 0 deletions

View file

@ -90,6 +90,7 @@ jobs:
run: source tools/ci.sh && ci_unix_coverage_run_native_mpy_tests
- name: Run gcov coverage analysis
run: |
(cd mpy-cross && gcov -o build/py ../py/*.c || true)
(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

View file

@ -637,6 +637,10 @@ function ci_unix_coverage_setup {
}
function ci_unix_coverage_build {
make ${MAKEOPTS} -C mpy-cross COPT="-Os -fprofile-arcs -ftest-coverage" LDFLAGS="-fprofile-arcs -ftest-coverage -lm" DEBUG=1
make ${MAKEOPTS} -C ports/unix VARIANT=coverage submodules
make ${MAKEOPTS} -C ports/unix VARIANT=coverage deplibs
make ${MAKEOPTS} -C ports/unix VARIANT=coverage
ci_unix_build_helper VARIANT=coverage
ci_unix_build_ffi_lib_helper gcc
}