-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
136 lines (112 loc) · 4.96 KB
/
Taskfile.yml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
version: "3"
vars:
GREETING: Hello, Render Developer!
tasks:
default:
cmds:
- echo "{{.GREETING}}"
silent: true
build-gl-tools:
desc: Build the software tools
cmds:
- GOFLAGS=-mod=mod go build -o bin/renderglapi pkg/gls/renderglapi/main.go
- chmod 755 bin/renderglapi
- cp bin/renderglapi $GOPATH/bin
build-tools:
desc: Build the software tools
cmds:
- GOFLAGS=-mod=mod go build -o bin/rendericodes cmd/rendericodes/main.go
- chmod 755 bin/rendericodes
- cp bin/rendericodes $GOPATH/bin
- GOFLAGS=-mod=mod go build -o bin/rendershaders cmd/rendershaders/main.go
- chmod 755 bin/rendershaders
- cp bin/rendershaders $GOPATH/bin
build-web:
desc: Build the web application
cmds:
- GOFLAGS=-mod=mod go build -o bin/renderctl client.go
- GOFLAGS=-mod=mod go build -o bin/rendersvr server.go
- cd pkg/webui/bhojpur; gopherjs build -m --verbose --tags clientonly ./main.go
- GOFLAGS=-mod=mod tinygo build -o ./pkg/webui/wasm/main.wasm -target wasm ./pkg/webui/wasm/main.go
- cp ./pkg/webui/wasm/main.wasm internal/wasm
build-desktop-samples:
desc: Build the sample application
cmds:
- GOFLAGS=-mod=mod go build -o bin/renderhello internal/hello/main.go
- GOFLAGS=-mod=mod go build -o bin/renderg3d internal/g3d/main.go
- GOFLAGS=-mod=mod go build -o bin/renderview internal/view/main.go
- GOFLAGS=-mod=mod go build -o bin/renderplay internal/play/main.go
build-desktop-darwin:
desc: Build the desktop application for current OS
cmds:
- guiutl package -name "Bhojpur Render" -os darwin -sourceDir internal/view/main.go -icon internal/Icon.png
build-desktop-linux:
desc: Build the desktop application for current OS
cmds:
- guiutl package -name "Bhojpur Render" -os linux -sourceDir internal/view/main.go -icon internal/Icon.png
build-desktop-windows:
desc: Build the desktop application for current OS
cmds:
- guiutl package -name "Bhojpur Render" -os windows -sourceDir internal/view/main.go -icon internal/Icon.png
package-android:
desc: Package the mobile application for Android
cmds:
- guiutl package -name "Bhojpur Render" -os android -appID net.bhojpur.render -icon internal/Icon.png
package-ios:
desc: Package the mobile application for iOS
cmds:
- guiutl package -name "Bhojpur Render" -os ios -appID net.bhojpur.render -icon internal/Icon.png
release-macos:
desc: Release the native application for macOS App Store
cmds:
- guiutl release -appID net.bhojpur.render -appVersion 1.0 -appBuild 1 -category business
release-android:
desc: Release the mobile application for Google Play
cmds:
- guiutl release -os android -appID net.bhojpur.render -appVersion 1.0 -appBuild 1
release-ios:
desc: Release the mobile application for iOS App Store
cmds:
- guiutl release -os ios -appID net.bhojpur.render -appVersion 1.0 -appBuild 1
run-web2d-gopher:
desc: Run the web server gopher application from source code
cmds:
- cd pkg/webui/bhojpur; GOFLAGS=-mod=mod go run ../../../server.go wasm
run-web2d-wasm:
desc: Run the web server wasm application from source code
cmds:
- cd pkg/webui/wasm; GOFLAGS=-mod=mod go run ../../../server.go wasm
run-web3d-editor:
desc: Run the web server wasm application from source code
cmds:
- cd editor; GOFLAGS=-mod=mod go run ../server.go wasm
run-mobile:
desc: Run the mobile client application on emulator
cmds:
- GOFLAGS=-mod=mod go run -tags mobile internal/view/main.go
run-desktop:
desc: Run the desktop application on local host
cmds:
- GOFLAGS=-mod=mod go run internal/view/main.go
generate:
desc: Generate Go source code from Protool Buffers
cmds:
- protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative pkg/api/v1/render.proto
- protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative pkg/api/v1/render-ui.proto
- GOFLAGS=-mod=mod go generate ./...
test:
desc: Execute all the Unit Tests
cmds:
- gotestsum --junitfile test-results/unit-tests.xml -- -short -race -cover -coverprofile test-results/cover.out ./...
swagger.gen:
desc: Generate Go code
cmds:
- GOFLAGS=-mod=mod go generate bhojpur.net/render/internal bhojpur.net/render/pkg/swagger
swagger.validate:
desc: Validate all the Swagger API specifications
cmds:
- swagger validate pkg/swagger/swagger.yml
swagger.doc:
desc: Generate documentation for Swagger specified APIs
cmds:
- docker run -i yousan/swagger-yaml-to-html < pkg/swagger/swagger.yml > doc/index.html