This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
name: Build Ground Station
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: groundstation-build
|
||||||
|
timeout-minutes: 30
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: "0"
|
||||||
|
GOOS: linux
|
||||||
|
GOARCH: arm64
|
||||||
|
|
||||||
|
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
|
||||||
|
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/*
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
FROM golang:1.27-bookworm
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends nodejs git ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /workspace
|
||||||
Reference in New Issue
Block a user