3 Commits

Author SHA1 Message Date
Adrian Zürcher
6f532ef4b0 fix repo links
Some checks failed
Build Quasar SPA and Go Backend for lightController / build (amd64, .exe, windows) (push) Failing after 1m30s
Build Quasar SPA and Go Backend for lightController / build (amd64, , linux) (push) Successful in 6m1s
Build Quasar SPA and Go Backend for lightController / build (arm, 6, , linux) (push) Successful in 6m9s
Build Quasar SPA and Go Backend for lightController / build (arm64, , linux) (push) Successful in 4m45s
2025-08-11 10:37:48 +02:00
Adrian Zürcher
1155bafb30 lift version 2025-08-11 10:26:21 +02:00
Adrian Zürcher
0e3a14d69c change repo name
Some checks failed
Build Quasar SPA and Go Backend for lightController / build (amd64, , linux) (push) Failing after 5m18s
Build Quasar SPA and Go Backend for lightController / build (amd64, .exe, windows) (push) Failing after 5m23s
Build Quasar SPA and Go Backend for lightController / build (arm64, , linux) (push) Has been cancelled
Build Quasar SPA and Go Backend for lightController / build (arm, 6, , linux) (push) Has been cancelled
2025-08-11 10:25:25 +02:00
8 changed files with 114 additions and 82 deletions

103
.gitea/workflows/build.yml Normal file
View File

@@ -0,0 +1,103 @@
name: Build Quasar SPA and Go Backend for lightController
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: windows
arch: amd64
ext: .exe
- os: linux
arch: amd64
ext: ""
- os: linux
arch: arm64
ext: ""
- os: linux
arch: arm
arm_version: 6
ext: ""
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependecies
run: npm install
- name: Install Quasar CLI
run: npm install -g @quasar/cli
- name: Build Quasar SPA
run: quasar build
- name: Ensure latest Go is installed in /data/go
run: |
export GOROOT=/data/go/go
export PATH=$GOROOT/bin:$PATH
export GOCACHE=/data/gocache
export GOMODCACHE=/data/gomodcache
mkdir -p $GOCACHE $GOMODCACHE
if [ ! -x "$GOROOT/bin/go" ]; then
echo "Go not found in $GOROOT, downloading latest stable..."
GO_VERSION=$(curl -s https://go.dev/VERSION?m=text | head -n1)
echo "Latest version is $GO_VERSION"
mkdir -p /data/go
curl -sSL "https://go.dev/dl/${GO_VERSION}.linux-amd64.tar.gz" -o /tmp/go.tar.gz
tar -C /data/go -xzf /tmp/go.tar.gz
else
echo "Using cached Go from $GOROOT"
fi
go version
- name: Go Mod Tidy & Download
working-directory: ./backend
run: |
export GOROOT=/data/go/go
export PATH=$GOROOT/bin:$PATH
export GOCACHE=/data/gocache
export GOMODCACHE=/data/gomodcache
mkdir -p $GOCACHE $GOMODCACHE
go mod tidy -v
go mod download
- name: Build go backend binary
working-directory: ./backend
run: |
export GOROOT=/data/go/go
export PATH=$GOROOT/bin:$PATH
export GOCACHE=/data/gocache
export GOMODCACHE=/data/gomodcache
mkdir -p $GOCACHE $GOMODCACHE
OUTPUT="../server-${{ matrix.goos }}-${{ matrix.goarch }}"
if [ "${{ matrix.goos }}" == "windows" ]; then
OUTPUT="${OUTPUT}.exe"
fi
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -trimpath -o "$OUTPUT" main.go
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: lightcontroller-${{ matrix.goos }}-${{ matrix.goarch }}
path: |
./dist/spa
server-${{ matrix.goos }}-${{ matrix.goarch }}${{ (matrix.goos == 'windows' && '.exe') || '' }}

View File

@@ -1,71 +0,0 @@
name: Build Quasar SPA and Go Backend for lightController
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows]
goarch: [amd64, arm, arm64]
exclude:
- goos: windows
goarch: arm
- goos: windows
goarch: arm64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set ip Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependecies
run: npm install
- name: Install Quasar CLI
run: npm install -g @quasar/cli
- name: Build Quasar SPA
run: quasar build
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.0'
cache-dependency-path: backend/go.sum
- name: Set up Git credentials for private modules
run: |
git config --global url."https://oauth2:${{ secrets.GH_PAT }}@github.com".insteadOf "https://github.com"
env:
GH_PAT_FOR_MODULES: ${{ secrets.GH_PAT }}
- name: Go Mod Tidy & Download
working-directory: ./backend
run: go mod tidy -v
- name: Build go backend binary
working-directory: ./backend
run: |
if [ "${{ matrix.goos }}" == "windows" ]; then
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -trimpath -o ../server-${{ matrix.goos }}-${{ matrix.goarch }}.exe main.go
else
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -trimpath -o ../server-${{ matrix.goos }}-${{ matrix.goarch }} main.go
fi
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: lightcontroller-${{ matrix.goos }}-${{ matrix.goarch }}
path: |
./dist/spa
server-${{ matrix.goos }}-${{ matrix.goarch }}${{ (matrix.goos == 'windows' && '.exe') || '' }}

