Enable mono editor build in CI

This commit is contained in:
qarmin 2021-10-01 08:14:54 +02:00
parent 38c698c485
commit 071829acc5
5 changed files with 34 additions and 33 deletions

View File

@ -18,13 +18,15 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- name: Editor (target=release_debug, tools=yes, tests=yes) - name: Editor w/ Mono (target=release_debug, tools=yes, tests=yes)
cache-name: linux-editor cache-name: linux-editor-mono
target: release_debug target: release_debug
tools: true 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 doc-test: true
bin: "./bin/godot.linuxbsd.opt.tools.64" bin: "./bin/godot.linuxbsd.opt.tools.64.mono"
build-mono: true
artifact: true artifact: true
- name: Editor and sanitizers (target=debug, tools=yes, tests=yes, use_asan=yes, use_ubsan=yes) - name: Editor and sanitizers (target=debug, tools=yes, tests=yes, use_asan=yes, use_ubsan=yes)
@ -36,6 +38,7 @@ jobs:
proj-test: true proj-test: true
godot-cpp-test: true godot-cpp-test: true
bin: "./bin/godot.linuxbsd.tools.64s" bin: "./bin/godot.linuxbsd.tools.64s"
build-mono: false
# Skip 2GiB artifact speeding up action. # Skip 2GiB artifact speeding up action.
artifact: false artifact: false
@ -45,6 +48,7 @@ jobs:
tools: false tools: false
tests: false tests: false
sconsflags: module_mono_enabled=yes mono_glue=no debug_symbols=no sconsflags: module_mono_enabled=yes mono_glue=no debug_symbols=no
build-mono: false
artifact: true artifact: true
steps: steps:
@ -80,11 +84,26 @@ jobs:
tools: ${{ matrix.tools }} tools: ${{ matrix.tools }}
tests: ${{ matrix.tests }} 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 # Execute unit tests for the editor
- name: Unit tests - name: Unit tests
if: ${{ matrix.tests }} if: ${{ matrix.tests }}
run: | run: |
${{ matrix.bin }} --test ${{ matrix.bin }} --test --headless
# Check class reference # Check class reference
- name: Check for class reference updates - name: Check for class reference updates

View File

@ -1315,8 +1315,6 @@
</member> </member>
<member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false"> <member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false">
</member> </member>
<member name="mono/project/auto_update_project" type="bool" setter="" getter="" default="true">
</member>
<member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0"> <member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0">
</member> </member>
<member name="navigation/2d/default_cell_size" type="int" setter="" getter="" default="10"> <member name="navigation/2d/default_cell_size" type="int" setter="" getter="" default="10">

View File

@ -2051,8 +2051,6 @@ bool Main::start() {
GLOBAL_DEF("mono/profiler/args", "log:calls,alloc,sample,output=output.mlpd"); GLOBAL_DEF("mono/profiler/args", "log:calls,alloc,sample,output=output.mlpd");
GLOBAL_DEF("mono/profiler/enabled", false); GLOBAL_DEF("mono/profiler/enabled", false);
GLOBAL_DEF("mono/unhandled_exception_policy", 0); GLOBAL_DEF("mono/unhandled_exception_policy", 0);
// From editor/csharp_project.cpp.
GLOBAL_DEF("mono/project/auto_update_project", true);
#endif #endif
DocTools doc; DocTools doc;

View File

@ -12,13 +12,10 @@
</tutorials> </tutorials>
<methods> <methods>
<method name="new" qualifiers="vararg"> <method name="new" qualifiers="vararg">
<return type="Variant"> <return type="Variant" />
</return>
<description> <description>
Returns a new instance of the script. Returns a new instance of the script.
</description> </description>
</method> </method>
</methods> </methods>
<constants>
</constants>
</class> </class>

View File

@ -11,66 +11,55 @@
</tutorials> </tutorials>
<methods> <methods>
<method name="attach_thread"> <method name="attach_thread">
<return type="void"> <return type="void" />
</return>
<description> <description>
Attaches the current thread to the Mono runtime. Attaches the current thread to the Mono runtime.
</description> </description>
</method> </method>
<method name="detach_thread"> <method name="detach_thread">
<return type="void"> <return type="void" />
</return>
<description> <description>
Detaches the current thread from the Mono runtime. Detaches the current thread from the Mono runtime.
</description> </description>
</method> </method>
<method name="get_domain_id"> <method name="get_domain_id">
<return type="int"> <return type="int" />
</return>
<description> <description>
Returns the current MonoDomain ID. 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. [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.
</description> </description>
</method> </method>
<method name="get_scripts_domain_id"> <method name="get_scripts_domain_id">
<return type="int"> <return type="int" />
</return>
<description> <description>
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. 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. [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.
</description> </description>
</method> </method>
<method name="is_domain_finalizing_for_unload"> <method name="is_domain_finalizing_for_unload">
<return type="bool"> <return type="bool" />
</return> <argument index="0" name="domain_id" type="int" />
<argument index="0" name="domain_id" type="int">
</argument>
<description> <description>
Returns [code]true[/code] if the domain is being finalized, [code]false[/code] otherwise. Returns [code]true[/code] if the domain is being finalized, [code]false[/code] otherwise.
</description> </description>
</method> </method>
<method name="is_runtime_initialized"> <method name="is_runtime_initialized">
<return type="bool"> <return type="bool" />
</return>
<description> <description>
Returns [code]true[/code] if the Mono runtime is initialized, [code]false[/code] otherwise. Returns [code]true[/code] if the Mono runtime is initialized, [code]false[/code] otherwise.
</description> </description>
</method> </method>
<method name="is_runtime_shutting_down"> <method name="is_runtime_shutting_down">
<return type="bool"> <return type="bool" />
</return>
<description> <description>
Returns [code]true[/code] if the Mono runtime is shutting down, [code]false[/code] otherwise. Returns [code]true[/code] if the Mono runtime is shutting down, [code]false[/code] otherwise.
</description> </description>
</method> </method>
<method name="is_scripts_domain_loaded"> <method name="is_scripts_domain_loaded">
<return type="bool"> <return type="bool" />
</return>
<description> <description>
Returns [code]true[/code] if the scripts domain is loaded, [code]false[/code] otherwise. Returns [code]true[/code] if the scripts domain is loaded, [code]false[/code] otherwise.
</description> </description>
</method> </method>
</methods> </methods>
<constants>
</constants>
</class> </class>