38 lines
1021 B
YAML
38 lines
1021 B
YAML
name: Build Ground Station
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: groundstation-build
|
|
timeout-minutes: 30
|
|
env:
|
|
CGO_ENABLED: "0"
|
|
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Test and build arm64 binary
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
go test ./...
|
|
go vet ./...
|
|
mkdir -p dist
|
|
GOOS=linux GOARCH=arm64 go build -trimpath -ldflags='-s -w' -o dist/groundstation-linux-arm64 ./cmd/groundstation
|
|
tar -C dist -czf dist/groundstation-linux-arm64.tar.gz groundstation-linux-arm64
|
|
sha256sum dist/groundstation-linux-arm64.tar.gz > dist/groundstation-linux-arm64.tar.gz.sha256
|
|
sha256sum dist/groundstation-linux-arm64
|
|
|
|
- name: Upload arm64 artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: groundstation-linux-arm64-${{ github.sha }}
|
|
retention-days: 30
|
|
path: dist/*
|