forked from gosub-io/gosub-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (32 loc) · 949 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
42
43
.SILENT:
SHELL=/usr/bin/env bash -O globstar
all: help
test: test_commands 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
fix: ## Fix formatting and clippy errors
cargo fmt
cargo clippy --fix --allow-dirty --allow-staged
test_unit:
source test-utils.sh ;\
section "Cargo test" ;\
cargo test --features debug_parser
test_clippy:
source test-utils.sh ;\
section "Cargo clippy" ;\
cargo clippy -- -D warnings
test_fmt:
source test-utils.sh ;\
section "Cargo fmt" ;\
cargo fmt -- --check
test_commands:
cargo run --bin html5-parser-test >/dev/null
cargo run --bin parser-test >/dev/null
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}'