Merge branch 'develop' into feat/ctf

This commit is contained in:
anyreso 2024-04-15 01:47:44 -04:00
commit 7cd8bbeadb
5 changed files with 118 additions and 3 deletions

3
.gitignore vendored
View file

@ -18,3 +18,6 @@ export_presets.cfg
# Added by Squinternator: *.dll files compiled by the windows build
addons/godot-jolt/windows/~godot-jolt_windows-x64_editor.dll
addons/terrain_3d/bin/~libterrain.windows.debug.x86_64.dll
build

80
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,80 @@
image: $CI_REGISTRY/open-fpsz/docker-godot/godot
stages:
- addons
- tests
- export
# cache imported assets between runs
cache: &global_cache
key: $CI_MERGE_REQUEST_IID
paths:
- .godot
# run godot to load addons
addons:
stage: addons
script:
- timeout 10 godot --headless --editor --verbose || true
- timeout 10 godot --headless --editor --verbose || true
only:
- main
- develop
# run tests
tests:
stage: tests
needs: [ "addons" ]
script:
- godot --headless --path "$PWD" -s addons/gut/gut_cmdln.gd
only:
- main
- develop
# export binaries
.export_presets:
needs: [ "tests" ]
before_script:
- cp "$EXPORT_PRESETS" export_presets.cfg
only:
- main
variables:
EXPORT_NAME: open-fpsz
linux:
stage: export
extends: [ .export_presets ]
when: manual
script:
- mkdir -v -p build/linux
- godot --headless --verbose --export-release "Linux/X11" build/linux/$EXPORT_NAME.x86_64
artifacts:
name: $EXPORT_NAME-$CI_JOB_NAME
paths:
- build/linux
windows:
stage: export
extends: [ .export_presets ]
when: manual
script:
- mkdir -v -p build/windows
- godot --headless --verbose --export-release "Windows Desktop" build/windows/$EXPORT_NAME.exe
artifacts:
name: $EXPORT_NAME-$CI_JOB_NAME
paths:
- build/windows
mac:
stage: export
extends: [ .export_presets ]
when: manual
script:
- mkdir -v -p build/mac
- godot --headless --verbose --export-release "Mac OSX" build/mac/$EXPORT_NAME.zip
artifacts:
name: $EXPORT_NAME-$CI_JOB_NAME
paths:
- build/mac

33
.gutconfig.json Normal file
View file

@ -0,0 +1,33 @@
{
"background_color": "262626ff",
"compact_mode": false,
"configured_dirs": [],
"dirs": ["res://tests"],
"disable_colors": false,
"double_strategy": "SCRIPT_ONLY",
"errors_do_not_cause_failure": false,
"font_color": "ccccccff",
"font_name": "CourierPrime",
"font_size": 16,
"gut_on_top": true,
"hide_orphans": true,
"ignore_pause": true,
"include_subdirs": true,
"inner_class": "",
"junit_xml_file": "",
"junit_xml_timestamp": false,
"log_level": 1,
"opacity": 100,
"paint_after": 0.1,
"post_run_script": "",
"pre_run_script": "",
"prefix": "test_",
"selected": "",
"should_exit": true,
"should_exit_on_success": false,
"should_maximize": false,
"suffix": ".gd",
"tests": [],
"unit_test_name": ""
}

View file

@ -21,7 +21,7 @@ movie_writer/disable_vsync=true
[editor_plugins]
enabled=PackedStringArray("res://addons/terrain_3d/plugin.cfg")
enabled=PackedStringArray("res://addons/gut/plugin.cfg", "res://addons/terrain_3d/plugin.cfg")
[input]

View file

@ -18,5 +18,4 @@ func _test_projectile_class():
var projectile = Projectile.new()
assert(projectile != null, "Projectile class should be instantiated")
assert(projectile.speed == 78.4, "Projectile damage should be initialized to 78.4")
projectile.queue_free()
projectile.queue_free()