ci: replace grcov by cargo-llvm-cov#1986
Merged
ValuedMammal merged 1 commit intobitcoindevkit:masterfrom Jul 29, 2025
Merged
Conversation
evanlinjin
approved these changes
Jul 10, 2025
Member
evanlinjin
left a comment
There was a problem hiding this comment.
ACK d6a19fc
Thank you for looking into this and describing the problem in detail.
d6a19fc to
1b1dade
Compare
1b1dade to
066c4cd
Compare
Contributor
Author
|
I replaced |
110CodingP
added a commit
to 110CodingP/bdk_redb
that referenced
this pull request
Jul 22, 2025
Stolen from nymius's [pr](bitcoindevkit/bdk#1986) on bitcoindevkit/bdk regarding the same.
110CodingP
added a commit
to 110CodingP/bdk_redb
that referenced
this pull request
Jul 22, 2025
Stolen from nymius's [pr](bitcoindevkit/bdk#1986) on bitcoindevkit/bdk regarding the same.
Collaborator
|
ACK 066c4cd |
16 tasks
kwsantiago
pushed a commit
to kwsantiago/bdk
that referenced
this pull request
Aug 5, 2025
066c4cd ci: replace grcov by cargo-llvm-cov (nymius) Pull request description: ### Description As explained in bitcoindevkit#1984 , I discovered some misreportings in the coverage information given by grcov. Fixes bitcoindevkit#1984 ### Notes to the reviewers The discussion about the tool to use is open, but I'm adding this PR to showcase how a change from `grcov` to `cargo-llvm-cov` would look like and the improvements in reporting this change will bring. [Look the report in `coveralls`](https://coveralls.io/github/nymius/bdk?branch=ci/replace-grcov-by-cargo-llvm-cov) to get a better perspective of them. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo +nightly fmt` and `cargo clippy` before committing ACKs for top commit: ValuedMammal: ACK 066c4cd oleonardolima: ACK 066c4cd Tree-SHA512: d237fcc36efb6a4d3ccfaa371c2c70fc18ee40b48ca48f1230c5df6dca093f57bc1096927ddb15f9cae59a4640d9e34bf3ef1a309037e21fe0e8348e132bf38d
3 tasks
5 tasks
ValuedMammal
added a commit
to bitcoindevkit/bdk_wallet
that referenced
this pull request
Feb 24, 2026
527037c ci(coverage): Switch to cargo-llvm-cov for code coverage (copilot-swe-agent[bot]) Pull request description: ### Description Replaces `grcov` with `cargo-llvm-cov` for coverage generation. `grcov` lacks branch coverage support and has other limitations. **Workflow changes:** - Use nightly toolchain with `cargo-llvm-cov` - Set `RUSTFLAGS="--cfg coverage_nightly"` during coverage runs only - Remove `lcov` tools and old coverage environment variables - Enable branch coverage with `--branch` flag - Add `--quiet` flag to reduce output verbosity **Code changes:** - Enable `coverage_attribute` feature via `#[cfg_attr(coverage_nightly, feature(coverage_attribute))]` in `lib.rs` - Exclude test modules from coverage with `#[cfg_attr(coverage_nightly, coverage(off))]` on 13 test modules - Add `coverage_nightly` to `[lints.rust]` in `Cargo.toml` to declare the custom cfg Stable builds are unaffected. Coverage exclusions only activate when the cfg is set. ### Notes to the reviewers The `coverage_nightly` cfg is only set during coverage generation in CI. Regular builds and tests use stable toolchain without this cfg. Branch coverage is now explicitly enabled, providing more detailed coverage metrics than the previous grcov setup. ### Changelog notice - ci: Switch to `cargo-llvm-cov` for code coverage ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>[coverage] Consider using `cargo-llvm-cov`</issue_title> > <issue_description>**Describe the enhancement** > > Switch to using [`llvm-cov`](https://crates.io/crates/cargo-llvm-cov) in `.github/workflows/code_coverage.yml` for generating coverage data. For example see bitcoindevkit/bdk#1986. > > **Impact** > - [ ] Blocking production usage > - [ ] Nice-to-have / UX improvement > - [x] Developer experience / maintainability > > **Additional context** > > - `grcov` has some limitations including lacking support for branch coverage which makes it a less appealing option. > - bitcoindevkit/bdk#1984</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #366 <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. ACKs for top commit: ValuedMammal: ACK 527037c notmandatory: ACK 527037c luisschwab: ACK 527037c Tree-SHA512: c5dc740c3e5b90b12b92ccff0581f9ca21ae45f3b08b486b58d6f9bdcc54865999b48a1eeef1349a0fd81727bdba18b5de615e60cc9e0e41cdda6d96bc50cc13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As explained in #1984 , I discovered some misreportings in the coverage information given by grcov.
Fixes #1984
Notes to the reviewers
The discussion about the tool to use is open, but I'm adding this PR to showcase how a change from
grcovtocargo-llvm-covwould look like and the improvements in reporting this change will bring. Look the report incoverallsto get a better perspective of them.Checklists
All Submissions:
cargo +nightly fmtandcargo clippybefore committing