You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.9 KiB
YAML
79 lines
1.9 KiB
YAML
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:
|
|
- find server/pkg/grpc/*.pb.go | xargs rm -vf
|
|
- find api/*.proto | xargs protoc --go_out="$HOME/src/dmac/" --go-grpc_out="$HOME/src/dmac/"
|
|
- echo "$HOME"/src/dmac/api/*.proto | xargs protoc --tonic_out="$HOME/src/dmac/reactor/src/grpc/" --proto_path="$HOME/src/dmac/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:
|
|
|
|
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}}"
|
|
|