make: add race+coverprofile to test target; add build-caldav target
- test target now runs with -race and emits coverage.out for coverage reporting. - New build-caldav target builds cmd/mavcaldav without CGO (pure Go). - build-caldav added to PHONY and build dependency chain. - mavcaldav added to clean target.
This commit is contained in:
@@ -8,11 +8,11 @@ PIPER_BIN := $(shell pwd)/deps/piper/piper
|
|||||||
PIPER_MODEL := $(shell pwd)/models/tts/ru_RU-irina-medium.onnx
|
PIPER_MODEL := $(shell pwd)/models/tts/ru_RU-irina-medium.onnx
|
||||||
PIPER_ESPEAK := $(shell pwd)/deps/piper/espeak-ng-data
|
PIPER_ESPEAK := $(shell pwd)/deps/piper/espeak-ng-data
|
||||||
|
|
||||||
.PHONY: all build build-stt build-tts build-daemon build-client build-web build-poll clean test run-stt run-tts run-web
|
.PHONY: all build build-stt build-tts build-daemon build-client build-web build-poll build-caldav clean test run-stt run-tts run-web
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
build: build-stt build-tts build-daemon build-client build-web build-poll
|
build: build-stt build-tts build-daemon build-client build-web build-poll build-caldav
|
||||||
|
|
||||||
build-stt:
|
build-stt:
|
||||||
CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" LD_LIBRARY_PATH="$(shell pwd)/deps/lib" \
|
CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" LD_LIBRARY_PATH="$(shell pwd)/deps/lib" \
|
||||||
@@ -36,12 +36,15 @@ build-web:
|
|||||||
build-poll:
|
build-poll:
|
||||||
$(GO) build $(GOFLAGS) -o mavpoll ./cmd/mavpoll/
|
$(GO) build $(GOFLAGS) -o mavpoll ./cmd/mavpoll/
|
||||||
|
|
||||||
|
build-caldav:
|
||||||
|
$(GO) build $(GOFLAGS) -o mavcaldav ./cmd/mavcaldav/
|
||||||
|
|
||||||
run-web: build-web
|
run-web: build-web
|
||||||
./mavweb -addr :9200 -voice 127.0.0.1:9100
|
./mavweb -addr :9200 -voice 127.0.0.1:9100
|
||||||
|
|
||||||
test:
|
test:
|
||||||
CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" LD_LIBRARY_PATH="$(shell pwd)/deps/lib" \
|
CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" LD_LIBRARY_PATH="$(shell pwd)/deps/lib" \
|
||||||
$(GO) test ./internal/... ./cmd/...
|
$(GO) test -race -coverprofile=coverage.out ./internal/... ./cmd/...
|
||||||
|
|
||||||
run-stt: build-stt
|
run-stt: build-stt
|
||||||
LD_LIBRARY_PATH="$(shell pwd)/deps/lib" \
|
LD_LIBRARY_PATH="$(shell pwd)/deps/lib" \
|
||||||
@@ -69,4 +72,4 @@ deps-piper:
|
|||||||
tar -xzf /tmp/piper.tar.gz -C deps/
|
tar -xzf /tmp/piper.tar.gz -C deps/
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f mavend mavenclient mavsttd mavttsd mavweb mavpoll
|
rm -f mavend mavenclient mavsttd mavttsd mavweb mavpoll mavcaldav
|
||||||
|
|||||||
Reference in New Issue
Block a user