Skip to content

Commit 6fbe8b5

Browse files
ci: Add proper CoreCLR support, remove Mono from trunk and update architecture setup in CI (#4177)
* Updated NetcodeConfig in minimalproject * Updated CI configuration with architecture and coreclr players * comment cleanup * editor update for upm-ci * Update .yamato/project.metafile Co-authored-by: u-pr[bot] <205906871+u-pr[bot]@users.noreply.github.com> * Updated pinned trunk so coreclr is the default --------- Co-authored-by: u-pr[bot] <205906871+u-pr[bot]@users.noreply.github.com>
1 parent 2749dbb commit 6fbe8b5

16 files changed

Lines changed: 190 additions & 92 deletions

‎.yamato/_run-all.yml‎

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,13 @@ run_all_project_tests_desktop_standalone:
145145
{% for platform in test_platforms.desktop -%}
146146
{% for editor in validation_editors.all -%}
147147
{% for backend in scripting_backends -%}
148+
{% assign supported = true -%}
149+
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
150+
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
151+
{% if backend == "coreclr" -%}{% unless platform.coreclr_component or coreclr_runtime_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
152+
{% if supported -%}
148153
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
154+
{% endif -%}
149155
{% endfor -%}
150156
{% endfor -%}
151157
{% endfor -%}
@@ -156,10 +162,17 @@ run_all_project_tests_desktop_standalone:
156162
run_all_project_tests_desktop_standalone_{{ validation_editors.latest }}:
157163
name: Run All Standalone Tests - Desktop [{{ validation_editors.latest }} only]
158164
dependencies:
165+
{% assign editor = validation_editors.latest.first -%}
159166
{% for project in projects.default -%}
160167
{% for platform in test_platforms.desktop -%}
161168
{% for backend in scripting_backends -%}
162-
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ validation_editors.latest }}
169+
{% assign supported = true -%}
170+
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
171+
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
172+
{% if backend == "coreclr" -%}{% unless platform.coreclr_component or coreclr_runtime_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
173+
{% if supported -%}
174+
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
175+
{% endif -%}
163176
{% endfor -%}
164177
{% endfor -%}
165178
{% endfor -%}
@@ -168,10 +181,17 @@ run_all_project_tests_desktop_standalone_{{ validation_editors.latest }}:
168181
run_all_project_tests_desktop_standalone_{{ validation_editors.minimal }}:
169182
name: Run All Standalone Tests - Desktop [{{ validation_editors.minimal }}]
170183
dependencies:
184+
{% assign editor = validation_editors.minimal.first -%}
171185
{% for project in projects.default -%}
172186
{% for platform in test_platforms.desktop -%}
173187
{% for backend in scripting_backends -%}
174-
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ validation_editors.minimal }}
188+
{% assign supported = true -%}
189+
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
190+
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
191+
{% if backend == "coreclr" -%}{% unless platform.coreclr_component or coreclr_runtime_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
192+
{% if supported -%}
193+
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
194+
{% endif -%}
175195
{% endfor -%}
176196
{% endfor -%}
177197
{% endfor -%}
@@ -253,7 +273,13 @@ run_all_project_tests_cmb_service:
253273
{% for platform in test_platforms.default -%}
254274
{% for editor in validation_editors.all -%}
255275
{% for backend in scripting_backends -%}
276+
{% assign supported = true -%}
277+
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
278+
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
279+
{% if backend == "coreclr" -%}{% unless platform.coreclr_component or coreclr_runtime_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
280+
{% if supported -%}
256281
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
282+
{% endif -%}
257283
{% endfor -%}
258284
{% endfor -%}
259285
{% endfor -%}
@@ -263,10 +289,17 @@ run_all_project_tests_cmb_service:
263289
run_all_project_tests_cmb_service_{{ validation_editors.latest }}:
264290
name: Run All CMB Service Tests [{{ validation_editors.latest }} only]
265291
dependencies:
292+
{% assign editor = validation_editors.latest.first -%}
266293
{% for project in projects.default -%}
267294
{% for platform in test_platforms.default -%}
268295
{% for backend in scripting_backends -%}
269-
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ validation_editors.latest }}
296+
{% assign supported = true -%}
297+
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
298+
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
299+
{% if backend == "coreclr" -%}{% unless platform.coreclr_component or coreclr_runtime_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
300+
{% if supported -%}
301+
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
302+
{% endif -%}
270303
{% endfor -%}
271304
{% endfor -%}
272305
{% endfor -%}
@@ -275,10 +308,17 @@ run_all_project_tests_cmb_service_{{ validation_editors.latest }}:
275308
run_all_project_tests_cmb_service_{{ validation_editors.minimal }}:
276309
name: Run All CMB Service Tests [{{ validation_editors.minimal }}]
277310
dependencies:
311+
{% assign editor = validation_editors.minimal.first -%}
278312
{% for project in projects.default -%}
279313
{% for platform in test_platforms.default -%}
280314
{% for backend in scripting_backends -%}
281-
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ validation_editors.minimal }}
315+
{% assign supported = true -%}
316+
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
317+
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
318+
{% if backend == "coreclr" -%}{% unless platform.coreclr_component or coreclr_runtime_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
319+
{% if supported -%}
320+
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
321+
{% endif -%}
282322
{% endfor -%}
283323
{% endfor -%}
284324
{% endfor -%}

‎.yamato/api-updater-test.yml‎

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,53 @@
1-
{% metadata_file .yamato/project.metafile %}
2-
---
3-
4-
# DESCRIPTION--------------------------------------------------------------------------
5-
# This job validates the NGO 2.x -> 3.x upgrade path for user scripts.
6-
# NGO 3.0 renamed the editor assembly and its namespaces (Unity.Netcode.Editor ->
7-
# Unity.Netcode.GameObjects.Editor) and moved the runtime timing types (Unity.Netcode.NetworkTime
8-
# and friends -> Unity.Netcode.GameObjects.Timing), and every relocated public type carries a
9-
# [MovedFrom] so that Unity's API updater rewrites a 2.x project's scripts automatically on upgrade.
10-
# apiupdaterproject holds code written against the 2.x API; the job imports it with
11-
# -accept-apiupdate and asserts that every 2.x type reference was rewritten and none survived.
12-
# See apiupdaterproject/README.md.
13-
#
14-
# The second run adds an assembly that occupies Unity.Netcode.NetworkTimeSystem, standing in for
15-
# any second installed package that declares the same name, and inverts the expectation for that
16-
# one name: the updater is driven by resolution failure, so a name that still resolves cannot be
17-
# migrated. NetworkTime and NetworkTickSystem are absent from the stub and must still migrate, so
18-
# a pass proves both halves.
19-
# This is the regression test for why the timing types were moved at all.
20-
21-
22-
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
23-
# apiupdaterproject/Packages/manifest.json references the package by relative path
24-
# (file:../../com.unity.netcode.gameobjects), so the job tests the package as it sits in the repo
25-
# and needs no package-pack dependency.
26-
# The script restores the 2.x sources when it finishes, so the checkout is left unmodified and the
27-
# job is safe to re-run on the same agent.
28-
# --clean purges Library first: the assertion is meaningless against a warm Library that already
29-
# holds rewritten sources from a previous run. That is also why the two runs are sequential
30-
# commands rather than one - each needs its own cold import, and the script removes the stub and
31-
# restores the sources on every exit path, so the second run starts from the same state as the first.
32-
33-
{% for platform in test_platforms.default -%}
34-
{% for editor in validation_editors.default -%}
35-
api_updater_test_{{ platform.name }}_{{ editor }}:
36-
name : API Updater Test - NGO 2.x editor scripts upgrade [{{ platform.name }}, {{ editor }}]
37-
agent:
38-
type: {{ platform.type }}
39-
image: {{ platform.image }}
40-
flavor: {{ platform.flavor }}
41-
commands:
42-
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for the import
43-
- python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean
44-
- python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean --collision-stub
45-
artifacts:
46-
logs:
47-
paths:
48-
- "apiupdaterproject/upgrade-test.log"
49-
dependencies:
50-
- .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors
51-
{% endfor -%}
52-
{% endfor -%}
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
4+
# DESCRIPTION--------------------------------------------------------------------------
5+
# This job validates the NGO 2.x -> 3.x upgrade path for user scripts.
6+
# NGO 3.0 renamed the editor assembly and its namespaces (Unity.Netcode.Editor ->
7+
# Unity.Netcode.GameObjects.Editor) and moved the runtime timing types (Unity.Netcode.NetworkTime
8+
# and friends -> Unity.Netcode.GameObjects.Timing), and every relocated public type carries a
9+
# [MovedFrom] so that Unity's API updater rewrites a 2.x project's scripts automatically on upgrade.
10+
# apiupdaterproject holds code written against the 2.x API; the job imports it with
11+
# -accept-apiupdate and asserts that every 2.x type reference was rewritten and none survived.
12+
# See apiupdaterproject/README.md.
13+
#
14+
# The second run adds an assembly that occupies Unity.Netcode.NetworkTimeSystem, standing in for
15+
# any second installed package that declares the same name, and inverts the expectation for that
16+
# one name: the updater is driven by resolution failure, so a name that still resolves cannot be
17+
# migrated. NetworkTime and NetworkTickSystem are absent from the stub and must still migrate, so
18+
# a pass proves both halves.
19+
20+
# This is the regression test for why the timing types were moved at all.
21+
22+
23+
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
24+
# apiupdaterproject/Packages/manifest.json references the package by relative path
25+
# (file:../../com.unity.netcode.gameobjects), so the job tests the package as it sits in the repo
26+
# and needs no package-pack dependency.
27+
# The script restores the 2.x sources when it finishes, so the checkout is left unmodified and the
28+
# job is safe to re-run on the same agent.
29+
# --clean purges Library first: the assertion is meaningless against a warm Library that already
30+
# holds rewritten sources from a previous run. That is also why the two runs are sequential
31+
# commands rather than one - each needs its own cold import, and the script removes the stub and
32+
# restores the sources on every exit path, so the second run starts from the same state as the first.
33+
34+
{% for platform in test_platforms.default -%}
35+
{% for editor in validation_editors.default -%}
36+
api_updater_test_{{ platform.name }}_{{ editor }}:
37+
name : API Updater Test - NGO 2.x editor scripts upgrade [{{ platform.name }}, {{ editor }}]
38+
agent:
39+
type: {{ platform.type }}
40+
image: {{ platform.image }}
41+
flavor: {{ platform.flavor }}
42+
commands:
43+
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor --arch {{ platform.architecture }}
44+
- python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean
45+
- python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean --collision-stub
46+
artifacts:
47+
logs:
48+
paths:
49+
- "apiupdaterproject/upgrade-test.log"
50+
dependencies:
51+
- .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors
52+
{% endfor -%}
53+
{% endfor -%}

‎.yamato/cmb-service-standalone-tests.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# 1. For all desktop platform (Windows, macOS, Ubuntu)
1414
# 2. For all supported Unity Editor versions (for NGOv2.X this means 6000.0+ editors)
1515
# 3. For the default project.
16-
# 4. For all scripting backends (mono, il2cpp)
16+
# 4. For all scripting backends (mono, il2cpp, coreclr), filtered per editor via mono_editors/coreclr_editors in project.metafile
1717

1818
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
1919
# For desktop devices a split is into two phases is not required but we use it for consistency with setup of others standalone platforms:
@@ -31,8 +31,13 @@
3131
{% for platform in test_platforms.default -%}
3232
{% for editor in validation_editors.all -%}
3333
{% for backend in scripting_backends -%}
34+
{% assign supported = true -%}
35+
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
36+
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
37+
{% if backend == "coreclr" -%}{% unless platform.coreclr_component or coreclr_runtime_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
38+
{% if supported -%}
3439
cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}:
35-
name : CMB Service Test - NGO {{ project.name }} - [{{ platform.name }}, {{ editor }}, {{ backend }}]
40+
name : CMB Service Test - NGO {{ project.name }} - [{{ platform.name }}, {{ platform.architecture }}, {{ editor }}, {{ backend }}]
3641
agent:
3742
type: {{ platform.type }}
3843
image: {{ platform.image }}
@@ -56,14 +61,15 @@ cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}
5661
# run_cmb_service.sh builds and starts a release version of the full CMB service (along with the limited echo server)
5762
- ./Tools/CI/service.cmb/run_cmb_service.sh -e $ECHO_SERVER_PORT -s $CMB_SERVICE_PORT -l artifacts
5863

