-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (45 loc) · 1.84 KB
/
Copy pathMakefile
File metadata and controls
62 lines (45 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
GO ?= go
PYTHON ?= python3
NODE ?= node
DOTNET ?= dotnet
JAVAC ?= javac
JAVA ?= java
LUA ?= lua
VERSION ?= 0.7.0
.PHONY: fmt test verify contract-check test-go test-console test-sdks test-sdk-python test-sdk-javascript test-sdk-csharp test-sdk-java test-sdk-lua test-terminal-story race vet build
fmt:
$(GO) fmt ./...
test: test-go test-console test-terminal-story
verify: contract-check vet race test-console test-sdks test-terminal-story
contract-check:
$(GO) test ./controlplane ./agentapi ./host -run 'Contract|OpenAPI|Fixture'
test-go:
$(GO) test ./...
test-console:
$(NODE) --test consoleui/static/app.test.mjs
test-sdks: test-sdk-python test-sdk-javascript test-sdk-csharp test-sdk-java test-sdk-lua
test-sdk-python:
$(PYTHON) -m unittest discover -s sdk/python/tests -p 'test_*.py'
test-sdk-javascript:
cd sdk/javascript && $(NODE) --test
test-sdk-csharp:
$(DOTNET) run --project sdk/csharp/Rin.Client.Tests/Rin.Client.Tests.csproj --nologo
test-sdk-java:
mkdir -p .cache/java-sdk
find sdk/java/src/main/java sdk/java/test -name '*.java' > .cache/java-sdk/sources.txt
$(JAVAC) --add-modules jdk.httpserver -d .cache/java-sdk @.cache/java-sdk/sources.txt
$(JAVA) --add-modules jdk.httpserver -cp .cache/java-sdk io.github.sunrioa.rin.RinSdkTest
test-sdk-lua:
$(LUA) sdk/lua/test_client.lua
test-terminal-story:
$(GO) test ./examples/adapters/grid ./examples/adapters/story ./examples/terminal-story
$(GO) run ./examples/terminal-story --line "The light in this photograph feels familiar." --topic festival --task prepare-exhibit --json
race:
$(GO) test -race ./...
vet:
$(GO) vet ./...
build:
mkdir -p bin
CGO_ENABLED=0 $(GO) build -trimpath -ldflags "-s -w -X main.version=$(VERSION)" -o bin/rin ./cmd/rin
CGO_ENABLED=0 $(GO) build -trimpath -o bin/rin-control ./cmd/rin-control
CGO_ENABLED=0 $(GO) build -trimpath -o bin/rin-mcp ./cmd/rin-mcp