.PHONY: requirements develop build
requirements:
rustup component add rustfmt
rustup component add clippy
cargo install cargo-nextest --locked --force
cargo install cargo-llvm-cov --force
develop: requirements
build:
cargo build --release --all-features
.PHONY: lint lints fix format
lint:
cargo clippy --all-features
cargo fmt --all -- --check
lints: lint
fix:
cargo fmt --all
format: fix
.PHONY: check checks
check:
cargo check --all-features
checks: check
.PHONY: test tests test-ci tests-ci
test:
cargo llvm-cov nextest --cobertura --output-path junit.xml
tests: test
coverage:
cargo llvm-cov nextest --lcov --output-path coverage
.PHONY: dist publish
dist:
cargo publish --dry-run --allow-dirty
publish:
cargo publish
.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 '$*=$($*)'