From 071829acc5b80eea1c0bae1ea92fcc0a688221d8 Mon Sep 17 00:00:00 2001 From: qarmin Date: Fri, 1 Oct 2021 08:14:54 +0200 Subject: Enable mono editor build in CI --- .github/workflows/linux_builds.yml | 29 ++++++++++++++++++++++++----- doc/classes/ProjectSettings.xml | 2 -- main/main.cpp | 2 -- modules/mono/doc_classes/CSharpScript.xml | 5 +---- modules/mono/doc_classes/GodotSharp.xml | 29 +++++++++-------------------- 5 files changed, 34 insertions(+), 33 deletions(-) diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index f6d11e2efe..15bd4bc69b 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -18,13 +18,15 @@ jobs: fail-fast: false matrix: include: - - name: Editor (target=release_debug, tools=yes, tests=yes) - cache-name: linux-editor + - name: Editor w/ Mono (target=release_debug, tools=yes, tests=yes) + cache-name: linux-editor-mono target: release_debug tools: true - tests: true + tests: false # Disabled due freeze caused by mix Mono build and CI + sconsflags: module_mono_enabled=yes mono_glue=no doc-test: true - bin: "./bin/godot.linuxbsd.opt.tools.64" + bin: "./bin/godot.linuxbsd.opt.tools.64.mono" + build-mono: true artifact: true - name: Editor and sanitizers (target=debug, tools=yes, tests=yes, use_asan=yes, use_ubsan=yes) @@ -36,6 +38,7 @@ jobs: proj-test: true godot-cpp-test: true bin: "./bin/godot.linuxbsd.tools.64s" + build-mono: false # Skip 2GiB artifact speeding up action. artifact: false @@ -45,6 +48,7 @@ jobs: tools: false tests: false sconsflags: module_mono_enabled=yes mono_glue=no debug_symbols=no + build-mono: false artifact: true steps: @@ -80,11 +84,26 @@ jobs: tools: ${{ matrix.tools }} tests: ${{ matrix.tests }} + - name: Generate Mono glue + if: ${{ matrix.build-mono }} + run: | + ${{ matrix.bin }} --headless --generate-mono-glue modules/mono/glue || true + + # Rebuild with mono + - name: Compilation (mono_glue=yes) + uses: ./.github/actions/godot-build + if: ${{ matrix.build-mono }} + with: + sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} mono_glue=yes + platform: linuxbsd + target: ${{ matrix.target }} + tools: ${{ matrix.tools }} + # Execute unit tests for the editor - name: Unit tests if: ${{ matrix.tests }} run: | - ${{ matrix.bin }} --test + ${{ matrix.bin }} --test --headless # Check class reference - name: Check for class reference updates diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 30409814d2..205987f5be 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1315,8 +1315,6 @@ - - diff --git a/main/main.cpp b/main/main.cpp index 863ffccfae..0cf805f94a 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -2051,8 +2051,6 @@ bool Main::start() { GLOBAL_DEF("mono/profiler/args", "log:calls,alloc,sample,output=output.mlpd"); GLOBAL_DEF("mono/profiler/enabled", false); GLOBAL_DEF("mono/unhandled_exception_policy", 0); - // From editor/csharp_project.cpp. - GLOBAL_DEF("mono/project/auto_update_project", true); #endif DocTools doc; diff --git a/modules/mono/doc_classes/CSharpScript.xml b/modules/mono/doc_classes/CSharpScript.xml index abd860a55f..2bca8bc24e 100644 --- a/modules/mono/doc_classes/CSharpScript.xml +++ b/modules/mono/doc_classes/CSharpScript.xml @@ -12,13 +12,10 @@ - - + Returns a new instance of the script. - - diff --git a/modules/mono/doc_classes/GodotSharp.xml b/modules/mono/doc_classes/GodotSharp.xml index 417f8ac704..a148072245 100644 --- a/modules/mono/doc_classes/GodotSharp.xml +++ b/modules/mono/doc_classes/GodotSharp.xml @@ -11,66 +11,55 @@ - - + Attaches the current thread to the Mono runtime. - - + Detaches the current thread from the Mono runtime. - - + Returns the current MonoDomain ID. [b]Note:[/b] The Mono runtime must be initialized for this method to work (use [method is_runtime_initialized] to check). If the Mono runtime isn't initialized at the time this method is called, the engine will crash. - - + Returns the scripts MonoDomain's ID. This will be the same MonoDomain ID as [method get_domain_id], unless the scripts domain isn't loaded. [b]Note:[/b] The Mono runtime must be initialized for this method to work (use [method is_runtime_initialized] to check). If the Mono runtime isn't initialized at the time this method is called, the engine will crash. - - - - + + Returns [code]true[/code] if the domain is being finalized, [code]false[/code] otherwise. - - + Returns [code]true[/code] if the Mono runtime is initialized, [code]false[/code] otherwise. - - + Returns [code]true[/code] if the Mono runtime is shutting down, [code]false[/code] otherwise. - - + Returns [code]true[/code] if the scripts domain is loaded, [code]false[/code] otherwise. - - -- cgit v1.2.3