From 03a68db81cd6bf7c3dc21272917a6826c72997ab Mon Sep 17 00:00:00 2001 From: florianvazelle Date: Thu, 4 Jan 2024 21:37:13 +0100 Subject: [PATCH] chore: commit the global script class cache --- .github/workflows/release-packaging.yml | 28 ++++++ .gitignore | 3 +- .godot/global_script_class_cache.cfg | 115 ++++++++++++++++++++++++ Justfile | 29 ++++-- 4 files changed, 167 insertions(+), 8 deletions(-) create mode 100644 .godot/global_script_class_cache.cfg diff --git a/.github/workflows/release-packaging.yml b/.github/workflows/release-packaging.yml index 13bd7b1..a44eb69 100644 --- a/.github/workflows/release-packaging.yml +++ b/.github/workflows/release-packaging.yml @@ -14,6 +14,9 @@ jobs: steps: - uses: actions/checkout@v4 + with: + lfs: true + - uses: extractions/setup-just@v1 - name: Load dotenv @@ -39,11 +42,22 @@ jobs: steps: - uses: actions/checkout@v4 + with: + lfs: true + - uses: extractions/setup-just@v1 - name: Load dotenv run: just ci-load-dotenv + - name: Cache Godot + uses: actions/cache@v3 + with: + path: | + ~/.mkflower/bin + ~/.local/share/godot/export_templates/${{ env.godot_version }}.stable + key: ${{ env.godot_version }} + - name: Export run: just export @@ -63,8 +77,19 @@ jobs: steps: - uses: actions/checkout@v4 + with: + lfs: true + - uses: extractions/setup-just@v1 + - name: Cache Godot + uses: actions/cache@v3 + with: + path: | + ~/.mkflower/bin + ~/.local/share/godot/export_templates/${{ env.godot_version }}.stable + key: ${{ env.godot_version }} + - name: Load dotenv run: just ci-load-dotenv @@ -92,6 +117,9 @@ jobs: steps: - uses: actions/checkout@v4 + with: + lfs: true + - uses: extractions/setup-just@v1 - name: Load dotenv diff --git a/.gitignore b/.gitignore index be48c14..3de9ba6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Godot-specific ignores -.godot/ +.godot/* +!.godot/global_script_class_cache.cfg .import/ gfxrecon_capture_* diff --git a/.godot/global_script_class_cache.cfg b/.godot/global_script_class_cache.cfg new file mode 100644 index 0000000..597d304 --- /dev/null +++ b/.godot/global_script_class_cache.cfg @@ -0,0 +1,115 @@ +list=Array[Dictionary]([{ +"base": &"Node", +"class": &"AudioStreamPlayerPool", +"icon": "", +"language": &"GDScript", +"path": "res://addons/ez-sfx-and-music/scenes/AudioStreamPlayerPool/audio_stream_player_pool.gd" +}, { +"base": &"AudioStreamPlayer", +"class": &"AudioStreamPlayerWithFade", +"icon": "", +"language": &"GDScript", +"path": "res://addons/ez-sfx-and-music/scenes/AudioStreamPlayerWithFade/audio_stream_player_with_fade.gd" +}, { +"base": &"Ghost", +"class": &"BossGhost", +"icon": "", +"language": &"GDScript", +"path": "res://scripts/props/boss_ghost.gd" +}, { +"base": &"CanvasLayer", +"class": &"Fade", +"icon": "", +"language": &"GDScript", +"path": "res://addons/UniversalFade/Fade.gd" +}, { +"base": &"StaticBody3D", +"class": &"Ghost", +"icon": "", +"language": &"GDScript", +"path": "res://scripts/props/ghost.gd" +}, { +"base": &"Node3D", +"class": &"Healthbar3D", +"icon": "", +"language": &"GDScript", +"path": "res://scripts/gui/healthbar.gd" +}, { +"base": &"Control", +"class": &"Menu", +"icon": "", +"language": &"GDScript", +"path": "res://scripts/gui/menu.gd" +}, { +"base": &"CharacterBody3D", +"class": &"MovementController", +"icon": "", +"language": &"GDScript", +"path": "res://scripts/player/movement_controller.gd" +}, { +"base": &"Node", +"class": &"MusicPlayer", +"icon": "", +"language": &"GDScript", +"path": "res://addons/ez-sfx-and-music/scenes/MusicPlayer/music_player.gd" +}, { +"base": &"RichTextEffect", +"class": &"Nervous", +"icon": "", +"language": &"GDScript", +"path": "res://scripts/gui/nervous.gd" +}, { +"base": &"Node", +"class": &"OptionsConstants", +"icon": "", +"language": &"GDScript", +"path": "res://addons/EasyMenus/Scripts/options_constants.gd" +}, { +"base": &"Control", +"class": &"Overlay", +"icon": "", +"language": &"GDScript", +"path": "res://scripts/gui/overlay.gd" +}, { +"base": &"Resource", +"class": &"ProtonScatterBaseShape", +"icon": "", +"language": &"GDScript", +"path": "res://addons/proton_scatter/src/shapes/base_shape.gd" +}, { +"base": &"ProtonScatterBaseShape", +"class": &"ProtonScatterBoxShape", +"icon": "", +"language": &"GDScript", +"path": "res://addons/proton_scatter/src/shapes/box_shape.gd" +}, { +"base": &"Resource", +"class": &"ProtonScatterCacheResource", +"icon": "", +"language": &"GDScript", +"path": "res://addons/proton_scatter/src/common/cache_resource.gd" +}, { +"base": &"ProtonScatterBaseShape", +"class": &"ProtonScatterPathShape", +"icon": "", +"language": &"GDScript", +"path": "res://addons/proton_scatter/src/shapes/path_shape.gd" +}, { +"base": &"ProtonScatterBaseShape", +"class": &"ProtonScatterSphereShape", +"icon": "", +"language": &"GDScript", +"path": "res://addons/proton_scatter/src/shapes/sphere_shape.gd" +}, { +"base": &"Node", +"class": &"Scenario", +"icon": "", +"language": &"GDScript", +"path": "res://scripts/scenario.gd" +}, { +"base": &"Node", +"class": &"SfxPlayer", +"icon": "", +"language": &"GDScript", +"path": "res://addons/ez-sfx-and-music/scenes/SfxPlayer/sfx_player.gd" +}]) diff --git a/Justfile b/Justfile index 8eec001..51a3a19 100644 --- a/Justfile +++ b/Justfile @@ -1,5 +1,7 @@ #!/usr/bin/env -S just --justfile +# === Settings === + set dotenv-load := true export PIP_REQUIRE_VIRTUALENV := "true" @@ -27,11 +29,26 @@ dist_dir := justfile_directory() / "dist" # Godot variables godot_version := env_var('GODOT_VERSION') -godot_platform := if arch() == "x86" { "linux.x86_32" } else { if arch() == "x86_64" { "linux.x86_64" } else { "" } } +godot_platform := if arch() == "x86" { + "linux.x86_32" +} else { + if arch() == "x86_64" { + "linux.x86_64" + } else { + if arch() == "arm" { + "linux.arm32" + } else { + if arch() == "aarch64" { + "linux.arm64" + } else { "" } + } + } +} godot_filename := "Godot_v" + godot_version + "-stable_" + godot_platform godot_template := "Godot_v" + godot_version + "-stable_export_templates.tpz" godot_bin := bin_dir / godot_filename godot_editor_data_dir := "~/.local/share/godot/" +use_x11_wrapper := if godot_platform =~ "x11*" { env("CI", "false") } else { "false" } # Game variables game_name := env_var('GAME_NAME') @@ -100,8 +117,6 @@ install-addons: # Import game resources import-resources: just godot --headless --export-pack null /dev/null - # timeout 60 just godot --editor || true - # just godot --headless --quit --editor # Updates the game version for export @bump-version: @@ -131,19 +146,19 @@ fmt: # Export game on Windows export-windows: bump-version install-addons import-resources mkdir -p {{ build_dir }}/windows - just godot --export-release '"Windows Desktop"' --headless {{ build_dir }}/windows/{{ game_name }}.exe + just godot --headless --export-release '"Windows Desktop"' {{ build_dir }}/windows/{{ game_name }}.exe (cd {{ build_dir }}/windows && zip {{ game_name }}-windows-v{{ game_version }}.zip -r .) mv {{ build_dir }}/windows/{{ game_name }}-windows-v{{ game_version }}.zip {{ dist_dir }}/{{ game_name }}-windows-v{{ game_version }}.zip rm -rf {{ build_dir }}/windows # Export game on MacOS export-mac: bump-version install-addons import-resources - just godot --export-release "macOS" --headless {{ dist_dir }}/{{ game_name }}-mac-v{{ game_version }}.zip + just godot --headless --export-release "macOS" {{ dist_dir }}/{{ game_name }}-mac-v{{ game_version }}.zip # Export game on Linux export-linux: bump-version install-addons import-resources mkdir -p {{ build_dir }}/linux - just godot --export-release "Linux/X11" --headless {{ build_dir }}/linux/{{ game_name }}.x86_64 + just godot --headless --export-release "Linux/X11" {{ build_dir }}/linux/{{ game_name }}.x86_64 (cd {{ build_dir }}/linux && zip {{ game_name }}-linux-v{{ game_version }}.zip -r .) mv {{ build_dir }}/linux/{{ game_name }}-linux-v{{ game_version }}.zip {{ dist_dir }}/{{ game_name }}-linux-v{{ game_version }}.zip rm -rf {{ build_dir }}/linux @@ -151,7 +166,7 @@ export-linux: bump-version install-addons import-resources # Export game for the web export-web: bump-version install-addons import-resources mkdir -p {{ build_dir }}/web - just godot --export-release "Web" --headless {{ build_dir }}/web/index.html + just godot --headless --export-release "Web" {{ build_dir }}/web/index.html # Export on all platform export: export-windows export-mac export-linux