|
|
|
@ -63,13 +63,15 @@ jobs:
|
|
|
|
|
env:
|
|
|
|
|
PROJECT_PATH: /go/src/github.com/analogj/scrutiny
|
|
|
|
|
GOPATH: /go
|
|
|
|
|
GOOS: freebsd
|
|
|
|
|
GOARCH: amd64
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
- name: Build Binaries
|
|
|
|
|
uses: vmactions/freebsd-vm@v0.1.3
|
|
|
|
|
with:
|
|
|
|
|
envs: 'PROJECT_PATH GOPATH'
|
|
|
|
|
envs: 'PROJECT_PATH GOPATH GOOS GOARCH'
|
|
|
|
|
usesh: true
|
|
|
|
|
#TODO: lock go version using https://www.jeremymorgan.com/tutorials/golang/how-to-install-go-freebsd/
|
|
|
|
|
prepare: pkg install -y curl go gmake
|
|
|
|
@ -77,13 +79,26 @@ jobs:
|
|
|
|
|
pwd
|
|
|
|
|
ls -lah
|
|
|
|
|
whoami
|
|
|
|
|
env
|
|
|
|
|
freebsd-version
|
|
|
|
|
|
|
|
|
|
mkdir -p $(dirname "$PROJECT_PATH")
|
|
|
|
|
cp -R $GITHUB_WORKSPACE $PROJECT_PATH
|
|
|
|
|
cd $PROJECT_PATH
|
|
|
|
|
|
|
|
|
|
make freebsd/amd64
|
|
|
|
|
mkdir -p /build
|
|
|
|
|
|
|
|
|
|
echo "building web binary (OS = ${GOOS}, ARCH = ${GOARCH})"
|
|
|
|
|
go build -ldflags "-extldflags=-static -X main.goos=${GOOS} -X main.goarch=${GOARCH}" -o /build/scrutiny-web-${GOOS}-${GOARCH} -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
|
|
|
|
|
|
|
|
|
|
chmod +x "/build/scrutiny-web-${GOOS}-${GOARCH}"
|
|
|
|
|
file "/build/scrutiny-web-${GOOS}-${GOARCH}" || true
|
|
|
|
|
ldd "/build/scrutiny-web-${GOOS}-${GOARCH}" || true
|
|
|
|
|
|
|
|
|
|
echo "building collector binary (OS = ${GOOS}, ARCH = ${GOARCH})"
|
|
|
|
|
go build -ldflags "-extldflags=-static -X main.goos=${GOOS} -X main.goarch=${GOARCH}" -o /build/scrutiny-collector-metrics-${GOOS}-${GOARCH} -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
|
|
|
|
|
|
|
|
|
|
chmod +x "/build/scrutiny-collector-metrics-${GOOS}-${GOARCH}"
|
|
|
|
|
file "/build/scrutiny-collector-metrics-${GOOS}-${GOARCH}" || true
|
|
|
|
|
ldd "/build/scrutiny-collector-metrics-${GOOS}-${GOARCH}" || true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|