-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 1.16 KB
/
Copy pathMakefile
File metadata and controls
40 lines (32 loc) · 1.16 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
.PHONY: test test/visual test/visual/save run build clean fmt
build:
mkdir -p bin
cd game && go build -o ../bin/game ./cmd/game
cp -r game/assets ./bin/assets
@echo '#!/bin/bash' > bin/run.sh
@echo 'SCRIPT_DIR="$$( cd "$$( dirname "$${BASH_SOURCE[0]}" )" && pwd )"' >> bin/run.sh
@echo 'exec "$${SCRIPT_DIR}/game" "$$@"' >> bin/run.sh
@chmod +x bin/run.sh
@echo "Built. Run with: ./bin/run.sh"
run/editor:
cd game && go run ./cmd/game --assets ./assets
run/game:
cd game && go run ./cmd/game --assets ./assets --mode game
test:
cd engine && go test -v ./...
cd game && go test -v ./...
go test -v ./pkg/rlshadow/...
test/visual:
@echo "Running visual GPU tests (windows will appear for 2 seconds each)..."
go test -v -count=1 ./engine/core/... 2>&1 | grep -E "(PASS|FAIL|Window)"
go test -v -count=1 ./pkg/rlshadow/... 2>&1 | grep -E "(PASS|FAIL|Window)"
test/visual/save:
@echo "Running visual GPU tests and saving renders to testdata/renders/..."
SAVE_TEST_RENDERS=1 go test -v -count=1 ./engine/core/...
SAVE_TEST_RENDERS=1 go test -v -count=1 ./pkg/rlshadow/...
fmt:
cd engine && go fmt ./...
cd game && go fmt ./...
clean:
go clean -cache
rm -rf bin/