diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-04 23:04:42 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-04 23:04:42 +0100 |
| commit | 8beb2bfa1af988442550c9e6999d924dd14b5236 (patch) | |
| tree | e24c5ca4b5d6da02895094f2341231236091132c /Makefile | |
Add the library
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f08d153 --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +profile := dev +target = $(shell rustc -vV | grep host | awk '{print $$2}') +architectures := x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu +app_name := page + +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 + +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 release ci |