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.

69 lines
1.5 KiB
YAML

version: '3'
tasks:
clean:
desc: "clean all of the old binaries"
cmds:
- rm -vf bin/frms_* 2>/dev/null
test:
desc: "Runs the full test suite"
cmds:
- bin/gotest.py
all:
desc: "builds arm reactor binaries and arm/amd server binaries"
deps: [arm32-reactor, arm64-reactor, arm64-server, amd64-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
vars:
GOARCH: "arm64"
GOOS: "linux"
BUILD_DIR: "server"
amd64-server:
desc: "Builds server binary for amd linux machine"
cmds:
- task: go-build
vars:
GOARCH: "amd64"
GOOS: "linux"
BUILD_DIR: "server"
go-build:
internal: true
cmds:
- go build -o bin/frms_{{.BUILD_DIR}}_{{.GOOS}}_{{.GOARCH}} cmd/{{.BUILD_DIR}}/main.go
sources:
- internal/pkg/**/*.go
- cmd/{{.BUILD_DIR}}/main.go
generates:
- bin/frms_{{.BUILD_DIR}}_{{.GOOS}}_{{.GOARCH}}
env:
GOARM: "{{.GOARM}}"
GOARCH: "{{.GOARCH}}"
GOOS: "{{.GOOS}}"