59-
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models
64+
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %}{% if backend == "coreclr" %}{% unless coreclr_runtime_editors contains editor %} -c {{ platform.coreclr_component }} {% endunless %}{% endif %} --arch {{ platform.architecture }}
6065
- UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --timeout={{ test_timeout }}
6166
artifacts:
6267
logs:
6368
paths:
6469
- "test-results/**/*"
6570
dependencies:
6671
- .yamato/desktop-standalone-tests.yml#desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
72+
{% endif -%}
6773
{% endfor -%}
6874
{% endfor -%}
6975
{% endfor -%}

‎.yamato/code-coverage.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
{% for platform in test_platforms.default -%}
2828
{% for project in projects.default -%}
2929
code_coverage_project_test_{{ project.name }}_{{ platform.name }}_{{ validation_editors.default }}:
30-
name: '[Code Coverage] Project Test - NGO {{ project.name }} [{{ platform.name }}, {{ validation_editors.default }}]'
30+
name: '[Code Coverage] Project Test - NGO {{ project.name }} [{{ platform.name }}, {{ platform.architecture }}, {{ validation_editors.default }}, {% if coreclr_runtime_editors contains validation_editors.default.first %}coreclr{% else %}mono{% endif %}]'
3131
agent:
3232
type: {{ platform.type }}
3333
image: {{ platform.image }}
@@ -36,7 +36,7 @@ code_coverage_project_test_{{ project.name }}_{{ platform.name }}_{{ validation_
3636
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
3737
{% endif %}
3838
commands:
39-
- unity-downloader-cli --fast --wait -u {{ validation_editors.default }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models
39+
- unity-downloader-cli --fast --wait -u {{ validation_editors.default }} -c Editor --arch {{ platform.architecture }}
4040
- UnifiedTestRunner --testproject={{ project.path }} --suite=editor --suite=playmode --editor-location=.Editor --enable-code-coverage --coverage-upload-options="reportsDir:$PWD/test-results/CoverageResults;name:NGOv2_project_{{ project.name }}_{{ platform.name }};flags:NGOv2_project_{{ project.name }}_{{ platform.name }};verbose" --coverage-results-path=$PWD/test-results/CoverageResults --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout={{ test_timeout }} --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --artifacts-path=test-results
4141
artifacts:
4242
logs:

‎.yamato/console-standalone-test.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
4949
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
5050
{% endif %}
5151
commands:
52-
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
52+
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --arch {{ platform.architecture }}
5353
- UnifiedTestRunner --testproject={{ project.path }} --architecture={% if platform.name == "switch" %}arm64{% else %}x64{% endif %} --scripting-backend=il2cpp --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --artifacts-path=artifacts --player-save-path=build/players --testfilter="Unity.Netcode.RuntimeTests.*" --extra-editor-arg=-batchmode --extra-editor-arg=-nographics{% if platform.name == "switch" %} --extra-editor-arg=-overrideTextureCompression --extra-editor-arg=ForceUncompressed{% endif %} --reruncount=1 --clean-library-on-rerun --build-only --timeout={{ test_timeout}}
5454
variables:
5555
# PS4 related
@@ -88,7 +88,7 @@ console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
8888
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
8989
{% endif %}
9090
commands:
91-
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
91+
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --arch {{ platform.architecture }}
9292
- UnifiedTestRunner --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --timeout={{ test_timeout }}
9393
variables:
9494
# PS4 related

0 commit comments

Comments
 (0)