forked from rust-bitcoin/rust-psbt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
65 lines (50 loc) · 1.82 KB
/
justfile
File metadata and controls
65 lines (50 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Once just v1.39.0 is widely deployed, simplify with the `read` function.
NIGHTLY_VERSION := trim(shell('cat "$1"', justfile_directory() / "nightly-version"))
_default:
@just --list
# Install rbmt (Rust Bitcoin Maintainer Tools).
@_install-rbmt:
cargo install --quiet --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev $(cat {{justfile_directory()}}/rbmt-version) cargo-rbmt
# Cargo check everything.
check:
cargo check --all --all-targets --all-features
# Cargo build everything.
build:
cargo build --all --all-targets --all-features
# Test everything.
test:
cargo test --all-targets --all-features
just test-bitcoind
# Test bitcoind integration with a bitcoind version.
test-bitcoind version="29_0":
cd {{justfile_directory()}}/bitcoind-tests && cargo test --features={{version}}
# Lint everything.
lint:
cargo +{{NIGHTLY_VERSION}} clippy --all-targets --all-features -- --deny warnings
# Run cargo fmt
fmt:
cargo +{{NIGHTLY_VERSION}} fmt --all
# Generate documentation.
docsrs *flags:
RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +{{NIGHTLY_VERSION}} doc --all-features {{flags}}
# Update the recent and minimal lock files using rbmt.
[group('tools')]
@update-lock-files: _install-rbmt
rustup run {{NIGHTLY_VERSION}} cargo rbmt lock
# Ensure the exposed API files in api/ are up-to-date.
[group('tools')]
check-api: _install-rbmt
cargo +{{NIGHTLY_VERSION}} rbmt api
# Run CI tasks with rbmt.
[group('ci')]
@ci task toolchain="stable" lock="recent": _install-rbmt
RBMT_LOG_LEVEL=quiet rustup run {{toolchain}} cargo rbmt --lock-file {{lock}} {{task}}
# Test crate.
[group('ci')]
ci-test: (ci "test stable")
# Lint crate.
[group('ci')]
ci-lint: (ci "lint" NIGHTLY_VERSION)
# Bitcoin core integration tests.
[group('ci')]
ci-integration: (ci "integration")