Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ jobs:
go-version-file: go.mod
cache: true

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Build web assets
run: npm ci && npm run build:assets

- name: Verify modules
run: go mod tidy && git diff --exit-code go.sum

Expand Down Expand Up @@ -84,6 +93,15 @@ jobs:
go-version-file: go.mod
cache: true

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Build web assets
run: npm ci && npm run build:assets

- name: Build Windows amd64
run: |
GOOS=windows GOARCH=amd64 go build \
Expand Down Expand Up @@ -118,6 +136,15 @@ jobs:
go-version-file: go.mod
cache: true

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Build web assets
run: npm ci && npm run build:assets

- name: Test on Windows
run: go test ./...

Expand Down Expand Up @@ -163,6 +190,15 @@ jobs:
go-version-file: go.mod
cache: true

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Build web assets
run: npm ci && npm run build:assets

- name: Build service
run: |
go build \
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ jobs:
go-version-file: go.mod
cache: true

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Build web assets
run: npm ci && npm run build:assets

- name: Run tests
run: go test ./... -race

Expand Down Expand Up @@ -53,6 +62,16 @@ jobs:
go-version-file: go.mod
cache: true

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Build web assets
shell: bash
run: npm ci && npm run build:assets

- name: Build Windows binary
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Build output
bin/
dist/
node_modules/

# Coverage
coverage.out
Expand Down
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,27 @@ CONFORM_VERSION := v4.3.0
CONFORM_DIR := .conform
CONFORM_LINUX_URL := https://github.com/ASCOMInitiative/ConformU/releases/download/$(CONFORM_VERSION)/conformu.linux-x64.tar.xz

.PHONY: all build build-windows build-linux build-linux-arm64 test lint fmt vet clean run \
.PHONY: all assets css build build-windows build-linux build-linux-arm64 test lint fmt vet clean run \
service-install service-start service-stop service-uninstall service-status \
conform conform-download

all: build

build:
assets: css

css:
npm run build:assets

build: assets
go build $(LDFLAGS) -o bin/$(BINARY) $(MAIN)

build-windows:
build-windows: assets
GOOS=windows GOARCH=amd64 go build $(LDFLAGS) -o dist/$(BINARY)-windows-amd64.exe $(MAIN)

build-linux:
build-linux: assets
GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o dist/$(BINARY)-linux-amd64 $(MAIN)

build-linux-arm64:
build-linux-arm64: assets
GOOS=linux GOARCH=arm64 go build $(LDFLAGS) -o dist/$(BINARY)-linux-arm64 $(MAIN)

test:
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,17 @@ See [docs/nina-alpaca-discovery.md](docs/nina-alpaca-discovery.md) for a complet
```bash
git clone https://github.com/DeanJ87/SQMeter-ASCOM-Alpaca
cd SQMeter-ASCOM-Alpaca
npm ci # install local Tailwind CLI and bundled IBM Plex font package
npm run build:assets # regenerate embedded CSS and local font assets
make build # ./bin/sqmeter-ascom-alpaca (current platform)
make build-windows # ./dist/sqmeter-ascom-alpaca-windows-amd64.exe
make test # run all tests with race detector
make lint # gofmt check + go vet
```

The web dashboard uses Tailwind CSS v4 at build time. Generated CSS is written
to `internal/web/static/app.css`, and IBM Plex WOFF2 files plus the OFL license
are bundled locally so the running service never loads fonts or CSS from a CDN.
Build artifacts go into `./bin/` and `./dist/` — both are git-ignored.

### Version injection
Expand Down
Loading
Loading