SHELL := /bin/bash
TOOLCHAIN := nightly
CARGO := cargo +$(TOOLCHAIN)
.PHONY: help fmt fmt-check clippy test build ci
help:
@echo "Targets:"
@echo " make fmt - run rustfmt with the CI toolchain"
@echo " make fmt-check - check formatting with the CI toolchain"
@echo " make clippy - run clippy with warnings denied"
@echo " make test - run the test suite"
@echo " make build - build the workspace"
@echo " make ci - run the same checks as GitHub Actions"
fmt:
$(CARGO) fmt --all
fmt-check:
$(CARGO) fmt --all -- --check
clippy:
$(CARGO) clippy --all-targets --all-features -- -D warnings
test:
$(CARGO) test --all-features --workspace
build:
$(CARGO) build --all-features --workspace
ci: fmt-check clippy test