mirror of
https://github.com/compute-blade-community/compute-blade-agent.git
synced 2026-04-16 15:35:42 +02:00
* feat: add smart fanunit (serial) protocol Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: add rudimentary eventbus to ease implementation Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: smart fanunit client Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: initial smart fan unit implementation Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: improve logging, double btn press Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: testcases Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: context closure handling, RPM reporting Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: address linting issues Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: edge line closure Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: reset CPU after i2c lockup Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: add uf2 to release Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> --------- Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
53 lines
871 B
Makefile
53 lines
871 B
Makefile
FUZZ_TARGETS := ./pkg/smartfanunit/proto
|
|
|
|
all: lint test
|
|
|
|
.PHONY: run
|
|
run:
|
|
go run cmd/agent/main.go
|
|
|
|
.PHONY: lint
|
|
lint:
|
|
golangci-lint run
|
|
|
|
.PHONY: test
|
|
test:
|
|
go test ./... -v
|
|
|
|
|
|
.PHONY: fuzz
|
|
fuzz:
|
|
@for target in $(FUZZ_TARGETS); do \
|
|
go test -fuzz="Fuzz" -fuzztime=5s -fuzzminimizetime=10s $$target; \
|
|
done
|
|
|
|
|
|
.PHONY: generate
|
|
generate: buf
|
|
$(BUF) generate
|
|
|
|
.PHONY: build-fanunit
|
|
build-fanunit:
|
|
tinygo build -target=pico -o fanunit.uf2 ./cmd/fanunit/
|
|
|
|
.PHONY: build-agent
|
|
build-agent: generate
|
|
goreleaser build --snapshot --clean
|
|
|
|
.PHONY: snapshot
|
|
snapshot:
|
|
goreleaser release --snapshot --skip=publish --clean
|
|
|
|
# Dependencies
|
|
LOCALBIN ?= $(shell pwd)/bin
|
|
$(LOCALBIN):
|
|
mkdir -p $(LOCALBIN)
|
|
|
|
BUF ?= $(LOCALBIN)/buf
|
|
BUF_VERSION ?= v1.25.0
|
|
|
|
.PHONY: buf
|
|
buf: $(BUF)
|
|
$(BUF): $(LOCALBIN)
|
|
GOBIN=$(LOCALBIN) go install github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION)
|