-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
120 lines (94 loc) · 2.83 KB
/
justfile
File metadata and controls
120 lines (94 loc) · 2.83 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/usr/bin/env just --justfile
set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"]
# MSRV of the project
msrv := "1.85.1"
alias b := build
alias c := check
alias cc := code-coverage
alias ci := continues-integration
alias d := doc
alias l := lint
alias la := lint-all-features
alias ld := lint-default
alias ln := lint-no-std
alias t := test
alias ta := test-all-features
alias td := test-default
alias tn := test-no-std
alias msrv := check-msrv
# list recipies
default:
just --list
# build the crate for debugging
build:
cargo build --all-features
# check syntax in all targets
check:
cargo check --all-targets --all-features
# linting code using Clippy
lint:
just lint-all-features
just lint-no-std
just lint-default
just lint-no-features
# linting code using Clippy with all features enabled
lint-all-features:
cargo clippy --all-targets --all-features
# linting code using Clippy with default features enabled
lint-default:
cargo clippy --all-targets
# linting code using Clippy for no-std environment
lint-no-std:
cargo clippy --all-targets --no-default-features --features "colored, float-cmp, num-bigint, recursive, regex, rust-decimal, bigdecimal"
# linting code using Clippy with no features enabled
lint-no-features:
cargo clippy --all-targets --no-default-features
# run all tests
test:
just test-all-features
just test-no-std
just test-default
just test-no-features
# run tests for all features
test-all-features:
cargo test --all-features
# run tests for default features
test-default:
cargo test
# run tests for no-std environment
test-no-std:
cargo test --no-default-features --features "colored, float-cmp, num-bigint, recursive, regex, rust-decimal, bigdecimal"
# run tests with no features enabled
test-no-features:
cargo test --no-default-features
# run code coverage (does not include doc-tests)
code-coverage:
cargo +nightly llvm-cov clean
cargo +nightly llvm-cov --branch --all-features --no-report
cargo +nightly llvm-cov report --html --open --ignore-filename-regex "tests|test_dsl"
# build the crate for release
build-release:
cargo build --release
# clean the workspace
clean:
cargo clean
# generate docs (but don't open it)
[env("RUSTDOCFLAGS", "--cfg docsrs")]
build-docs *options:
cargo +nightly doc --all-features --no-deps {{ options }}
# generate and open docs locally
doc:
just build-docs --open
# installs the MSRV toolchain
setup-msrv:
rustup toolchain install {{ msrv }} --profile minimal
# check the production code with MSRV (without tests or dev-dependencies)
check-msrv: setup-msrv
rustup run {{ msrv }} cargo check --lib
# performs continues integration (CI) like tasks on the local machine
[env("RUSTFLAGS", "-D warnings")]
continues-integration:
just check-msrv
just lint
just test
just build-docs