File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 3535 with :
3636 cache-targets : true # cache build artifacts
3737 cache-bin : true # cache the ~/.cargo/bin directory
38+ - name : Verify bin_tests contribution to coverage
39+ run : |
40+ cargo llvm-cov nextest --no-report --package bin_tests
41+ echo "=== Profraw files created ==="
42+ find target/llvm-cov-target -name "*.profraw" -ls
43+ cargo llvm-cov report --package bin_tests --summary-only
44+ cargo clean
3845 - name : Generate code coverage (including doc tests)
3946 run : |
4047 cargo llvm-cov --all-features --workspace --no-report nextest
Original file line number Diff line number Diff line change @@ -66,6 +66,13 @@ fn inner_build_artifact(c: &ArtifactsBuild) -> anyhow::Result<PathBuf> {
6666 build_cmd. env ( "RUSTFLAGS" , rustflags) ;
6767 }
6868
69+ // Pass CARGO_TARGET_DIR to ensure we build in the same target directory
70+ // that cargo-llvm-cov is using (e.g., target/llvm-cov-target/)
71+ // Without this, cargo build would use target/debug/ and miss instrumentation
72+ if let Ok ( target_dir) = env:: var ( "CARGO_TARGET_DIR" ) {
73+ build_cmd. env ( "CARGO_TARGET_DIR" , target_dir) ;
74+ }
75+
6976 let output = build_cmd. output ( ) . unwrap ( ) ;
7077 if !output. status . success ( ) {
7178 anyhow:: bail!(
You can’t perform that action at this time.
0 commit comments