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.
82 lines
1.8 KiB
YAML
82 lines
1.8 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:
|
|
- protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative internal/pkg/grpc/*.proto
|
|
|
|
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}}"
|
|
|