mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-10 10:01:48 -10:00
Problem: CI and the packaging pipeline still installed the Wails-era native toolchain (libwebkit2gtk headers, the webkit2_41 build tag, the wails CLI pin) and ran the WebView2/WebKitGTK native smoke harnesses whose binaries no longer exist. Fix: delete the transcript-native-smoke workflow, the WebKitGTK install steps in desktop-prepare/desktop-go, the WKWebView/WebView2 native transcript steps, the WebView2 smoke scripts and the vendored-edge test step, and the wails pin check (scripts, .wails-version, make wails-install). desktop-build.sh builds the service without -tags webkit2_41, so Linux needs no WebKitGTK headers. desktop/packaging reads the frozen product identity from a constant instead of wails.json. The contract tests now pin the packaged-Electron startup smoke and reject references to the retired harnesses. The root ./dev script drives the Electron shell against a freshly built service plus the Vite dev server; prod_test/prod_fast_test lose the Wails CLI pinning. The issue labeler describes the desktop app as Electron. Browser-compatibility Playwright tests (chromium/webkit) for the Web/Serve product are unchanged. Verification: bash scripts/release-workflows.test.sh, node scripts/check-desktop-build-contract.mjs, node scripts/check-single-release-public-contract.mjs, node --test scripts/desktop-release-artifacts.test.mjs scripts/ci-workflow.test.mjs, desktop/frontend/scripts/check-motion-ci-contract.mjs and actionlint on the release workflows all pass.
84 lines
2.8 KiB
Makefile
84 lines
2.8 KiB
Makefile
VERSION := $(shell git describe --tags --always 2>/dev/null || echo dev)
|
|
BUILD_TIME_UTC := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
GIT_COMMIT := $(shell git rev-parse --short=12 HEAD 2>/dev/null || echo unknown)
|
|
LDFLAGS := -s -w \
|
|
-X main.version=$(VERSION) \
|
|
-X main.gitCommit=$(GIT_COMMIT) \
|
|
-X main.buildTimeUTC=$(BUILD_TIME_UTC)
|
|
GOEXE := $(shell go env GOEXE)
|
|
# One pin for the Makefile and the CI lint job; see .github/workflows/ci.yml.
|
|
GOLANGCI_VERSION := $(shell cat .golangci-version)
|
|
|
|
.PHONY: build vet fmt lint lint-go lint-install lint-cross lint-update test desktop-test desktop-test-short desktop-test-times sdk-test sdk-test-race hooks cross clean
|
|
|
|
build:
|
|
CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o bin/reasonix$(GOEXE) ./cmd/reasonix
|
|
CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o bin/reasonix-plugin-example$(GOEXE) ./cmd/reasonix-plugin-example
|
|
|
|
vet:
|
|
go vet ./...
|
|
|
|
fmt:
|
|
gofmt -w .
|
|
|
|
# Both gates CI runs, at the version CI pins. Skipping golangci-lint locally
|
|
# trades a second here for a ten-minute CI round trip: `modernize` findings in
|
|
# particular never surface in `go vet`.
|
|
lint: lint-go
|
|
go run ./tools/repolint
|
|
|
|
lint-go:
|
|
@command -v golangci-lint >/dev/null || { echo "golangci-lint not installed; run: make lint-install"; exit 1; }
|
|
@have=$$(golangci-lint version --short 2>/dev/null); want=$$(echo "$(GOLANGCI_VERSION)" | sed 's/^v//'); \
|
|
[ "$$have" = "$$want" ] || echo "warning: local golangci-lint $$have, CI pins $$want (make lint-install)"
|
|
golangci-lint run --timeout=5m ./...
|
|
|
|
# CGO_ENABLED=0 keeps the install working where a stray clang on PATH shadows
|
|
# the toolchain and breaks runtime/cgo.
|
|
lint-install:
|
|
CGO_ENABLED=0 go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_VERSION)
|
|
|
|
lint-update:
|
|
go run ./tools/repolint -update
|
|
|
|
# Linting one GOOS leaves every //go:build windows and darwin file unchecked.
|
|
lint-cross:
|
|
@for t in "linux ." "darwin ." "windows ." "linux desktop" "windows desktop"; do \
|
|
set -- $$t; \
|
|
echo "== golangci-lint GOOS=$$1 ($$2)"; \
|
|
(cd $$2 && GOOS=$$1 golangci-lint run --timeout=5m ./...) || exit 1; \
|
|
done
|
|
|
|
test:
|
|
go test ./...
|
|
|
|
desktop-test:
|
|
cd desktop && go test .
|
|
|
|
desktop-test-short:
|
|
cd desktop && go test -short .
|
|
|
|
desktop-test-times:
|
|
cd desktop && go test -count=1 -json . | python3 ../scripts/desktop-test-times.py
|
|
|
|
sdk-test:
|
|
cd sdk/go && go test ./...
|
|
|
|
sdk-test-race:
|
|
cd sdk/go && go test -race ./...
|
|
|
|
hooks:
|
|
@git config core.hooksPath .githooks
|
|
@echo "installed: core.hooksPath -> .githooks (pre-push runs go vet)"
|
|
|
|
cross:
|
|
@mkdir -p dist
|
|
@for p in darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 windows/amd64 windows/arm64; do \
|
|
os=$${p%/*}; arch=$${p#*/}; ext=; [ $$os = windows ] && ext=.exe; \
|
|
echo "build $$os/$$arch"; \
|
|
CGO_ENABLED=0 GOOS=$$os GOARCH=$$arch go build -ldflags "$(LDFLAGS)" -o dist/reasonix-$$os-$$arch$$ext ./cmd/reasonix; \
|
|
done
|
|
|
|
clean:
|
|
rm -rf bin dist
|