mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-12-03 13:40:24 +01:00
9569c9e489
Adds benchmarks by running [alacritty/vtebench](https://github.com/alacritty/vtebench) benchmarks in the terminal. Uses code based on [godotengine/godot-benchmarks](https://github.com/godotengine/godot-benchmarks) to measure average GPU and CPU time spent per frame. Uses [github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark) for continuous integration, and publishes benchmark results to https://lihop.github.io/godot-xterm/dev/bench/.
43 lines
1.6 KiB
Makefile
43 lines
1.6 KiB
Makefile
# SPDX-FileCopyrightText: 2024 Leroy Hopson <code@leroy.nix.nz>
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
set dotenv-load
|
|
|
|
godot := `echo "${GODOT:-godot} --rendering-driver ${RENDERING_DRIVER:-vulkan}"`
|
|
|
|
build:
|
|
cd addons/godot_xterm/native && scons debug_symbols=yes
|
|
|
|
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
|
|
|
|
install:
|
|
{{godot}} --headless -s plug.gd install
|
|
|
|
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" }
|
|
|
|
test:
|
|
{{godot}} --headless -s addons/gut/gut_cmdln.gd -gtest={{test_files}} -gexit
|
|
|
|
test-all:
|
|
{{godot}} --windowed --resolution 400x200 --position 0,0 -s addons/gut/gut_cmdln.gd -gdir=res://test/ -ginclude_subdirs=true -gopacity=0 -gexit
|
|
|
|
test-rendering:
|
|
{{godot}} --windowed --resolution 400x200 --position 0,0 -s addons/gut/gut_cmdln.gd -gtest=res://test/test_rendering.gd -gopacity=0 -gexit
|
|
|
|
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
|
|
|
|
uninstall:
|
|
{{godot}} --headless -s plug.gd uninstall
|
|
|
|
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
|