diff --git a/.github/workflows/cargo-llvm-cov.yml b/.github/workflows/cargo-llvm-cov.yml index d0320ecf1b45e..a0612df8fd1cf 100644 --- a/.github/workflows/cargo-llvm-cov.yml +++ b/.github/workflows/cargo-llvm-cov.yml @@ -2,6 +2,30 @@ name: Code Coverage on: workflow_dispatch: +env: + CARGO_TERM_COLOR: always + # Disable incremental compilation. + # + # Incremental compilation is useful as part of an edit-build-test-edit cycle, + # as it lets the compiler avoid recompiling code that hasn't changed. However, + # on CI, we're not making small edits; we're almost always building the entire + # project from scratch. Thus, incremental compilation on CI actually + # introduces *additional* overhead to support making future builds + # faster...but no future builds will ever occur in any given CI environment. + # + # See https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow + # for details. + CARGO_INCREMENTAL: 0 + # Allow more retries for network requests in cargo (downloading crates) and + # rustup (installing toolchains). This should help to reduce flaky CI failures + # from transient network timeouts or other issues. + CARGO_NET_RETRY: 10 + RUSTUP_MAX_RETRIES: 10 + # Don't emit giant backtraces in the CI logs. + RUST_BACKTRACE: short + # RUSTFLAGS: -D warnings + RUSTDOCFLAGS: -D warnings + jobs: cargo-llvm-cov: name: Generate code coverage diff --git a/scripts/simtest/cargo-simtest b/scripts/simtest/cargo-simtest index ef1dcaaa3eaff..1e117b7800fe6 100755 --- a/scripts/simtest/cargo-simtest +++ b/scripts/simtest/cargo-simtest @@ -100,7 +100,7 @@ if [ "$1" = "build" ]; then fi if [ $CODE_COV == 1 ]; then - CARGO_COMMAND=(llvm-cov --ignore-run-fail --all-features --workspace --lcov --output-path lcov.info nextest --cargo-profile simulator) + CARGO_COMMAND=(llvm-cov --ignore-run-fail --lcov --output-path lcov.info nextest --cargo-profile simulator) fi # Must supply a new temp dir - the test is deterministic and can't choose one randomly itself.