From c1694d9dd38c28d547228ba373ca03b5806e8bf5 Mon Sep 17 00:00:00 2001 From: Patrick Dawson Date: Thu, 6 Jun 2024 17:03:48 +0200 Subject: [PATCH] CI: test csharp-only export --- .github/workflows/godot.yml | 37 ++++++++++++++++++++++++++++++------- export_presets.cfg | 29 +++++++++++++++++++++++------ 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/.github/workflows/godot.yml b/.github/workflows/godot.yml index 4fe7de23..36f40455 100644 --- a/.github/workflows/godot.yml +++ b/.github/workflows/godot.yml @@ -9,13 +9,20 @@ on: - godot3 jobs: - export_game: - name: Run with Godot + linux_dotnet: + name: 🐧.NET Only runs-on: ubuntu-latest strategy: matrix: - gdver: ["4.2.2", "4.3.0-dev.6"] + gdver: ["4.2.2", "4.3.0-beta.1"] + include: + - gdver: "4.2.2" + gdver_full: 4.2.2.stable.mono + templates_url: https://github.com/godotengine/godot/releases/download/4.2.2-stable/Godot_v4.2.2-stable_mono_export_templates.tpz + - gdver: "4.3.0-beta.1" + gdver_full: 4.3.beta1.mono + templates_url: https://github.com/godotengine/godot-builds/releases/download/4.3-beta1/Godot_v4.3-beta1_mono_export_templates.tpz steps: - uses: actions/checkout@v4 @@ -32,9 +39,25 @@ jobs: - name: Import resources and build run: | - $(godotenv godot env path) --headless --build-solutions --quit + dotnet build + $(godotenv godot env path) --headless --import - # TODO: run tests with the exported binary - - name: Test + - name: Run project run: | - $(godotenv godot env path) --headless --quit + $(godotenv godot env path) --headless --quit-after 10 + + - name: Download export templates + run: | + mkdir -p ~/.local/share/godot/export_templates + cd ~/.local/share/godot/export_templates + wget ${{ matrix.templates_url }} + unzip *.tpz + rm *.tpz + mv templates ${{ matrix.gdver_full }} + + - name: Export + run: | + mkdir export + $(godotenv godot env path) --headless --export-release Linux + cd export + ./demo --headless --quit-after 10 diff --git a/export_presets.cfg b/export_presets.cfg index a187d82f..06688701 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -1,29 +1,46 @@ [preset.0] -name="Linux/X11" +name="Linux" platform="Linux/X11" runnable=true +dedicated_server=false custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="export/Dear ImGui for Godot Demo.x86_64" +export_path="export/demo" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=false -script_export_mode=1 -script_encryption_key="" [preset.0.options] custom_template/debug="" custom_template/release="" -debug/export_console_script=1 +debug/export_console_wrapper=1 binary_format/embed_pck=false texture_format/bptc=false texture_format/s3tc=true texture_format/etc=false texture_format/etc2=false -texture_format/no_bptc_fallbacks=true binary_format/architecture="x86_64" +ssh_remote_deploy/enabled=false +ssh_remote_deploy/host="user@host_ip" +ssh_remote_deploy/port="22" +ssh_remote_deploy/extra_args_ssh="" +ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="#!/usr/bin/env bash +export DISPLAY=:0 +unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" +\"{temp_dir}/{exe_name}\" {cmd_args}" +ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash +kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") +rm -rf \"{temp_dir}\"" +dotnet/include_scripts_content=false +dotnet/include_debug_symbols=true +dotnet/embed_build_outputs=false +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +debug/export_console_script=1 +texture_format/no_bptc_fallbacks=true