Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 38 additions & 4 deletions .yamato/_run-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@ run_all_project_tests_desktop_standalone:
{% for platform in test_platforms.desktop -%}
{% for editor in validation_editors.all -%}
{% for backend in scripting_backends -%}
{% assign supported = true -%}
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if supported -%}
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand All @@ -156,10 +161,16 @@ run_all_project_tests_desktop_standalone:
run_all_project_tests_desktop_standalone_{{ validation_editors.latest }}:
name: Run All Standalone Tests - Desktop [{{ validation_editors.latest }} only]
dependencies:
{% assign editor = validation_editors.latest.first -%}
{% for project in projects.default -%}
{% for platform in test_platforms.desktop -%}
{% for backend in scripting_backends -%}
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ validation_editors.latest }}
{% assign supported = true -%}
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if supported -%}
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand All @@ -168,10 +179,16 @@ run_all_project_tests_desktop_standalone_{{ validation_editors.latest }}:
run_all_project_tests_desktop_standalone_{{ validation_editors.minimal }}:
name: Run All Standalone Tests - Desktop [{{ validation_editors.minimal }}]
dependencies:
{% assign editor = validation_editors.minimal.first -%}
{% for project in projects.default -%}
{% for platform in test_platforms.desktop -%}
{% for backend in scripting_backends -%}
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ validation_editors.minimal }}
{% assign supported = true -%}
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if supported -%}
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand Down Expand Up @@ -253,7 +270,12 @@ run_all_project_tests_cmb_service:
{% for platform in test_platforms.default -%}
{% for editor in validation_editors.all -%}
{% for backend in scripting_backends -%}
{% assign supported = true -%}
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if supported -%}
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand All @@ -263,10 +285,16 @@ run_all_project_tests_cmb_service:
run_all_project_tests_cmb_service_{{ validation_editors.latest }}:
name: Run All CMB Service Tests [{{ validation_editors.latest }} only]
dependencies:
{% assign editor = validation_editors.latest.first -%}
{% for project in projects.default -%}
{% for platform in test_platforms.default -%}
{% for backend in scripting_backends -%}
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ validation_editors.latest }}
{% assign supported = true -%}
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if supported -%}
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand All @@ -275,10 +303,16 @@ run_all_project_tests_cmb_service_{{ validation_editors.latest }}:
run_all_project_tests_cmb_service_{{ validation_editors.minimal }}:
name: Run All CMB Service Tests [{{ validation_editors.minimal }}]
dependencies:
{% assign editor = validation_editors.minimal.first -%}
{% for project in projects.default -%}
{% for platform in test_platforms.default -%}
{% for backend in scripting_backends -%}
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ validation_editors.minimal }}
{% assign supported = true -%}
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if supported -%}
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
105 changes: 53 additions & 52 deletions .yamato/api-updater-test.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,53 @@
{% metadata_file .yamato/project.metafile %}
---

# DESCRIPTION--------------------------------------------------------------------------
# This job validates the NGO 2.x -> 3.x upgrade path for user scripts.
# NGO 3.0 renamed the editor assembly and its namespaces (Unity.Netcode.Editor ->
# Unity.Netcode.GameObjects.Editor) and moved the runtime timing types (Unity.Netcode.NetworkTime
# and friends -> Unity.Netcode.GameObjects.Timing), and every relocated public type carries a
# [MovedFrom] so that Unity's API updater rewrites a 2.x project's scripts automatically on upgrade.
# apiupdaterproject holds code written against the 2.x API; the job imports it with
# -accept-apiupdate and asserts that every 2.x type reference was rewritten and none survived.
# See apiupdaterproject/README.md.
#
# The second run adds an assembly that occupies Unity.Netcode.NetworkTimeSystem, standing in for
# any second installed package that declares the same name, and inverts the expectation for that
# one name: the updater is driven by resolution failure, so a name that still resolves cannot be
# migrated. NetworkTime and NetworkTickSystem are absent from the stub and must still migrate, so
# a pass proves both halves.
# This is the regression test for why the timing types were moved at all.


# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
# apiupdaterproject/Packages/manifest.json references the package by relative path
# (file:../../com.unity.netcode.gameobjects), so the job tests the package as it sits in the repo
# and needs no package-pack dependency.
# The script restores the 2.x sources when it finishes, so the checkout is left unmodified and the
# job is safe to re-run on the same agent.
# --clean purges Library first: the assertion is meaningless against a warm Library that already
# holds rewritten sources from a previous run. That is also why the two runs are sequential
# commands rather than one - each needs its own cold import, and the script removes the stub and
# restores the sources on every exit path, so the second run starts from the same state as the first.

{% for platform in test_platforms.default -%}
{% for editor in validation_editors.default -%}
api_updater_test_{{ platform.name }}_{{ editor }}:
name : API Updater Test - NGO 2.x editor scripts upgrade [{{ platform.name }}, {{ editor }}]
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor }}
commands:
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for the import
- python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean
- python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean --collision-stub
artifacts:
logs:
paths:
- "apiupdaterproject/upgrade-test.log"
dependencies:
- .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors
{% endfor -%}
{% endfor -%}
{% metadata_file .yamato/project.metafile %}
---

