You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
501766e feat: add `justfile` (Luis Schwab)
Pull request description:
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
### Description
Closes#1967.
This PR adds a `justfile`, updates the PR template to use it, and adds a section on the `README.md` to show available recipes.
These are the implemented recipes:
```justfile
alias b := build
alias c := check
alias f := fmt
alias t := test
alias p := pre-push
_default:
@just --list
# Build the project
build:
cargo build
# Check code: formatting, compilation, linting, and commit signature
check:
cargo +nightly fmt --all -- --check
cargo check --workspace --all-features
cargo clippy --all-features --all-targets -- -D warnings
@[ "$(git log --pretty='format:%G?' -1 HEAD)" = "N" ] && \
echo "\n⚠️ Unsigned commit: BDK requires that commits be signed." || \
true
# Format all code
fmt:
cargo +nightly fmt
# Run all tests for all crates with all features enabled
test:
@just _test-bitcoind_rpc
@just _test-chain
@just _test-core
@just _test-electrum
@just _test-esplora
@just _test-file_store
@just _test-testenv
_test-bitcoind_rpc:
cargo test -p bdk_bitcoind_rpc --all-features
_test-chain:
cargo test -p bdk_chain --all-features
_test-core:
cargo test -p bdk_core --all-features
_test-electrum:
cargo test -p bdk_electrum --all-features
_test-esplora:
cargo test -p bdk_esplora --all-features
_test-file_store:
cargo test -p bdk_file_store --all-features
_test-testenv:
cargo test -p bdk_testenv --all-features
# Run pre-push suite: format, check, and test
pre-push: fmt check test
```
`check` will verify if `HEAD` was signed and echo that warning if not. It does not check all commits, but I think that checking only the last is a pretty good heuristic (who signs the last commit only?).
Before pushing, one only needs to run `just p`.
### Checklists
#### All Submissions:
* [X] I've signed all my commits
* [X] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [X] I ran `just p` before pushing
ACKs for top commit:
ValuedMammal:
ACK 501766e
evanlinjin:
ACK 501766e
Tree-SHA512: b42109c7c3e01f529b794f37bacf8c6c2298243dd5f827c59ce74e7c64a4ef48eac84c4de86280bec828f56a81854c57458d9ea2b10acb83766fc1bdb34d24b6
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ To facilitate communication with other contributors, the project is making use
55
55
of GitHub's "assignee" field. First check that no one is assigned and then
56
56
comment suggesting that you're working on it. If someone is already assigned,
57
57
don't hesitate to ask if the assigned party or previous commenter are still
58
-
working on it if it has been awhile.
58
+
working on it if it has been a while.
59
59
60
60
Deprecation policy
61
61
------------------
@@ -87,7 +87,7 @@ Coding Conventions
87
87
------------------
88
88
89
89
This codebase uses spaces, not tabs.
90
-
Use `cargo fmt` with the default settings to format code before committing.
90
+
Run `just check` to check formatting, linting, compilation and commit signing, `just fmt`to format code before commiting, and `just test` to run tests for all crates.
91
91
This is also enforced by the CI.
92
92
All public items must be documented. We adhere to the [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/about.html) with respect to documentation.
93
93
@@ -105,6 +105,10 @@ Note that BDK is currently considered "pre-production" during this time, there
105
105
is no special handling of security issues. Please simply open an issue on
106
106
Github.
107
107
108
+
BDK requires all commits to be signed using PGP. Refer to
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ The workspace in this repository contains several crates in the `/crates` direct
39
39
|[`bitcoind_rpc`](./crates/bitcoind_rpc)| Extends [`bitcoincore-rpc`] for emitting blockchain data from the `bitcoind` RPC interface in the form that [`bdk_chain`] and `Wallet` can consume. ||
40
40
|[`file_store`](./crates/file_store)| Persistence backend for storing chain data in a single file. Intended for testing and development purposes, not for production. ||
41
41
42
-
The [`bdk_wallet`] repository and crate contains a higher level `Wallet` type that depends on the above lower-level mechanism crates.
42
+
The [`bdk_wallet`] repository and crate contains a higher level `Wallet` type that depends on the above lower-level mechanism crates.
43
43
44
44
Fully working examples of how to use these components are in `/examples`:
45
45
@@ -68,6 +68,12 @@ The following BDK crates maintains a MSRV of 1.63.0. To build these crates with
68
68
69
69
The MSRV of the `bdk_electrum` crate is 1.75.0.
70
70
71
+
## Just
72
+
73
+
This project has a [`justfile`](/justfile) for easy command running. You must have [`just`](https://github.com/casey/just) installed.
0 commit comments