build: prepare
cargo build --profile $(profile) --target $(target)
+test:
+ cargo test
+
+coverage:
+ cargo tarpaulin
+
+format:
+ cargo fmt && cargo clippy --fix
+
+lint:
+ cargo fmt -- --check && cargo clippy
+
release: rpm tar deb
@$(eval filename := $(app_name)-$(target)-$(channel))
$(MAKE) -e profile=release -e architectures='$(mac_architectures)' -e channel=$(tag) package
endif
-ci:
+ci: lint coverage
ifeq ($(GIT_REF),refs/heads/main)
$(MAKE) -e profile=release -e channel=unstable package
else ifneq (,$(findstring refs/tags/,$(GIT_REF)))
$(MAKE) -e profile=release -e channel=$(subst refs/tags/,,$(GIT_REF)) package
endif
-.PHONY: default build $(architectures) rpm package prepare set_rust ci release
+.PHONY: default build $(architectures) rpm package prepare set_rust ci release test coverage format