-
Notifications
You must be signed in to change notification settings - Fork 791
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: try running coverage for all OSes #1975
Conversation
1335fb2
to
f0d615c
Compare
Hmmm @taiki-e have you seen errors like these from running
I can reproduce locally with latest nightly if I run |
@davidhewitt That is a rustc bug: rust-lang/rust#85461 I'll implement a workaround on the cargo-llvm-cov side. |
Aha brilliant, thank you! |
@davidhewitt I've released cargo-llvm-cov 0.1.11, which implements a workaround for that issue. Could you try that version? |
.github/workflows/ci.yml
Outdated
- if: matrix.os.name == 'windows' | ||
name: install cargo-llvm-cov (windows) | ||
shell: powershell | ||
run: | | ||
wget https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${CARGO_LLVM_COV_VERSION}/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz -qO- | tar -xzvf - | ||
Invoke-WebRequest https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${Env:CARGO_LLVM_COV_VERSION}/cargo-llvm-cov-${Env:CARGO_LLVM_COV_ARCH}.zip -OutFile cargo-llvm-cov.zip | ||
Expand-Archive cargo-llvm-cov.zip | ||
mv ./cargo-llvm-cov/cargo-llvm-cov.exe ~/.cargo/bin | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
profile: minimal | ||
components: llvm-tools-preview | ||
- if: matrix.os.name != 'windows' | ||
name: install cargo-llvm-cov (unix) | ||
run: | | ||
wget https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${CARGO_LLVM_COV_VERSION}/cargo-llvm-cov-${CARGO_LLVM_COV_ARCH}.tar.gz -qO- | tar -xzvf - | ||
mv cargo-llvm-cov ~/.cargo/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, cargo-llvm-cov has both .tar.gz and .zip distribution on windows, so you can unify the installation script on both windows and unix (with shell: bash
). For example:
host=$(rustc -Vv | grep host | sed 's/host: //')
curl -fsSL https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${CARGO_LLVM_COV_VERSION}/cargo-llvm-cov-"$host".tar.gz | tar xzf - -C ~/.cargo/bin
Co-authored-by: Taiki Endo <[email protected]>
f0d615c
to
41280c0
Compare
Thanks @taiki-e, the windows job working great now! I think this looks like codecov is merging reports? Not super clear, I'm going to go ahead and merge this, might play around more another day. |
This may be due to the different path between windows and unix. (I feel it's a bit odd that codecov can't handle it, but we may need to do what cargo-llvm-cov's test is doing) |
Hmm interesting. We're not generating JSON coverage here though; we're using I have since noticed that codecov does update the coverage number reported in the PR as the separate jobs finish, so it's quite possible it is actually doing the right thing already. |
According to https://docs.codecov.com/docs/merging-reports if we upload multiple coverage reports they all get automatically merged. So I'm opening this PR to see what happens if I try that!