2024-02-06 11:24:48 +01:00
|
|
|
# SPDX-FileCopyrightText: 2024 Leroy Hopson <code@leroy.nix.nz>
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
set dotenv-load
|
|
|
|
|
2024-02-24 04:17:31 +01:00
|
|
|
godot := `echo "${GODOT:-godot} --rendering-driver ${RENDERING_DRIVER:-vulkan}"`
|
2024-02-06 11:24:48 +01:00
|
|
|
|
|
|
|
build:
|
2024-03-01 07:11:40 +01:00
|
|
|
cd addons/godot_xterm/native && scons debug_symbols=yes
|
2024-02-17 23:50:38 +01:00
|
|
|
|
2024-03-30 03:24:32 +01:00
|
|
|
build-javascript:
|
|
|
|
UID_GID="$(id -u):$(id -g)" docker-compose -f addons/godot_xterm/native/docker-compose.yml run --rm javascript
|
|
|
|
|
|
|
|
build-all: build build-javascript
|
|
|
|
|
2024-02-17 23:50:38 +01:00
|
|
|
install:
|
|
|
|
{{godot}} --headless -s plug.gd install
|
|
|
|
|
2024-02-25 08:35:50 +01:00
|
|
|
test_files := if os_family() == "unix" { "test/test_terminal.gd,test/test_pty.gd,test/test_nix.gd" } else { "test/test_terminal.gd,test/test_pty.gd" }
|
|
|
|
|
2024-02-17 23:50:38 +01:00
|
|
|
test:
|
2024-02-25 08:35:50 +01:00
|
|
|
{{godot}} --headless -s addons/gut/gut_cmdln.gd -gtest={{test_files}} -gexit
|
2024-02-18 08:26:32 +01:00
|
|
|
|
2024-02-25 01:13:13 +01:00
|
|
|
test-all:
|
2024-04-26 01:03:47 +02:00
|
|
|
{{godot}} --windowed --resolution 400x200 --position 0,0 -s addons/gut/gut_cmdln.gd -gdir=res://test/ -ginclude_subdirs=true -gopacity=0 -gexit
|
2024-02-25 01:13:13 +01:00
|
|
|
|
2024-02-18 08:26:32 +01:00
|
|
|
test-rendering:
|
|
|
|
{{godot}} --windowed --resolution 400x200 --position 0,0 -s addons/gut/gut_cmdln.gd -gtest=res://test/test_rendering.gd -gopacity=0 -gexit
|
2024-02-17 23:50:38 +01:00
|
|
|
|
2024-04-14 10:28:26 +02:00
|
|
|
test-visual:
|
|
|
|
{{godot}} --windowed --resolution 400x200 --position 0,0 -s addons/gut/gut_cmdln.gd -gdir=res://test/visual_regression/ -ginclude_subdirs=true -gopacity=0 -gexit
|
|
|
|
|
2024-02-17 23:50:38 +01:00
|
|
|
uninstall:
|
|
|
|
{{godot}} --headless -s plug.gd uninstall
|
2024-06-09 07:18:58 +02:00
|
|
|
|
|
|
|
bench name="":
|
|
|
|
@if [ "{{name}}" = "editor_launch" ]; then \
|
|
|
|
./benchmark/editor_launch.sh {{godot}}; \
|
|
|
|
elif [ -n "{{name}}" ]; then \
|
|
|
|
{{godot}} --windowed --resolution 800x600 --position 0,0 benchmark/benchmark.tscn -- --benchmark={{name}}; \
|
|
|
|
else \
|
|
|
|
ls -1 benchmark/vtebench/benchmarks | xargs -I {} just bench {} && just bench editor_launch; \
|
|
|
|
fi
|