CI: Gitea Actions workflow (test+build+package), Makefile, config.yaml.example, .gitignore
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

This commit is contained in:
Hermes
2026-08-15 10:20:34 +05:00
parent 35fcffe035
commit 572f39cb3e
4 changed files with 143 additions and 1 deletions

38
Makefile Normal file
View File

@@ -0,0 +1,38 @@
.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)