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

PR testing: add a coverage report for Rust tests #24

Closed
wants to merge 1 commit into from

Conversation

jrose-signal
Copy link
Contributor

This is using the still-experimental -Zinstrument-coverage, so it may not be perfect, but hopefully it gives us a starting point.

@jrose-signal
Copy link
Contributor Author

…well, okay, it would have worked if we had a working llvm-profdata (which you can get through rustup) and llvm-cov (which you currently can't). I suppose we could pin to a particular LLVM version?

@jrose-signal jrose-signal force-pushed the jrose/rust-coverage branch 5 times, most recently from 190e344 to 6d2b80e Compare October 30, 2020 00:48
@jack-signal
Copy link
Contributor

Do the llvm-cov and Rust's LLVM version need to strictly match? I thought llvm-cov was just using gcov format which is pretty standard iirc. If not, then we can just use llvm-cov from the Ubuntu llvm package.

@jrose-signal
Copy link
Contributor Author

llvm-cov is needed to go from profdata to gcov; the way I've been setting it up has been skipping the gcov step. As far as I know profdata is a fairly stable format but the LLVM in Ubuntu's default package repository is super old.

@jack-signal
Copy link
Contributor

LLVM in Ubuntu's default package repository is super old.

I was confused by this statement since Ubuntu 20.04 has LLVM 10, and LLVM 11 was only released this past summer. But then I see that "ubuntu-latest" image is ... not the latest (https://github.com/actions/virtual-environments) and we need to request "ubuntu-20.04" instead.

@jrose-signal
Copy link
Contributor Author

Hm, I'll try Ubuntu 20.04, but maybe I'm wrong about the cause instead—maybe profdata isn't as stable as I hoped. It's just funny cause this all works on my machine, using Xcode's llvm-profdata and llvm-cov and Rust's -Zinstrument-coverage. That's what had me assuming it was a format problem.

This is using the still-experimental -Zinstrument-coverage, so it may
not be perfect, but hopefully it gives us a starting point.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants