BUILD_ARGS?=--verbose --release --all-features --locked
CARGO_INSTALL_ARGS=?--path . --bin kickable --debug --force --locked
CARGO_CLIPPY_ARGS=?-- -D warnings
CARGO_FMT_ARGS=?--all -- --check
DOCKER_REPOSITORY?=defstream/kickable
DOCKER_BUILD_ARGS?=-t $(DOCKER_REPOSITORY):latest
.PHONY: clean format lint test docs build clippy test lint install earthly/build earthly/docker earthly/docker/services
default: help
all: clean lint test docs build docker earthly/docker/services
help:
@grep -E '^[a-zA-Z._-]+:.*?## .*$$' ${MAKEFILE_LIST} | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
clippy:
@rustup -q component add clippy
format:
@cargo fmt
check:
@cargo check ${BUILD_ARGS}
docs:
@cargo doc --no-deps
build:
@cargo build ${BUILD_ARGS} --all
test:
@cargo test ${BUILD_ARGS}
lint: clippy
@cargo fmt ${CARGO_FMT_ARGS}
@cargo clippy ${CARGO_CLIPPY_ARGS}
install:
@cargo install ${CARGO_INSTALL_ARGS}
clean:
@cargo clean
@rm -f *.profraw
@rm -rf dist
docker:
@docker build ${DOCKER_BUILD_ARGS} .
earthly/ci:
@earthly --ci +archive
earthly/build:
@earthly +archive
earthly/docker:
@earthly --push +kickable
earthly/docker/services:
@earthly --push +axum
@earthly --push +gotham
@earthly --push +graphul
@earthly --push +poem
@earthly --push +rocket
@earthly --push +rouille
@earthly --push +salvo
@earthly --push +tonic-client
@earthly --push +tonic-server
@earthly --push +trillium
@earthly --push +viz
@earthly --push +warp