forked from rust-bitcoin/rust-bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
85 lines (65 loc) · 2.2 KB
/
justfile
File metadata and controls
85 lines (65 loc) · 2.2 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
set positional-arguments
# Once just v1.39.0 is widely deployed, simplify with the `read` function.
NIGHTLY_VERSION := trim(shell('cat "$1"', justfile_directory() / "nightly-version"))
alias ulf := update-lock-files
_default:
@just --list
# Install necessary dev tools on system.
_install-tools:
@{{justfile_directory()}}/contrib/ensure-maintainer-tools.sh
# Run the given CI task using maintainer tools.
[group('ci')]
@ci task toolchain="stable" lock="recent": _install-tools
RBMT_LOG_LEVEL=quiet cargo +{{toolchain}} rbmt {{task}} --lock-file {{lock}}
# Test workspace with stable toolchain.
[group('ci')]
ci-stable: (ci "test stable")
# Lint workspace.
[group('ci')]
ci-lint: (ci "lint" NIGHTLY_VERSION)
# Generate documentation.
[group('ci')]
ci-docs: (ci "docs")
# Generate documentation with nightly.
[group('ci')]
ci-docsrs: (ci "docsrs" NIGHTLY_VERSION)
# Run benchmarks.
[group('ci')]
ci-bench: (ci "bench")
# Quick workspace lint.
@lint:
cargo +{{NIGHTLY_VERSION}} clippy --quiet --workspace --all-targets --all-features -- --deny warnings
# Quick workspace sanity check.
@sane: lint
cargo test --quiet --workspace --all-targets --no-default-features
cargo test --quiet --workspace --all-targets --all-features
# Format workspace.
@fmt:
cargo +{{NIGHTLY_VERSION}} fmt --all
# Generate documentation (accepts cargo doc args, e.g. --open).
@docsrs *flags:
RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +{{NIGHTLY_VERSION}} doc --all-features {{flags}}
# Check for API changes.
[group('scripts')]
check-api:
{{justfile_directory()}}/contrib/check-for-api-changes.sh
# Query the current API.
[group('scripts')]
@query-api crate command:
{{justfile_directory()}}/contrib/api.sh $1 $2
# Update the recent and minimal lock files.
[group('scripts')]
@update-lock-files: _install-tools
cargo +{{NIGHTLY_VERSION}} rbmt lock
# Install githooks.
[group('scripts')]
githooks-install:
{{justfile_directory()}}/contrib/copy-githooks.sh
# Remove githooks.
[group('scripts')]
githooks-remove:
{{justfile_directory()}}/contrib/copy-githooks.sh -r
# Generate a dependency tree for workspace crates.
[group('scripts')]
gen-dep-tree:
{{justfile_directory()}}/contrib/gen-dep-tree.sh