Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cakebaker
Copy link
Contributor

@cakebaker cakebaker commented Nov 8, 2024

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: rust-lang/rust#131829 . For this purpose, cargo-llvm-cov is used instead of grcov.

@cakebaker cakebaker marked this pull request as draft November 8, 2024 15:19
@cakebaker cakebaker force-pushed the ci_fix_code_coverage branch 2 times, most recently from 4dd8145 to c4c14e1 Compare November 11, 2024 14:28
@sylvestre sylvestre force-pushed the ci_fix_code_coverage branch from c4c14e1 to 82fd8e9 Compare November 11, 2024 14:39
@cakebaker cakebaker force-pushed the ci_fix_code_coverage branch 12 times, most recently from 0eb54a7 to 9dcb6a6 Compare November 12, 2024 15:44
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@             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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cakebaker cakebaker force-pushed the ci_fix_code_coverage branch 2 times, most recently from dedd391 to fc823e6 Compare November 12, 2024 16:08
and use cargo-llvm-cov instead of grcov.

Support for -Zprofile has been removed from Rust nightly: rust-lang/rust#131829
@cakebaker cakebaker force-pushed the ci_fix_code_coverage branch from fc823e6 to bca84ba Compare November 13, 2024 09:29
@cakebaker cakebaker marked this pull request as ready for review November 13, 2024 09:31
@cakebaker cakebaker requested a review from sylvestre November 13, 2024 09:34
@sylvestre
Copy link
Contributor

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 cakebaker marked this pull request as draft November 13, 2024 13:53
@cakebaker
Copy link
Contributor Author

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
Copy link
Contributor

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

@cakebaker cakebaker force-pushed the ci_fix_code_coverage branch 3 times, most recently from 27e7f63 to f2ca2a9 Compare November 13, 2024 15:02
@cakebaker cakebaker force-pushed the ci_fix_code_coverage branch 3 times, most recently from b61da49 to b170cc7 Compare November 13, 2024 15:47
@cakebaker cakebaker force-pushed the ci_fix_code_coverage branch from b170cc7 to 18dc8b2 Compare November 13, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants