From f749975fd438d74375b027b6d93cfcf776ed3968 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 17 May 2024 14:08:12 +1000 Subject: [PATCH] Add justfile and nightly config In preparation for using a pinned nightly in CI add a `nightly-version` file and also a `justfile` that uses it. --- justfile | 38 ++++++++++++++++++++++++++++++++++++++ nightly-version | 1 + 2 files changed, 39 insertions(+) create mode 100644 justfile create mode 100644 nightly-version diff --git a/justfile b/justfile new file mode 100644 index 0000000..22dbfbc --- /dev/null +++ b/justfile @@ -0,0 +1,38 @@ +default: + @just --list + +# Cargo build everything. +build: + cargo build --workspace --all-targets --all-features + +# Cargo check everything. +check: + cargo check --workspace --all-targets --all-features + +# Lint everything. +lint: + cargo +$(cat ./nightly-version) clippy --workspace --all-targets --all-features -- --deny warnings + +# Run cargo fmt +fmt: + cargo +$(cat ./nightly-version) fmt --all + +# Check the formatting +format: + cargo +$(cat ./nightly-version) fmt --all --check + +# Quick and dirty CI useful for pre-push checks. +sane: lint + cargo test --quiet --workspace --all-targets --no-default-features > /dev/null || exit 1 + cargo test --quiet --workspace --all-targets > /dev/null || exit 1 + cargo test --quiet --workspace --all-targets --all-features > /dev/null || exit 1 + + # doctests don't get run from workspace root with `cargo test`. + cargo test --quiet --workspace --doc || exit 1 + + # Make an attempt to catch feature gate problems in doctests + cargo test --manifest-path bitcoin/Cargo.toml --doc --no-default-features > /dev/null || exit 1 + +# Update the recent and minimal lock files. +update-lock-files: + contrib/update-lock-files.sh diff --git a/nightly-version b/nightly-version new file mode 100644 index 0000000..c33b8d1 --- /dev/null +++ b/nightly-version @@ -0,0 +1 @@ +nightly-2024-08-04