-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (30 loc) · 981 Bytes
/
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
37
38
39
40
41
.SILENT:
SHELL=/usr/bin/env bash -O globstar
all: help
test: test_unit test_clippy test_fmt ## Runs tests
bench: ## Benchmark the project
cargo bench
build: ## Build the project
source test-utils.sh ;\
section "Cargo build" ;\
cargo build --all
fix-format: ## Fix formatting and clippy errors
cargo fmt --all
cargo clippy --all --fix --allow-dirty --allow-staged
check-format: test_clippy test_fmt ## Check the project for clippy and formatting errors
test_unit:
source test-utils.sh ;\
section "Cargo test" ;\
cargo test --all --no-fail-fast --all-features --all-targets
test_clippy:
source test-utils.sh ;\
section "Cargo clippy" ;\
cargo clippy -- -D warnings
test_fmt:
source test-utils.sh ;\
section "Cargo fmt" ;\
cargo fmt --all -- --check
help: ## Display available commands
echo "Available make commands:"
echo
grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'