From e73bd0a73acd5d9860ffcc496d204832b8094ea4 Mon Sep 17 00:00:00 2001 From: unspeaker Date: Sat, 15 Mar 2025 17:12:55 +0200 Subject: [PATCH] add justfile --- Justfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Justfile diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..af61a41 --- /dev/null +++ b/Justfile @@ -0,0 +1,15 @@ +covfig := "CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' RUSTDOCFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cov/cargo-test-%p-%m.profraw'" +grcov-binary := "--binary-path ./target/coverage/deps/" +grcov-ignore := "--ignore-not-existing --ignore '../*' --ignore \"/*\" --ignore 'target/*'" +cov: + {{covfig}} time cargo test -j4 --workspace --profile coverage + rm -rf target/coverage/html || true + {{covfig}} time grcov . -s . {{grcov-binary}} {{grcov-ignore}} -t html -o target/coverage/html +cov-md: + {{covfig}} time cargo test -j4 --workspace --profile coverage + {{covfig}} time grcov . -s . {{grcov-binary}} {{grcov-ignore}} -t markdown | sort +cov-md-ci: + {{covfig}} time cargo test -j4 --workspace --profile coverage -- --skip test_tui_engine + {{covfig}} time grcov . -s . {{grcov-binary}} {{grcov-ignore}} -t markdown | sort +doc: + cargo doc