-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
88 lines (68 loc) · 2.18 KB
/
Copy pathjustfile
File metadata and controls
88 lines (68 loc) · 2.18 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
86
87
export RUSTFLAGS := "-D warnings"
export RUSTDOCFLAGS := "-D warnings"
[private]
default:
just -l --unsorted
###########
### RUN ###
###########
# Check syntax, formatting, clippy, deny, semver, ...
check: (check_impl "" "" ) \
(check_impl "" " --all-features") \
(check_impl " --release" "" ) \
(check_impl " --release" " --all-features")
[private]
check_impl mode features: (cargo_check mode features) \
(cargo_hack mode) \
cargo_fmt \
(cargo_clippy mode features) \
cargo_deny
[private]
cargo_check mode features:
cargo check --workspace --all-targets{{ mode }}{{ features }}
cargo doc --no-deps --document-private-items --keep-going{{ mode }}{{ features }}
[private]
cargo_hack mode: install_cargo_hack
cargo hack check --workspace --all-targets{{ mode }}
[private]
cargo_fmt: install_rust_nightly install_rust_nightly_fmt
cargo +nightly fmt --check
[private]
cargo_clippy features mode: install_cargo_clippy
cargo clippy --workspace --all-targets{{ features }}{{ mode }}
[private]
cargo_deny: install_cargo_deny
cargo deny check
# Test multiple configurations
test: (test_impl "" "" ) \
(test_impl "" " --all-features") \
(test_impl " --release" "" ) \
(test_impl " --release" " --all-features")
[private]
test_impl mode features: (cargo_test mode features)
[private]
cargo_test features mode:
cargo test --workspace --all-targets{{ features }}{{ mode }}
# Audit advisories, bans, licenses, and sources
audit: cargo_deny
###############
### INSTALL ###
###############
[private]
install_rust_nightly:
# Fix issue
rustup update --no-self-update nightly
rustup set profile minimal
# rustup toolchain install nightly --profile minimal
[private]
install_rust_nightly_fmt:
rustup component add --toolchain nightly rustfmt
[private]
install_cargo_clippy:
rustup component add clippy
[private]
install_cargo_deny:
cargo install --locked cargo-deny
[private]
install_cargo_hack:
cargo install --locked cargo-hack