version: '3' tasks: clean: desc: "clean all of the old binaries" cmds: - rm -vf bin/dmac_* 2>/dev/null test: desc: "Runs the full test suite" cmds: - bin/test.py proto: desc: "Rebuilds protobuf for gRPC" cmds: - protoc --go_out=server/pkg/grpc --go_opt=paths=source_relative --go-grpc_out=server/pkg/grpc --go-grpc_opt=paths=source_relative api/*.proto - mv server/pkg/grpc/api/* server/pkg/grpc/ - rm -r server/pkg/grpc/api server: desc: "builds arm/amd server binaries" deps: [arm64-server, amd64-server] reactor: desc: "builds arm reactor binaries" deps: [arm32-reactor, arm64-reactor] all: desc: "builds arm reactor binaries and arm/amd server binaries" deps: [reactor, server] arm32-reactor: desc: "Builds reactor binary for 32 bit arm linux device" cmds: - task: go-build vars: GOARM: 7 GOARCH: "arm" GOOS: "linux" BUILD_DIR: "reactor" arm64-reactor: desc: "Builds reactor binary for 64 bit arm linux device" cmds: - task: go-build vars: GOARCH: "arm64" GOOS: "linux" BUILD_DIR: "reactor" arm64-server: desc: "Builds server binary for 64 bit arm linux device" cmds: - task: go-build-server vars: GOARCH: "arm64" GOOS: "linux" BUILD_DIR: "server" amd64-server: desc: "Builds server binary for amd linux machine" cmds: - task: go-build-server vars: GOARCH: "amd64" GOOS: "linux" BUILD_DIR: "server" go-build-server: internal: true cmds: - go build -o bin/dmac_server_{{.GOOS}}_{{.GOARCH}} server/main.go sources: - internal/pkg/**/*.go - cmd/{{.BUILD_DIR}}/main.go generates: - bin/dmac_{{.BUILD_DIR}}_{{.GOOS}}_{{.GOARCH}} env: GOARM: "{{.GOARM}}" GOARCH: "{{.GOARCH}}" GOOS: "{{.GOOS}}"