@@ -945,7 +945,7 @@ jobs:
945945 - uses : dtolnay/rust-toolchain@master
946946 with :
947947 toolchain : ${{ matrix.job.toolchain }}
948- components : rustfmt
948+ components : rustfmt, llvm-tools-preview
949949 - uses : taiki-e/install-action@nextest
950950 - uses : taiki-e/install-action@grcov
951951 - uses : Swatinem/rust-cache@v2
@@ -1014,17 +1014,19 @@ jobs:
10141014 run : cargo nextest run --profile ci --hide-progress-bar ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} -p uucore -p coreutils
10151015 env :
10161016 RUSTC_WRAPPER : " "
1017- RUSTFLAGS : " -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
1017+ RUSTFLAGS : " -Cprofile-generate=${{ vars.RUNNER_TEMP }}/target/debug -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
10181018 RUSTDOCFLAGS : " -Cpanic=abort"
10191019 RUST_BACKTRACE : " 1"
1020+ LLVM_PROFILE_FILE : " coreutils-%p-%m.profraw"
10201021 # RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
10211022 - name : Test individual utilities
10221023 run : cargo nextest run --profile ci --hide-progress-bar ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }}
10231024 env :
10241025 RUSTC_WRAPPER : " "
1025- RUSTFLAGS : " -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
1026+ RUSTFLAGS : " -Cprofile-generate=${{ vars.RUNNER_TEMP }}/target/debug -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
10261027 RUSTDOCFLAGS : " -Cpanic=abort"
10271028 RUST_BACKTRACE : " 1"
1029+ LLVM_PROFILE_FILE : " coreutils-%p-%m.profraw"
10281030 # RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
10291031 - name : Generate coverage data (via `grcov`)
10301032 id : coverage
@@ -1037,9 +1039,9 @@ jobs:
10371039 # GRCOV_EXCLUDE_OPTION='--excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"' ## `grcov` ignores these params when passed as an environment variable (why?)
10381040 mkdir -p "${COVERAGE_REPORT_DIR}"
10391041 # display coverage files
1040- 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
1042+ grcov . --binary-path="${COVERAGE_REPORT_DIR}" -- output-type files --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()" | sort --unique
10411043 # generate coverage report
1042- 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\()"
1044+ grcov . --binary-path="${COVERAGE_REPORT_DIR}" -- 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\()"
10431045 echo "report=${COVERAGE_REPORT_FILE}" >> $GITHUB_OUTPUT
10441046 - name : Upload coverage results (to Codecov.io)
10451047 uses : codecov/codecov-action@v4
0 commit comments