-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtaskfile.yml
More file actions
126 lines (104 loc) · 3.23 KB
/
taskfile.yml
File metadata and controls
126 lines (104 loc) · 3.23 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
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
version: "3"
tasks:
dev:
env:
CGO_ENABLED: 1
cmds:
- go run ./examples/new-api
dev-assert:
env:
CGO_ENABLED: 1
cmds:
- go run ./examples/new-api -tags assert
server:
cmds:
- go run ./examples/server .
client-desktop:
cmds:
- go run ./examples/ebiten-client-desktop .
gomp-server:
cmds:
- go run ./pkg/ebiten-ecs/examples/gomp-server .
gomp-client:
cmds:
- go run ./pkg/ebiten-ecs/examples/gomp-ebiten-client .
build-web-client:
cmds:
- env GOOS=js GOARCH=wasm go build -o ./.dist/web-ebiten-client.wasm ./examples/web-ebiten-client-ws/main.go
- cp $(go env GOROOT)/misc/wasm/wasm_exec.js ./.dist
proto:
cmds:
- protoc --go_out=. internal/**/*.proto
gpprof-cpu:
cmds:
- go tool pprof --http=:6061 http://localhost:6060/debug/fgprof?seconds=20
pprof-cpu:
cmds:
- go tool pprof -http=":8000" ./cpu.out
pprof-mem:
cmds:
- go tool pprof -http=":8001" ./mem.out
pprof-trace:
cmds:
- go tool trace -http='127.0.0.1:8002' ./trace.out
build-sdl:
env:
CGO_ENABLED: 1
cmds:
- go build -o ./.dist/sdl3-cgo-game.exe internal/sdl3-cgo/sdl3cgo-game.go
- go build -o ./.dist/sdl3-purego-game.exe internal/sdl3-pure/sdl-game.go
- go build -o ./.dist/sdl3-purego-zukko-game.exe internal/sdl3-pure-zukko/sdl-zukko.go
build-win64:
env:
CGO_ENABLED: 1
cmds:
- go build -ldflags="-s -w" -o ./.dist/game-win64.exe -tags opengl43 ./examples/new-api
build-mac:
- task: build-darwin-amd64
- task: build-darwin-arm64
- task: build-darwin-universal
- task: sign-darwin-universal
build-darwin-amd64:
env:
CGO_ENABLED: 1
cmds:
- env CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o ./.dist/game-darwin-amd64 -tags opengl43 examples/new-api/game.go
- chmod +x ./.dist/game-darwin-amd64
build-darwin-arm64:
env:
CGO_ENABLED: 1
cmds:
- env CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -o ./.dist/game-darwin-arm64 -tags opengl43 examples/new-api/game.go
- chmod +x ./.dist/game-darwin-arm64
build-darwin-universal:
cmds:
- lipo -create -output ./.dist/game-universal ./.dist/game-darwin-amd64 ./.dist/game-darwin-arm64
- chmod +x ./.dist/game-universal
sign-darwin-universal:
cmds:
- mkdir -p ./.dist/game.app/Contents/MacOS
- mv ./.dist/game-universal ./.dist/game.app/Contents/MacOS/game
- chmod +x ./.dist/game.app
- codesign --timestamp --options=runtime --deep -fs milanrodd-cert -v ./.dist/game.app
- xattr -cr ./.dist/game.app
- /usr/bin/ditto -c -k --keepParent ./.dist/game.app ./.dist/game.zip
build-wasm:
env:
GOOS: wasip1
GOARCH: wasm
watch: true
sources:
- 'internal/wasyan**/*.go'
cmds:
- go build -buildmode=c-shared -o ./hello.wasm ./internal/wasyan-wasm
- curl http://127.0.0.1:3000/update/hello.wasm
build-tiny-wasm:
env:
GOOS: wasip1
GOARCH: wasm
watch: true
sources:
- 'internal/wasyan-wasm/*.go'
cmds:
- tinygo build -buildmode=c-shared -o ./hello.wasm -target=wasi ./internal/wasyan-wasm
- curl http://127.0.0.1:3000/update/hello.wasm