From 1e22d74270b357566ef266b790635ce6319dc569 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 27 Mar 2024 11:09:57 +1100 Subject: [PATCH] Add a justfile The `just` command makes scripts and commands discoverable for new devs and old devs alike when switching between repos. Add a justfile copied from bitcoin with changes as required. --- justfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..2f060dd --- /dev/null +++ b/justfile @@ -0,0 +1,30 @@ +default: + @just --list + +# Cargo build everything. +build: + cargo build --all-targets --all-features + +# Cargo check everything. +check: + cargo check --all-targets --all-features + +# Lint everything. +lint: + cargo clippy --all-targets --all-features -- --deny warnings + +# Check the formatting +format: + cargo +nightly fmt --check + +# Quick and dirty CI useful for pre-push checks. +sane: lint + cargo test --quiet --all-targets --no-default-features > /dev/null || exit 1 + cargo test --quiet --all-targets > /dev/null || exit 1 + cargo test --quiet --all-targets --all-features > /dev/null || exit 1 + + # doctests don't get run from workspace root with `cargo test`. + cargo test --quiet --doc || exit 1 + + # Make an attempt to catch feature gate problems in doctests + cargo test --manifest-path Cargo.toml --doc --no-default-features > /dev/null || exit 1