-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
70 lines (55 loc) · 1.79 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
version: '3'
tasks:
licenses:
cmds:
- rm ./resources/licenses.txt
- go run github.com/google/[email protected] report --ignore github.com/mokiat/game --template ./resources/licenses.tmpl ./cmd/game ./cmd/studio | fold -w 80 -s > ./resources/licenses.txt
preview:
cmds:
- go run './cmd/studio' preview ./ {{.CLI_ARGS}}
pack:
cmds:
- go run './cmd/studio' pack ./ {{.CLI_ARGS}}
webpack:
cmds:
- mkdir -p 'assets/web'
- cp 'resources/ui/images/icon.png' 'assets/web/favicon.png'
- cp 'resources/web/main.css' 'assets/web/main.css'
- cp 'resources/web/main.js' 'assets/web/main.js'
- cp 'resources/web/index.html' 'assets/index.html'
- cp 'resources/web/wasm_exec.js' 'assets/web/wasm_exec.js'
assets:
deps: [pack, webpack]
run:
cmds:
- go run './cmd/game'
wasm:
env:
GOOS: js
GOARCH: wasm
cmds:
- go build -o './assets/web/main.wasm' './cmd/game'
web:
cmds:
- go run 'github.com/mokiat/[email protected]' -dir './assets' -host '127.0.0.1'
profile-cpu:
cmds:
- curl -o default.pgo 'http://localhost:6060/debug/pprof/profile?seconds=30'
- go tool pprof default.pgo
profile-cpu-web:
cmds:
- curl -o default.pgo 'http://localhost:6060/debug/pprof/profile?seconds=30'
- go tool pprof -http=localhost:9090 default.pgo
profile-alloc:
cmds:
- go tool pprof 'http://localhost:6060/debug/pprof/allocs?seconds=30'
profile-heap:
cmds:
- go tool pprof 'http://localhost:6060/debug/pprof/heap?seconds=30'
profile-snap:
cmds:
- go tool pprof 'http://localhost:6060/debug/pprof/heap'
profile-trace:
cmds:
- curl -o trace.out 'http://localhost:6060/debug/pprof/trace?seconds=30'
- go tool trace trace.out