Skip to content

Commit f2bdd18

Browse files
authored
Update codecov CI to stable version of Rust; change conformance test GH Action to use nightly (#383)
* Update codecov CI to stable version of Rust * Try updating conformance test report generation rust toolchains to nightly
1 parent 114e1d5 commit f2bdd18

File tree

2 files changed

+12
-22
lines changed

2 files changed

+12
-22
lines changed

.github/workflows/ci_build_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
- name: Rust Toolchain
9595
uses: dtolnay/rust-toolchain@master
9696
with:
97-
toolchain: stable
97+
toolchain: nightly-2023-03-09
9898
- uses: actions/cache@v3
9999
id: restore-build
100100
with:
@@ -134,7 +134,7 @@ jobs:
134134
- name: Rust Toolchain
135135
uses: dtolnay/rust-toolchain@master
136136
with:
137-
toolchain: stable
137+
toolchain: nightly-2023-03-09
138138
- uses: actions/cache@v3
139139
id: restore-build-and-conformance
140140
with:

.github/workflows/coverage.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,19 @@ jobs:
2525
- name: Rust Toolchain
2626
uses: dtolnay/rust-toolchain@master
2727
with:
28-
# Coverage requires the nightly toolchain because it uses the presently unstable `-Z profile` feature
29-
# See: https://github.com/rust-lang/rust/issues/42524
30-
# See also: https://github.com/actions-rs/grcov#usage
31-
# nightly can be very volatile--pin this to a version we know works well...
32-
toolchain: nightly-2023-03-09
28+
toolchain: stable
29+
# We need this component to generate source coverage in stable
30+
components: llvm-tools-preview
31+
- name: Cargo Install
32+
run: cargo install cargo-llvm-cov
3333
# Conformance tests are run with 'conformance_test' feature. Since step runs with 'all-features', the conformance
3434
# test are also run, which can cause `cargo test` to fail. Add 'continue-on-error' step to prevent GH Actions
3535
# failure.
36-
- name: Cargo Test
36+
- name: Cargo Test w/ Coverage
3737
continue-on-error: true
38-
run: cargo test --verbose --workspace --all-features --no-fail-fast -- -Z unstable-options --ensure-time
39-
env:
40-
CARGO_INCREMENTAL: '0'
41-
# https://github.com/marketplace/actions/rust-grcov
42-
# For some reason the panic=abort modes don't work for build script...
43-
#RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
44-
#RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
45-
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
46-
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
47-
- id: coverage
48-
name: Code Coverage
49-
uses: actions-rs/[email protected]
38+
run: cargo llvm-cov --verbose --workspace --all-features --ignore-run-fail --codecov --output-path codecov.json
5039
- name: Codecov Upload
51-
uses: codecov/codecov-action@v1
40+
uses: codecov/codecov-action@v3
5241
with:
53-
files: ${{ steps.coverage.outputs.report }}
42+
files: codecov.json
43+
fail_ci_if_error: true

0 commit comments

Comments
 (0)