Skip to content

Commit cbfe991

Browse files
committed
Merge #668: Add justfile
9f5849f Add justfile (Tobin C. Harding) Pull request description: Add a `just` config file with various useful commands. Note that a bunch of these commands do not succeed currently on master, specifically: - just lint - just docsrs - just sane Will fix as separate PRs ACKs for top commit: apoelstra: ACK 9f5849f Tree-SHA512: 59e7c0feb72e43f3b3e9e89d1d6549f57c7fa7ca1cd48eb845ef90ddec7374c2478380c5763a041849c5113153139fb90e2b2865a1c72532aadd618d24449816
2 parents 599bc69 + 9f5849f commit cbfe991

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

justfile

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
default:
2+
@just --list
3+
4+
# Cargo build everything.
5+
build:
6+
cargo build --all-targets --all-features
7+
8+
# Cargo check everything.
9+
check:
10+
cargo check --all-targets --all-features
11+
12+
# Lint everything.
13+
lint:
14+
cargo +nightly clippy --all-targets --all-features -- --deny warnings
15+
16+
# Run the formatter.
17+
fmt:
18+
cargo +nightly fmt
19+
20+
# Check the formatting.
21+
fmt-check:
22+
cargo +nightly fmt --check
23+
24+
# Run the benchmark suite.
25+
bench:
26+
RUSTFLAGS='--cfg=bench' cargo +nightly bench
27+
28+
# Build the docs (same as for docs.rs).
29+
docsrs:
30+
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --all-features -- -D rustdoc::broken-intra-doc-links
31+
32+
# Quick and dirty CI useful for pre-push checks.
33+
sane: fmt-check lint
34+
cargo test --quiet --all-targets --no-default-features --features > /dev/null || exit 1
35+
cargo test --quiet --all-targets > /dev/null || exit 1
36+
cargo test --quiet --all-targets --all-features > /dev/null || exit 1
37+
38+
# doctests don't get run from workspace root with `cargo test`.
39+
cargo test --quiet --doc || exit 1

0 commit comments

Comments
 (0)