-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 1.15 KB
/
Copy pathMakefile
File metadata and controls
39 lines (29 loc) · 1.15 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
# Collects inspiration from https://github.com/0xMiden/miden-base/blob/983357b2ad42f6e8d3c338d460a69479b99a1136/Makefile
.DEFAULT_GOAL := help
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: clippy
clippy: ## Runs clippy showing warnings
cargo clippy --all-targets -- -D warnings
.PHONY: format
format: ## Formats source tree
cargo fmt --all
.PHONY: test
test: ## Run all tests
RUST_BACKTRACE=1 cargo test --profile test-release
.PHONY: bench
bench: ## Run all benchmarks
cargo bench --profile optimized
.PHONY: coverage
coverage: ## Generates HTML code coverage report, using `cargo-tarpaulin`
cargo tarpaulin -t 600 --profile test-release --out Html
.PHONY: build
build: ## Builds `decds` executable, placing in `./target/optimized/decds`
RUSTFLAGS='-C target-cpu=native' cargo build --profile optimized
.PHONY: install
install: ## Installs `decds` executable in `$HOME/.cargo/bin`
RUSTFLAGS='-C target-cpu=native' cargo install --profile optimized --path decds-bin --locked
.PHONY: clean
clean: ## Removes cargo target directory
cargo clean