-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (44 loc) · 1.3 KB
/
Makefile
File metadata and controls
57 lines (44 loc) · 1.3 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
54
55
56
57
.PHONY: requirements develop build
requirements: ## install required dev dependencies
rustup component add rustfmt
rustup component add clippy
cargo install -f cargo-nextest
cargo install -f cargo-llvm-cov
cargo install -f wasm-bindgen-cli --version 0.2.106
rustup target add wasm32-unknown-unknown
develop: requirements ## install required dev dependencies
build: ## build release
cargo build --release --all-features
.PHONY: lint lints fix format
lint: ## run Clippy for linting, rustfmt for autoformat checks
cargo clippy --all-features
cargo fmt --all -- --check
# alias
lints: lint
fix: ## fix code with rustfmt
cargo fmt --all
#alias
format: fix
.PHONY: check checks
check:
cargo check --all-features
# alias
checks: check
.PHONY: test tests test-ci tests-ci
test: ## run the tests
cargo llvm-cov nextest --cobertura --output-path junit.xml
# alias
tests: test
coverage:
cargo llvm-cov nextest --lcov --output-path coverage
.PHONY: dist publish
dist: ## create dist
cargo publish --dry-run --allow-dirty
publish: ## publish to cargo
cargo publish
# Thanks to Francoise at marmelab.com for this
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
print-%:
@echo '$*=$($*)'