View File

@@ -5,12 +5,12 @@ go 1.24.0
toolchain go1.24.3
require (
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1
gitea.tecamino.com/paadi/tecamino-logger v0.2.1
github.com/gin-contrib/cors v1.7.5
github.com/gin-gonic/gin v1.10.0
github.com/golang-jwt/jwt/v5 v5.2.2
github.com/google/uuid v1.6.0
github.com/tecamino/tecamino-dbm v0.0.10
github.com/tecamino/tecamino-logger v0.2.0
golang.org/x/crypto v0.36.0
modernc.org/sqlite v1.37.1
)

View File

@@ -1,3 +1,7 @@
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1 h1:vAq7mwUxlxJuLzCQSDMrZCwo8ky5usWi9Qz+UP+WnkI=
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1/go.mod h1:+tmf1rjPaKEoNeUcr1vdtoFIFweNG3aUGevDAl3NMBk=
gitea.tecamino.com/paadi/tecamino-logger v0.2.1 h1:sQTBKYPdzn9mmWX2JXZBtGBvNQH7cuXIwsl4TD0aMgE=
gitea.tecamino.com/paadi/tecamino-logger v0.2.1/go.mod h1:FkzRTldUBBOd/iy2upycArDftSZ5trbsX5Ira5OzJgM=
github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ=
github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
@@ -79,10 +83,6 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tecamino/tecamino-dbm v0.0.10 h1:+6OTl7yTsqLuYqE8QVB8ski3x0seI5yBFLnuHdVz99k=
github.com/tecamino/tecamino-dbm v0.0.10/go.mod h1:8YYOr/jQ9mGVmmNj2NE8HajDvlJAVY3iGOZNfMjd8kA=
github.com/tecamino/tecamino-logger v0.2.0 h1:NPH/Gg9qRhmVoW8b39i1eXu/LEftHc74nyISpcRG+XU=
github.com/tecamino/tecamino-logger v0.2.0/go.mod h1:0M1E9Uei/qw3e3WA1x3lBo1eP3H5oeYE7GjYrMahnj8=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=

View File

@@ -16,9 +16,9 @@ import (
"strings"
"time"
"gitea.tecamino.com/paadi/tecamino-logger/logging"
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"github.com/tecamino/tecamino-logger/logging"
)
func main() {

View File

@@ -4,9 +4,9 @@ import (
"fmt"
"sync"
"gitea.tecamino.com/paadi/tecamino-dbm/cert"
"gitea.tecamino.com/paadi/tecamino-logger/logging"
"github.com/gin-gonic/gin"
"github.com/tecamino/tecamino-dbm/cert"
"github.com/tecamino/tecamino-logger/logging"
)
// server model for database manager websocket

View File

@@ -8,7 +8,7 @@ import (
"path/filepath"
"runtime"
"github.com/tecamino/tecamino-logger/logging"
"gitea.tecamino.com/paadi/tecamino-logger/logging"
)
func OpenBrowser(url string, logger *logging.Logger) error {

View File

@@ -1,6 +1,6 @@
{
"name": "lightcontrol",
"version": "0.0.22",
"version": "0.1.0",
"description": "A Tecamino App",
"productName": "Light Control",
"author": "A. Zuercher",