diff --git a/.gitea/workflows/build-arm64.yml b/.gitea/workflows/build-arm64.yml new file mode 100644 index 0000000..ed053f4 --- /dev/null +++ b/.gitea/workflows/build-arm64.yml @@ -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/* diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 0000000..e4381c7 --- /dev/null +++ b/ci/Dockerfile @@ -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