-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (40 loc) · 1.46 KB
/
Makefile
File metadata and controls
56 lines (40 loc) · 1.46 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
# Makefile for UntoldEngine
# Default target - compile shaders and then build the swift package
all: compile-shaders build
# Compile the .metal files into a .metallib
compile-shaders:
sh ./buildkernels.sh
# hot reload
hot-reload-shaders:
sh ./buildkernels-hotreload.sh
# Build the Swift package
build:
swift build
# Clean build artifact
clean:
swift package clean
# Test target
test:
swift test
testcore:
swift test --filter UntoldEngineTests
testrenderer:
python3 -m pip install --user --break-system-packages --upgrade pip wheel setuptools
python3 -m pip install --user --break-system-packages opencv-python-headless scikit-image
UNTOLD_KEEP_ARTIFACTS=$(KEEP) swift test --parallel --num-workers 1 --filter UntoldEngineRenderTests
# Required SwiftFormat version
SWIFTFORMAT_VERSION := 0.60.1
# Verify installed SwiftFormat matches the required version
check-swiftformat-version:
@INSTALLED=$$(swiftformat --version 2>&1 | awk '{print $$NF}'); \
if [ "$$INSTALLED" != "$(SWIFTFORMAT_VERSION)" ]; then \
echo "Error: swiftformat $(SWIFTFORMAT_VERSION) required, but found $$INSTALLED"; \
echo "Run: brew install swiftformat@$(SWIFTFORMAT_VERSION) or: brew upgrade swiftformat"; \
exit 1; \
fi
# Lint Swift files using SwiftFormat
lint: check-swiftformat-version
swiftformat --lint . --swiftversion 5.8 --reporter github-actions-log
# Auto-format Swift files (for convenience)
format: check-swiftformat-version
swiftformat . --swiftversion 5.8 --quiet