#!/usr/bin/env bash # compile-backend.sh — cross-compile the pangolin Go control-plane binaries # (server / agent / migrate) for the pangolin1 deploy target. CGO disabled: # modernc.org/sqlite is pure Go, no cgo toolchain needed on the runner. # Output: server/out/{pangolin-server,pangolin-agent,pangolin-migrate}. # # Run inside a golang:1.25 container by .gitea/workflows/deploy-server.yml; # this script itself just runs `go build` and assumes it is invoked from the # repo root. set -euo pipefail # shellcheck source=scripts/ci/_env.sh . scripts/ci/_env.sh cd server mkdir -p out echo "==> compile-backend: building pangolin-server" CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o out/pangolin-server ./cmd/server echo "==> compile-backend: building pangolin-agent" CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o out/pangolin-agent ./cmd/agent echo "==> compile-backend: building pangolin-migrate" CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o out/pangolin-migrate ./cmd/migrate echo "==> compile-backend: done — out/ contents:" ls -lh out/