diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-16 10:40:44 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-16 10:55:34 +0100 |
| commit | f08648e4b5a9f7855a2ed9068a386e2f3c596322 (patch) | |
| tree | 1f1567ea609a1f74aaeab3cbbfdb249c5c47d723 /Makefile | |
Initial implementation
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0d4b7d3 --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +profile := dev +target = $(shell rustc -vV | grep host | awk '{print $$2}') + +default: build + +set_rust: + rustup default stable + +prepare: + rustup target add $(target) + +build: prepare + cargo build --profile $(profile) --target $(target) + +test: + cargo test + +coverage: + cargo tarpaulin --fail-under 100 + +benchmark: + cargo bench + +format: + cargo fmt && cargo clippy --fix + +lint: + cargo fmt -- --check && cargo clippy + +release: + cargo publish + +ci: lint coverage +ifneq (,$(findstring refs/tags/,$(GIT_REF))) + $(MAKE) release +endif + +.PHONY: default set_rust prepare build test coverage format lint benchmark release ci |