-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (39 loc) · 1.58 KB
/
Copy pathMakefile
File metadata and controls
53 lines (39 loc) · 1.58 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
.PHONY: help fmt fmt-check lint test build build-release check all coverage coverage-html coverage-lcov large-fixture
CARGO ?= cargo
help:
@echo "Targets:"
@echo " fmt - format all code (cargo fmt --all)"
@echo " fmt-check - verify formatting without changes (CI gate)"
@echo " lint - clippy on all targets, warnings as errors (CI gate)"
@echo " test - cargo test"
@echo " build - cargo build --all-targets"
@echo " build-release - cargo build --release"
@echo " check - fmt-check + lint + test (run before pushing)"
@echo " all - fmt + check + build"
@echo " coverage - test coverage summary in the terminal (cargo-llvm-cov)"
@echo " coverage-html - generate an HTML coverage report under target/llvm-cov/html"
@echo " coverage-lcov - emit lcov.info for external tooling"
@echo " large-fixture - (re)generate the gitignored stress fixture for manual perf runs (see docs/TESTING.md)"
fmt:
$(CARGO) fmt --all
fmt-check:
$(CARGO) fmt --all --check
lint:
$(CARGO) clippy --all-targets -- -D warnings
test:
$(CARGO) test
build:
$(CARGO) build --all-targets
build-release:
$(CARGO) build --release
check: fmt-check lint test
all: fmt check build
coverage:
$(CARGO) llvm-cov --all-targets
coverage-html:
$(CARGO) llvm-cov --all-targets --html
coverage-lcov:
$(CARGO) llvm-cov --all-targets --lcov --output-path lcov.info
large-fixture:
./scripts/gen-large-fixture.sh > fixtures/specialized/large.md
@echo "Generated fixtures/specialized/large.md (gitignored). Remove it when done perf-testing: rm fixtures/specialized/large.md"