@@ -110,6 +110,7 @@ jobs:
110
110
111
111
- name : rust toolchain ~ install
112
112
uses : dtolnay/rust-toolchain@nightly
113
+ - run : rustup component add llvm-tools-preview
113
114
- name : install GNU patch on MacOS
114
115
if : runner.os == 'macOS'
115
116
run : brew install gpatch
@@ -122,8 +123,9 @@ jobs:
122
123
env :
123
124
CARGO_INCREMENTAL : " 0"
124
125
RUSTC_WRAPPER : " "
125
- RUSTFLAGS : " -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
126
+ RUSTFLAGS : " -Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
126
127
RUSTDOCFLAGS : " -Cpanic=abort"
128
+ LLVM_PROFILE_FILE : " diffutils-%p-%m.profraw"
127
129
- name : " `grcov` ~ install"
128
130
id : build_grcov
129
131
shell : bash
@@ -151,9 +153,9 @@ jobs:
151
153
COVERAGE_REPORT_FILE="${COVERAGE_REPORT_DIR}/lcov.info"
152
154
mkdir -p "${COVERAGE_REPORT_DIR}"
153
155
# display coverage files
154
- grcov . --output-type files --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\() " | sort --unique
156
+ grcov . --output-type files --binary-path "${COVERAGE_REPORT_DIR} " | sort --unique
155
157
# generate coverage report
156
- grcov . --output-type lcov --output-path "${COVERAGE_REPORT_FILE}" --branch --ignore build.rs --ignore "vendor/* " --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"
158
+ grcov . --output-type lcov --output-path "${COVERAGE_REPORT_FILE}" --binary-path "${COVERAGE_REPORT_DIR} " --branch
157
159
echo "report=${COVERAGE_REPORT_FILE}" >> $GITHUB_OUTPUT
158
160
- name : Upload coverage results (to Codecov.io)
159
161
uses : codecov/codecov-action@v4
0 commit comments