uutils / findutils

Rust implementation of findutils
MIT License
314 stars 38 forks source link

ci: use `-Cinstrument-coverage` instead of `-Zprofile` #470

Open cakebaker opened 2 weeks ago

cakebaker commented 2 weeks ago

This PR is an attempt to fix the "code coverage" job by using -Cinstrument-coverage instead of -Zprofile which has been removed from Rust nightly: https://github.com/rust-lang/rust/pull/131829 . For this purpose, cargo-llvm-cov is used instead of grcov.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.45%. Comparing base (50b7ec6) to head (bca84ba).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #470 +/- ## =========================================== + Coverage 66.89% 87.45% +20.55% =========================================== Files 36 31 -5 Lines 4438 6697 +2259 Branches 984 299 -685 =========================================== + Hits 2969 5857 +2888 + Misses 1059 628 -431 + Partials 410 212 -198 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sylvestre commented 1 week ago

grcov also supports -Cinstrument-coverage what was wrong with this?

they use it upstream https://github.com/mozilla/grcov/blob/9cc638baf2cca4368b9f8354e78c1ae28dc2d168/.github/workflows/CICD.yml#L84-L98

cakebaker commented 1 week ago

Yes, I know that grcov supports -Cinstrument-coverage, I used it in the other projects ;-) In this project it interfered with the tests, though. I will try again with the example you provided.

sylvestre commented 1 week ago

I know upstream ( @marco-c ) very well ;) I am sure he will be happy to help