Updates code coverage CI to stable #538
Merged
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.
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 andgrcov
based coverage generation in favor of-C source-instrumentation
which is in stable.This updates the CI to install
llvm-tools-preview
fromrustup
and install a nice wrapper for running source instrumentation calledcargo-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.