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

Updates code coverage CI to stable #538

Merged
merged 2 commits into from
Apr 29, 2023
Merged

Updates code coverage CI to stable #538

merged 2 commits into from
Apr 29, 2023

Conversation

almann
Copy link
Contributor

@almann almann commented Apr 29, 2023

This change finally gets us to using stable rust to generate our code coverage! Prior to this change, we had to pin to nightly Rust, which was a paper cut whenever that broke for various reasons.

LLVM source coverage in Rust is not perfect (e.g., rust-lang/rust#79649, rust-lang/rust#79417), and Codecov has some of its own issues (e.g., taiki-e/cargo-llvm-cov#255 (comment)), but I believe these to be acceptable compromises to getting off of nightly.


Removes pin to nightly and removes the old -Zprofile runs and grcov based coverage generation in favor of -C source-instrumentation which is in stable.

This updates the CI to install llvm-tools-preview from rustup and install a nice wrapper for running source instrumentation called cargo-llvm-cov. We use this wrapper to generate codecov JSON to get region coverage since LCOV style output from source coverage in Rust/LLVM doesn't output branch coverage.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Removes pin to nightly and removes the old `-Zprofile` runs and `grcov`
based coverage generation in favor of `-C source-instrumentation` which
is in stable.

This updates the CI to install `llvm-tools-preview` from `rustup` and
install a nice wrapper for running source instrumentation called
[`cargo-llvm-cov`][1].  We use this wrapper to generate codecov JSON to
get region coverage since LCOV style output from source coverage in
Rust/LLVM doesn't output branch coverage.

[1]: https://crates.io/crates/cargo-llvm-cov
@codecov
Copy link

codecov bot commented Apr 29, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -6.28 ⚠️

Comparison is base (65cb835) 89.34% compared to head (a5e895f) 83.07%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #538      +/-   ##
==========================================
- Coverage   89.34%   83.07%   -6.28%     
==========================================
  Files          84       83       -1     
  Lines       13284    16126    +2842     
  Branches        0    16126   +16126     
==========================================
+ Hits        11869    13396    +1527     
- Misses       1415     1566     +151     
- Partials        0     1164    +1164     
Impacted Files Coverage Δ
src/ion_data/ion_ord.rs 95.00% <100.00%> (-2.73%) ⬇️
src/thunk.rs 84.47% <100.00%> (-13.42%) ⬇️

... and 81 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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