-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
45 lines (34 loc) · 884 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
44
45
RELEASE ?= 0
TEST_ARGS ?=
ifeq ($(RELEASE),1)
_BUILD_RELEASE_FLAGS = --release
else
_BUILD_RELEASE_FLAGS =
endif
BUILD_FLAGS = $(_BUILD_RELEASE_FLAGS)
.PHONY: build
build: ## build the binary
cargo build --locked $(BUILD_FLAGS)
.PHONY: test
test: ## run all tests
GIT_CONFIG_GLOBAL= cargo nextest run --locked --workspace --no-fail-fast $(TEST_ARGS)
_COV_FLAGS = --hide-instantiations
.PHONY: cover
cover: ## generate a coverage report
cargo llvm-cov nextest --workspace --locked --lcov --output-path lcov.info --no-fail-fast
cargo llvm-cov report $(_COV_FLAGS)
.PHONY: cover-html
cover-html: ## generate an HTML coverage report
cover-html: cover
cargo llvm-cov report $(_COV_FLAGS) --html
.PHONY: fmt
fmt: ## reformat code
cargo fmt
.PHONY: lint
lint: fmt-check clippy
.PHONY: fmt-check
fmt-check:
cargo fmt --check
.PHONY: clippy
clippy:
cargo clippy --workspace