-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update codecov CI to stable version of Rust (#10)
* Update codecov CI to stable version of Rust * Get rid of -Z option in normal CI build action
- Loading branch information
Showing
2 changed files
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,25 +25,19 @@ jobs: | |
- name: Rust Toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
# Coverage requires the nightly toolchain because it uses the presently unstable `-Z profile` feature | ||
# See: https://github.com/rust-lang/rust/issues/42524 | ||
# See also: https://github.com/actions-rs/grcov#usage | ||
# nightly can be very volatile--pin this to a version we know works well... | ||
toolchain: nightly-2023-03-09 | ||
- name: Cargo Test | ||
run: cargo test --verbose --workspace | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
# https://github.com/marketplace/actions/rust-grcov | ||
# For some reason the panic=abort modes don't work for build script... | ||
#RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
#RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off' | ||
- id: coverage | ||
name: Code Coverage | ||
uses: actions-rs/[email protected] | ||
toolchain: stable | ||
# We need this component to generate source coverage in stable | ||
components: llvm-tools-preview | ||
- name: Cargo Install | ||
run: cargo install cargo-llvm-cov | ||
# Conformance tests are run with 'conformance_test' feature. Since step runs with 'all-features', the conformance | ||
# test are also run, which can cause `cargo test` to fail. Add 'continue-on-error' step to prevent GH Actions | ||
# failure. | ||
- name: Cargo Test w/ Coverage | ||
continue-on-error: true | ||
run: cargo llvm-cov --verbose --workspace --all-features --no-fail-fast --codecov --output-path codecov.json | ||
- name: Codecov Upload | ||
uses: codecov/codecov-action@v1 | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ${{ steps.coverage.outputs.report }} | ||
files: codecov.json | ||
fail_ci_if_error: true |