# DESCRIPTION--------------------------------------------------------------------------
# This job validates the NGO 2.x -> 3.x upgrade path for user scripts.
# NGO 3.0 renamed the editor assembly and its namespaces (Unity.Netcode.Editor ->
# Unity.Netcode.GameObjects.Editor) and moved the runtime timing types (Unity.Netcode.NetworkTime
# and friends -> Unity.Netcode.GameObjects.Timing), and every relocated public type carries a
# [MovedFrom] so that Unity's API updater rewrites a 2.x project's scripts automatically on upgrade.
# apiupdaterproject holds code written against the 2.x API; the job imports it with
# -accept-apiupdate and asserts that every 2.x type reference was rewritten and none survived.
# See apiupdaterproject/README.md.
#
# The second run adds an assembly that occupies Unity.Netcode.NetworkTimeSystem, standing in for
# any second installed package that declares the same name, and inverts the expectation for that
# one name: the updater is driven by resolution failure, so a name that still resolves cannot be
# migrated. NetworkTime and NetworkTickSystem are absent from the stub and must still migrate, so
# a pass proves both halves.

# This is the regression test for why the timing types were moved at all.


# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
# apiupdaterproject/Packages/manifest.json references the package by relative path
# (file:../../com.unity.netcode.gameobjects), so the job tests the package as it sits in the repo
# and needs no package-pack dependency.
# The script restores the 2.x sources when it finishes, so the checkout is left unmodified and the
# job is safe to re-run on the same agent.
# --clean purges Library first: the assertion is meaningless against a warm Library that already
# holds rewritten sources from a previous run. That is also why the two runs are sequential
# commands rather than one - each needs its own cold import, and the script removes the stub and
# restores the sources on every exit path, so the second run starts from the same state as the first.

{% for platform in test_platforms.default -%}
{% for editor in validation_editors.default -%}
api_updater_test_{{ platform.name }}_{{ editor }}:
name : API Updater Test - NGO 2.x editor scripts upgrade [{{ platform.name }}, {{ editor }}]
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor }}
commands:
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor --arch {{ platform.architecture }}
- python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean
- python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean --collision-stub
artifacts:
logs:
paths:
- "apiupdaterproject/upgrade-test.log"
dependencies:
- .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors
{% endfor -%}
{% endfor -%}
11 changes: 8 additions & 3 deletions .yamato/cmb-service-standalone-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# 1. For all desktop platform (Windows, macOS, Ubuntu)
# 2. For all supported Unity Editor versions (for NGOv2.X this means 6000.0+ editors)
# 3. For the default project.
# 4. For all scripting backends (mono, il2cpp)
# 4. For all scripting backends (mono, il2cpp, coreclr), filtered per editor via mono_editors/coreclr_editors in project.metafile

# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
# For desktop devices a split is into two phases is not required but we use it for consistency with setup of others standalone platforms:
Expand All @@ -31,8 +31,12 @@
{% for platform in test_platforms.default -%}
{% for editor in validation_editors.all -%}
{% for backend in scripting_backends -%}
{% assign supported = true -%}
{% if backend == "mono" -%}{% unless mono_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if backend == "coreclr" -%}{% unless coreclr_editors contains editor %}{% assign supported = false %}{% endunless -%}{% endif -%}
{% if supported -%}
cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}:
name : CMB Service Test - NGO {{ project.name }} - [{{ platform.name }}, {{ editor }}, {{ backend }}]
name : CMB Service Test - NGO {{ project.name }} - [{{ platform.name }}, {{ platform.architecture }}, {{ editor }}, {{ backend }}]
agent:
type: {{ platform.type }}
image: {{ platform.image }}
Expand All @@ -56,14 +60,15 @@ cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}
# run_cmb_service.sh builds and starts a release version of the full CMB service (along with the limited echo server)
- ./Tools/CI/service.cmb/run_cmb_service.sh -e $ECHO_SERVER_PORT -s $CMB_SERVICE_PORT -l artifacts

- 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
- 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 }}
- 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 }}
artifacts:
logs:
paths:
- "test-results/**/*"
dependencies:
- .yamato/desktop-standalone-tests.yml#desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
Expand Down
4 changes: 2 additions & 2 deletions .yamato/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{% for platform in test_platforms.default -%}
{% for project in projects.default -%}
code_coverage_project_test_{{ project.name }}_{{ platform.name }}_{{ validation_editors.default }}:
name: '[Code Coverage] Project Test - NGO {{ project.name }} [{{ platform.name }}, {{ validation_editors.default }}]'
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 %}]'
agent:
type: {{ platform.type }}
image: {{ platform.image }}
Expand All @@ -36,7 +36,7 @@ code_coverage_project_test_{{ project.name }}_{{ platform.name }}_{{ validation_
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
{% endif %}
commands:
- unity-downloader-cli --fast --wait -u {{ validation_editors.default }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models
- unity-downloader-cli --fast --wait -u {{ validation_editors.default }} -c Editor --arch {{ platform.architecture }}
- 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
artifacts:
logs:
Expand Down
4 changes: 2 additions & 2 deletions .yamato/console-standalone-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
{% endif %}
commands:
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --arch {{ platform.architecture }}
- 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}}
variables:
# PS4 related
Expand Down Expand Up @@ -88,7 +88,7 @@ console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
{% endif %}
commands:
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --arch {{ platform.architecture }}
- 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 }}
variables:
# PS4 related
Expand Down
Loading
Loading