-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
38 lines (26 loc) · 1.49 KB
/
Makefile
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
.PHONY : tests build
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
##@ Testing
clippy: ## Run cargo-clippy
cargo clippy --all-features
check: ## build features in commmon combination to be sure it all stays together
cargo check --all-features
cargo check --no-default-features
cargo check --features progress-tree,progress-tree-hp-hashmap
cargo check --features render-tui,render-tui-crossterm
cargo check --features render-line,render-line-crossterm
cargo check --features render-line,render-line-crossterm,render-tui,render-tui-crossterm,signal-hook,render-line-autoconfigure --example dashboard
cargo check --features unit-bytes,unit-duration,unit-human,render-tui,render-tui-crossterm,render-line,render-line-crossterm,signal-hook --example units
cargo check
unit-test: ## Run all unit tests
cargo test --features unit-bytes,unit-human,unit-duration
tests: clippy check unit-test ## Run all tests we have
bench: ## Run criterion based benchmark, works on stable Rust
cargo bench
bench-ci: ## Just build the criterion based benchmark, avoid running.
cargo bench --no-run
##@ Development
fmt: ## run nightly rustfmt for its extra features, but check that it won't upset stable rustfmt
cargo +nightly fmt --all -- --config-path rustfmt-nightly.toml
cargo +stable fmt --all -- --check