diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index d4af744..8897fc7 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -63,13 +63,13 @@ jobs: - name: Use Godot run: | echo "-------------------- OPEN EDITOR TO IMPORT PROJECT -----------------------" - DRI_PRIME=0 timeout 25s xvfb-run ./godot.x11.tools.64s -e --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + DRI_PRIME=0 timeout 25s xvfb-run ./godot.x11.tools.64s --audio-driver Dummy -e --path $(pwd) 2>&1 | tee sanitizers_log.txt || true misc/check_ci_log.py sanitizers_log.txt echo "-------------------- OPEN EDITOR SECOND TIME TO BE SURE THAT EVERYTHING WAS IMPORTED -----------------------" - DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s -e -q --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s --audio-driver Dummy -e -q --path $(pwd) 2>&1 | tee sanitizers_log.txt || true misc/check_ci_log.py sanitizers_log.txt echo "-------------------- RUN PROJECT -----------------------" - DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s 60 --video-driver GLES3 --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s 60 --audio-driver Dummy --video-driver GLES3 --path $(pwd) 2>&1 | tee sanitizers_log.txt || true misc/check_ci_log.py sanitizers_log.txt # # Export project and run it to check for possible leaks and invalid memory usage diff --git a/.github/workflows/linux_builds_1h.yml b/.github/workflows/linux_builds_1h.yml index 2942fd0..dbad7d1 100644 --- a/.github/workflows/linux_builds_1h.yml +++ b/.github/workflows/linux_builds_1h.yml @@ -63,13 +63,13 @@ jobs: - name: Use Godot run: | echo "-------------------- OPEN EDITOR TO IMPORT PROJECT -----------------------" - DRI_PRIME=0 timeout 25s xvfb-run ./godot.x11.tools.64s -e --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + DRI_PRIME=0 timeout 25s xvfb-run ./godot.x11.tools.64s --audio-driver Dummy -e --path $(pwd) 2>&1 | tee sanitizers_log.txt || true misc/check_ci_log.py sanitizers_log.txt echo "-------------------- OPEN EDITOR SECOND TIME TO BE SURE THAT EVERYTHING WAS IMPORTED -----------------------" - DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s -e -q --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s --audio-driver Dummy -e -q --path $(pwd) 2>&1 | tee sanitizers_log.txt || true misc/check_ci_log.py sanitizers_log.txt echo "-------------------- RUN PROJECT -----------------------" - DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s 3600 --video-driver GLES3 --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s 3600 --audio-driver Dummy --video-driver GLES3 --path $(pwd) 2>&1 | tee sanitizers_log.txt || true misc/check_ci_log.py sanitizers_log.txt # # Export project and run it to check for possible leaks and invalid memory usage diff --git a/.github/workflows/linux_builds_1m_max.yml b/.github/workflows/linux_builds_1m_max.yml new file mode 100644 index 0000000..b773403 --- /dev/null +++ b/.github/workflows/linux_builds_1m_max.yml @@ -0,0 +1,84 @@ +name: 🐧 Linux Builds Stress 1m +on: [push, pull_request] + +jobs: + linux-sanitizer: + runs-on: "ubuntu-20.04" + name: Editor and exported project with sanitizers (target=debug/release, tools=yes/no, debug_symbols=yes, use_ubsan=yes, use_asan=yes) + + steps: + - uses: actions/checkout@v2 + + # Azure repositories are not reliable, we need to prevent azure giving us packages. + - name: Make apt sources.list use the default Ubuntu repositories + run: | + sudo rm -f /etc/apt/sources.list.d/* + sudo cp -f misc/ci/sources.list /etc/apt/sources.list + sudo apt-get update + + # Install all packages (except scons) + - name: Configure dependencies + run: | + sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \ + libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm \ + xvfb wget2 unzip python scons git + +# - name: Download Godot +# run: | +# wget2 https://downloads.tuxfamily.org/godotengine/3.2.4/beta1/Godot_v3.2.4-beta1_x11.64.zip +# unzip Godot_v3.2.4-beta1_x11.64.zip +# rm Godot_v3.2.4-beta1_x11.64.zip +# mv Godot_v3.2.4-beta1_x11.64 godot.x11.tools.64s +# wget2 https://downloads.tuxfamily.org/godotengine/3.2.4/beta1/Godot_v3.2.4-beta1_export_templates.tpz +# unzip Godot_v3.2.4-beta1_export_templates.tpz +# mv templates/linux_x11_64_debug godot.x11.opt.64s +# rm -rf templates +# rm Godot_v3.2.4-beta1_export_templates.tpz +# ls -alr + +# - name: Download Godot(ZIP) +# run: | +# wget2 https://github.com/godotengine/godot/archive/3.2.zip +# unzip 3.2.zip +# rm 3.2.zip + + + - name: Download Godot(GIT) + run: | + git clone https://github.com/godotengine/godot.git + cd godot + git checkout 3.2 + cd ../ + + - name: Compile Godot + run: | + cd godot + scons p=x11 -j2 use_asan=yes use_ubsan=yes CCFLAGS="-fsanitize=shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr" + true || scons tools=no target=release debug_symbols=yes use_asan=yes use_ubsan=yes CCFLAGS="-fsanitize=shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr" + cp bin/godot.x11.tools.64s ../ + true || cp bin/godot.x11.opt.64s ../ + cd ../ + rm -rf godot + + - name: Use Godot + run: | + sed -i "s|NUMBER_OF_INSTANCES : int = 1|NUMBER_OF_INSTANCES : int = 10|" Start.gd + echo "-------------------- OPEN EDITOR TO IMPORT PROJECT -----------------------" + DRI_PRIME=0 timeout 25s xvfb-run ./godot.x11.tools.64s --audio-driver Dummy -e --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + misc/check_ci_log.py sanitizers_log.txt || true + echo "-------------------- OPEN EDITOR SECOND TIME TO BE SURE THAT EVERYTHING WAS IMPORTED -----------------------" + DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s --audio-driver Dummy -e -q --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + misc/check_ci_log.py sanitizers_log.txt || true + echo "-------------------- RUN PROJECT -----------------------" + DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s 60 --audio-driver Dummy --video-driver GLES3 --path $(pwd) 2>&1 | tee sanitizers_log.txt || true + misc/check_ci_log.py sanitizers_log.txt || true + +# # Export project and run it to check for possible leaks and invalid memory usage +# - name: Exporting and running project +# run: | +# curr="$(pwd)/godot.x11.opt.64s" +# sed -i "s|PATH_TO_CHANGE|$curr|" export_presets.cfg +# DRI_PRIME=0 xvfb-run ./godot.x11.tools.64s --export-debug "Linux/X11" test_project 2>&1 | tee sanitizers_log.txt || true +# misc/check_ci_log.py sanitizers_log.txt +# DRI_PRIME=0 xvfb-run ./test_project 20 2>&1 | tee sanitizers_log.txt || true +# misc/check_ci_log.py sanitizers_log.txt diff --git a/All.tscn b/All.tscn index 1a2f745..d9f66b1 100644 --- a/All.tscn +++ b/All.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=11 format=2] [ext_resource path="res://MainScenes/Control.tscn" type="PackedScene" id=1] [ext_resource path="res://MainScenes/Spatial.tscn" type="PackedScene" id=2] @@ -9,6 +9,7 @@ [ext_resource path="res://Rendering/Lights3D/Lights3D.tscn" type="PackedScene" id=7] [ext_resource path="res://Rendering/Lights2D/Lights2D.tscn" type="PackedScene" id=8] [ext_resource path="res://Physics/3D/Physics3D.tscn" type="PackedScene" id=9] +[ext_resource path="res://Text/Text.tscn" type="PackedScene" id=10] [node name="All" type="Node"] @@ -35,3 +36,5 @@ [node name="Lights2D" parent="Rendering" instance=ExtResource( 8 )] [node name="Lights3D" parent="Rendering" instance=ExtResource( 7 )] + +[node name="Text" parent="." instance=ExtResource( 10 )] diff --git a/Autoload/Autoload.gd b/Autoload/Autoload.gd index 8b84ca1..9cb800d 100644 --- a/Autoload/Autoload.gd +++ b/Autoload/Autoload.gd @@ -22,6 +22,7 @@ const alone_steps : Array = [ "res://Physics/3D/Physics3D.tscn", "res://Rendering/Lights2D/Lights2D.tscn", "res://Rendering/Lights3D/Lights3D.tscn", + "res://Text/Text.tscn" ] # All scenes run in one step diff --git a/Text/Label.gd b/Text/Label.gd new file mode 100644 index 0000000..5c582c9 --- /dev/null +++ b/Text/Label.gd @@ -0,0 +1,18 @@ +extends Label + +const TIME : float = 0.3 +var time_to_stop : float = TIME +var current_type : int = 0 + +func _process(delta: float) -> void: + time_to_stop -= delta + if time_to_stop < 0: + time_to_stop = TIME + + current_type += 1 + current_type %= 2 + + if current_type == 0: + set_text("ŚWIERSZCZ NAD GŻEGŻÓŁKĄ W ŻÓŁCI") + else: + text += "AQWAMARYNA" diff --git a/Text/Label.tscn b/Text/Label.tscn new file mode 100644 index 0000000..cae8206 --- /dev/null +++ b/Text/Label.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Text/Label.gd" type="Script" id=1] + +[node name="Label" type="Label"] +margin_right = 83.0 +margin_bottom = 14.0 +text = "Stomatologia" +script = ExtResource( 1 ) diff --git a/Text/RichTextLabel.gd b/Text/RichTextLabel.gd new file mode 100644 index 0000000..d991763 --- /dev/null +++ b/Text/RichTextLabel.gd @@ -0,0 +1,18 @@ +extends RichTextLabel + +const TIME : float = 0.3 +var time_to_stop : float = TIME +var current_type : int = 0 + +func _process(delta: float) -> void: + time_to_stop -= delta + if time_to_stop < 0: + time_to_stop = TIME + + current_type += 1 + current_type %= 2 + + if current_type == 0: + set_text("ŚWIERSZCZ NAD GŻEGŻÓŁKĄ W ŻÓŁCI, Świeci nad Źrebięciem w ciągu szeleszczącej burzy") + else: + text += "AQWAMARYNA JEST ZROBIONA Z KROMKI PO MAŚLE I NAD REDUNDANCJĄ TRZEBA ZROBIĆ DWIE ABY SIĘ NIE POŚLIZGNĄĆ" diff --git a/Text/RichTextLabel.tscn b/Text/RichTextLabel.tscn new file mode 100644 index 0000000..badc963 --- /dev/null +++ b/Text/RichTextLabel.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Text/RichTextLabel.gd" type="Script" id=1] + +[node name="RichTextLabel" type="RichTextLabel"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +bbcode_text = "Szyszka" +text = "Szyszka" +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} diff --git a/Text/Text.tscn b/Text/Text.tscn new file mode 100644 index 0000000..04a001c --- /dev/null +++ b/Text/Text.tscn @@ -0,0 +1,62 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Text/RichTextLabel.tscn" type="PackedScene" id=1] +[ext_resource path="res://Text/Label.tscn" type="PackedScene" id=2] + +[node name="Text" type="GridContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +columns = 5 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" parent="." instance=ExtResource( 2 )] +margin_top = 142.0 +margin_right = 280.0 +margin_bottom = 156.0 + +[node name="Label2" parent="." instance=ExtResource( 2 )] +margin_left = 284.0 +margin_top = 142.0 +margin_right = 367.0 +margin_bottom = 156.0 + +[node name="Label3" parent="." instance=ExtResource( 2 )] +margin_left = 371.0 +margin_top = 142.0 +margin_right = 454.0 +margin_bottom = 156.0 + +[node name="RichTextLabel" parent="." instance=ExtResource( 1 )] +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_left = 458.0 +margin_right = 738.0 +margin_bottom = 298.0 +bbcode_text = "Roman +" +text = "Roman +" + +[node name="RichTextLabel2" parent="." instance=ExtResource( 1 )] +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_left = 742.0 +margin_right = 1022.0 +margin_bottom = 298.0 +bbcode_text = "Roman +" +text = "Roman +" + +[node name="RichTextLabel3" parent="." instance=ExtResource( 1 )] +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_top = 302.0 +margin_right = 280.0 +margin_bottom = 600.0 +bbcode_text = "Roman +" +text = "Roman +"