-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (25 loc) · 845 Bytes
/
Makefile
File metadata and controls
25 lines (25 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
BINARY := restium
VERSION ?= dev
.PHONY: all build test lint clean cross docker-multiarch
all: lint test build
build:
cargo build --release
mkdir -p bin
cp target/release/$(BINARY) bin/$(BINARY)
test:
cargo test
lint:
cargo clippy --all-targets -- -D warnings
cargo fmt --check
clean:
cargo clean
rm -rf bin/
cross: ## Requires: cargo install cargo-zigbuild
cargo zigbuild --release --target x86_64-unknown-linux-musl
cargo zigbuild --release --target aarch64-unknown-linux-musl
docker-build:
docker build -t ghcr.io/kitstream/restium:$(VERSION) .
docker-multiarch: ## Multi-arch build; use with --push (requires registry login) — --load only supports single platform
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/kitstream/restium:$(VERSION) .
docker-push:
docker push ghcr.io/kitstream/restium:$(VERSION)