Skip to content

Commit

Permalink
adding env. variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ebmifa committed Jan 30, 2024
1 parent 589974f commit 4da4819
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/cargo-llvm-cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/simtest/cargo-simtest
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4da4819

Please sign in to comment.