Files
ratatoskr-go/Makefile
Hermes 572f39cb3e
Some checks failed
build-test / build (push) Successful in 32s
CI / test (push) Successful in 32s
CI / build (push) Failing after 37s
CI / package (push) Has been skipped
CI: Gitea Actions workflow (test+build+package), Makefile, config.yaml.example, .gitignore
2026-08-15 10:20:34 +05:00

38 lines
773 B
Makefile

.PHONY: all build test vet clean run fmt
APP := ratatoskr
CMD_DIR := ./cmd/ratatoskr
GO ?= go
GOPATH := $(shell $(GO) env GOPATH)
GOFLAGS ?= -ldflags="-s -w"
all: test build
build:
$(GO) build $(GOFLAGS) -o $(APP) $(CMD_DIR)
test:
$(GO) test ./... -v -count=1 -timeout 120s
vet:
$(GO) vet ./...
fmt:
$(GO) fmt ./...
run: build
./$(APP) -config config.yaml
clean:
rm -f $(APP)
rm -rf /tmp/ratatoskr-*
.PHONY: bench
bench:
$(GO) test ./... -bench=. -benchmem -count=1 -timeout 120s
.PHONY: cross
cross:
GOOS=linux GOARCH=amd64 $(GO) build $(GOFLAGS) -o $(APP)-linux-amd64 $(CMD_DIR)
GOOS=linux GOARCH=arm64 $(GO) build $(GOFLAGS) -o $(APP)-linux-arm64 $(CMD_DIR)
GOOS=darwin GOARCH=amd64 $(GO) build $(GOFLAGS) -o $(APP)-darwin-amd64 $(CMD_DIR)