From 6380fed2481865ef950756ed6e530a81bf0ce6c2 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 27 Feb 2025 14:25:15 +0100 Subject: [PATCH 01/53] Removed 2023 editor since it is not supported --- .yamato/_run-all.yml | 3 --- .yamato/console-standalone-test.yml | 6 ------ .yamato/project.metafile | 1 - 3 files changed, 10 deletions(-) diff --git a/.yamato/_run-all.yml b/.yamato/_run-all.yml index 011a93208d..38927a075e 100644 --- a/.yamato/_run-all.yml +++ b/.yamato/_run-all.yml @@ -218,10 +218,7 @@ run_all_project_tests_console_standalone: {% for project in projects.default -%} {% for platform in test_platforms.console_test -%} {% for editor in validation_editors.all -%} -# When building consoles with 2023 editor there are errors related to SDK version or uninstalled components. I will disable those for now and will add to my investigation list -{% if editor != "2023.3" %} - .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }} -{% endif -%} {% endfor -%} {% endfor -%} {% endfor -%} diff --git a/.yamato/console-standalone-test.yml b/.yamato/console-standalone-test.yml index 09723ab7fb..2d5ca4861e 100644 --- a/.yamato/console-standalone-test.yml +++ b/.yamato/console-standalone-test.yml @@ -15,8 +15,6 @@ {% for project in projects.default -%} {% for platform in test_platforms.console_build -%} {% for editor in validation_editors.all -%} -# When building consoles with 2023 editor there are errors related to SDK version or uninstalled components. I will disable those for now and will add to my investigation list -{% if editor != "2023.3" %} build_{{ project.name }}_{{ platform.name }}_{{ editor }}: name: Build {{ project.name }} - [{{ platform.name }}, {{ editor }}, il2cpp{% if platform.name == "switch" %}, arm64{% endif %}] agent: @@ -49,7 +47,6 @@ build_{{ project.name }}_{{ platform.name }}_{{ editor }}: logs: paths: - "artifacts/**/*" -{% endif -%} {% endfor -%} {% endfor -%} {% endfor -%} @@ -60,8 +57,6 @@ build_{{ project.name }}_{{ platform.name }}_{{ editor }}: {% for project in projects.default -%} {% for platform in test_platforms.console_test -%} {% for editor in validation_editors.all -%} -# When building consoles with 2023 editor there are errors related to SDK version or uninstalled components. I will disable those for now and will add to my investigation list -{% if editor != "2023.3" %} run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}: name: Run {{ project.name }} Tests - [{{ platform.name }}, {{ editor }}, il2cpp] agent: @@ -96,7 +91,6 @@ run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}: - "test-results/**/*" dependencies: - .yamato/console-standalone-test.yml#build_{{ project.name }}_{{ platform.name }}_{{ editor }} -{% endif -%} {% endfor -%} {% endfor -%} {% endfor -%} \ No newline at end of file diff --git a/.yamato/project.metafile b/.yamato/project.metafile index e924f8426c..960e48835e 100644 --- a/.yamato/project.metafile +++ b/.yamato/project.metafile @@ -130,7 +130,6 @@ validation_editors: all: - 2021.3 - 2022.3 - - 2023.3 - 6000.0 - 6000.1 - trunk From b1dca7f73d968f3c8c992c0a9cfd8043f1a5fdcd Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 27 Feb 2025 15:06:36 +0100 Subject: [PATCH 02/53] Disabled timeout of WhenManyObjectsAreSpawnedAtOnce_AllAreReceived to see the failure --- .../Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs index 4ed1f816fc..66b2b7b0f6 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs @@ -48,7 +48,7 @@ protected override void OnServerAndClientsCreated() [UnityTest] // When this test fails it does so without an exception and will wait the default ~6 minutes - [Timeout(360000)] // Tracked in MTT-11360 + // [Timeout(360000)] // Tracked in MTT-11360 public IEnumerator WhenManyObjectsAreSpawnedAtOnce_AllAreReceived() { for (int x = 0; x < k_SpawnedObjects; x++) From 1bd51ad38a68370d7323fb6f1d93529cbde19bc0 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 27 Feb 2025 15:24:16 +0100 Subject: [PATCH 03/53] Added libssl install for ubuntu with 2021 editor configuration and got rid of utr install since it is preinstalled on the images --- .yamato/_run-all.yml | 12 ------- .yamato/console-standalone-test.yml | 6 ++-- .yamato/desktop-standalone-tests.yml | 48 ++++------------------------ .yamato/mobile-standalone-test.yml | 15 ++------- .yamato/package-tests.yml | 9 +----- .yamato/performance-tests.yml | 15 ++------- .yamato/webgl-build.yml | 15 +-------- 7 files changed, 16 insertions(+), 104 deletions(-) diff --git a/.yamato/_run-all.yml b/.yamato/_run-all.yml index 38927a075e..7c37aa7179 100644 --- a/.yamato/_run-all.yml +++ b/.yamato/_run-all.yml @@ -130,13 +130,7 @@ run_all_project_tests_desktop_standalone: {% for platform in test_platforms.desktop -%} {% for editor in validation_editors.all -%} {% for backend in scripting_backends -%} -# There is an error 'No usable version of libssl' when it comes to building with combination of ubuntu and 2021 editor. It's not really worth to address it since -# 1) The 2021 editor will soon be out of support -# 2) We still have the same coverage by using mac and ubuntu is used in a whole bunch of different tests, so I'm quite sure it won't lead to any bug leaks -# 3) The solution could be to manually install libss1.1 (since image has libssl3 and this causes conflicts on 2021 editor related to dotnet versions and support). There were several threads on this topic which can be looked on -{% if editor != "2021.3" or platform.name != "ubuntu" %} - .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }} -{% endif -%} {% endfor -%} {% endfor -%} {% endfor -%} @@ -164,13 +158,7 @@ run_all_project_tests_desktop_standalone_2021: {% for project in projects.default -%} {% for platform in test_platforms.desktop -%} {% for backend in scripting_backends -%} -# There is an error 'No usable version of libssl' when it comes to building with combination of ubuntu and 2021 editor. It's not really worth to address it since -# 1) The 2021 editor will soon be out of support -# 2) We still have the same coverage by using mac and ubuntu is used in a whole bunch of different tests, so I'm quite sure it won't lead to any bug leaks -# 3) The solution could be to manually install libss1.1 (since image has libssl3 and this causes conflicts on 2021 editor related to dotnet versions and support). There were several threads on this topic which can be looked on -{% if platform.name != "ubuntu" %} - .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_2021.3 -{% endif -%} {% endfor -%} {% endfor -%} {% endfor -%} diff --git a/.yamato/console-standalone-test.yml b/.yamato/console-standalone-test.yml index 2d5ca4861e..4ab96d8273 100644 --- a/.yamato/console-standalone-test.yml +++ b/.yamato/console-standalone-test.yml @@ -25,10 +25,9 @@ build_{{ project.name }}_{{ platform.name }}_{{ editor }}: # Installing tools. unity-downloader-cli and utr should be already preinstalled on the image - sudo pip install unity-downloader-cli - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --fast --wait - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat # Platform specific Build - - utr --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 --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 + - 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 --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 variables: # PS4 related @@ -70,10 +69,9 @@ run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}: # Installing tools. - sudo pip install unity-downloader-cli - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --fast --wait - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat # Platform specific Execution - - utr --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 + - UnifiedTestRunner --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 variables: # PS4 related diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index eceff41b3c..2a62b07be8 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -13,11 +13,6 @@ {% for platform in test_platforms.desktop -%} {% for editor in validation_editors.all -%} {% for backend in scripting_backends -%} -# There is an error 'No usable version of libssl' when it comes to building with combination of ubuntu and 2021 editor. It's not really worth to address it since -# 1) The 2021 editor will soon be out of support -# 2) We still have the same coverage by using mac and ubuntu is used in a whole bunch of different tests, so I'm quite sure it won't lead to any bug leaks -# 3) The solution could be to manually install libss1.1 (since image has libssl3 and this causes conflicts on 2021 editor related to dotnet versions and support). There were several threads on this topic which can be looked on -{% if editor != "2021.3" or platform.name != "ubuntu" %} desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}: name : Standalone Build - NGO {{ project.name }} - [{{ platform.name }}, {{ editor }}, {{ backend }}] agent: @@ -33,24 +28,11 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple -# Platform specific UTR setup - - | -{% if platform.name == "win" %} - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat -{% else %} - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr -{% endif %} - # Installing editor - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --fast --wait # Build Player - - | -{% if platform.name == "win" %} - utr.bat --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 -{% else %} - ./utr --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 -{% endif %} + - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 artifacts: players: @@ -76,11 +58,6 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ {% for platform in test_platforms.desktop -%} {% for editor in validation_editors.all -%} {% for backend in scripting_backends -%} -# There is an error 'No usable version of libssl' when it comes to building with combination of ubuntu and 2021 editor. It's not really worth to address it since -# 1) The 2021 editor will soon be out of support -# 2) We still have the same coverage by using mac and ubuntu is used in a whole bunch of different tests, so I'm quite sure it won't lead to any bug leaks -# 3) The solution could be to manually install libss1.1 (since image has libssl3 and this causes conflicts on 2021 editor related to dotnet versions and support). There were several threads on this topic which can be looked on -{% if editor != "2021.3" or platform.name != "ubuntu" %} desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}: name : Standalone Test - NGO {{ project.name }} - [{{ platform.name }}, {{ editor }}, {{ backend }}] agent: @@ -88,24 +65,14 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ image: {{ platform.image }} flavor: {{ platform.flavor }} commands: -# Platform specific UTR setup - - | -{% if platform.name == "win" %} - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat -{% else %} - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr +{% if editor == "2021.3" or platform.name == "ubuntu" %} + - sudo apt-get install -y libssl1.1 # For this specific configuration there is a difference in what libssl version is installed on the image and what editor uses. This should be removed when 2021 editor is out of support {% endif %} - - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple + - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple # Installing unity downloader + - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --fast --wait # Installing appropriate Unity version for the test case. Important to note is the fact that even though we have a build we still need the editor to run tests - - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --fast --wait - -# Run Standalone tests - - | -{% if platform.name == "win" %} - utr.bat --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 -{% else %} - ./utr --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 -{% endif %} +# Running Standalone desktop tests + - UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 artifacts: logs: @@ -113,7 +80,6 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ - "test-results/**/*" dependencies: - .yamato/desktop-standalone-tests.yml#desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }} -{% endif %} {% endfor -%} {% endfor -%} {% endfor -%} diff --git a/.yamato/mobile-standalone-test.yml b/.yamato/mobile-standalone-test.yml index 2ca2444b86..3ee06212d4 100644 --- a/.yamato/mobile-standalone-test.yml +++ b/.yamato/mobile-standalone-test.yml @@ -28,14 +28,7 @@ build_{{ project.name }}_{{ platform.name }}_{{ editor }}: - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} --fast --wait # Platform specific Build -{% if platform.base == "win" %} - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat - - utr.bat --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 -{% else %} - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr - - chmod +x ./utr - - ./utr --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 -{% endif %} + - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 artifacts: players: paths: @@ -87,13 +80,11 @@ run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}: # Run tests - | set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP% - utr --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --editor-location=.Editor --player-connection-ip=%BOKKEN_HOST_IP% --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=3600 + UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --editor-location=.Editor --player-connection-ip=%BOKKEN_HOST_IP% --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=3600 {% else %} - # Download standalone UnityTestRunner - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr # Run tests - - ./utr --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --editor-location=.Editor --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=3600 + - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --editor-location=.Editor --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=3600 {% endif %} artifacts: logs: diff --git a/.yamato/package-tests.yml b/.yamato/package-tests.yml index 5373551ca2..ae00d50f83 100644 --- a/.yamato/package-tests.yml +++ b/.yamato/package-tests.yml @@ -17,20 +17,13 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}: UNITY_EXT_LOGGING: 1 commands: - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait - # Platform specific UTR setup - - | -{% if platform.name == "win" %} - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat -{% else %} - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr -{% endif %} # Validate packages. - upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --results pvp-results - upm-pvp require {% if platform.name == "win" %}"%XRAY_PROFILE%"{% else %}"$XRAY_PROFILE"{% endif %} --results pvp-results # Run UTR to test packages. - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --unity .Editor - - {% if platform.name == "ubuntu" %}DISPLAY=:0 {% endif %} {% if platform.name == "win" %} utr.bat {% else %} ./utr {% endif %} --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --artifacts-path=test-results "--ff={ops.upmpvpevidence.enable=true}" --extra-editor-arg=-testCategory --extra-editor-arg=!Performance --reruncount=1 --clean-library-on-rerun + - {% if platform.name == "ubuntu" %}DISPLAY=:0 {% endif %} UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --artifacts-path=test-results "--ff={ops.upmpvpevidence.enable=true}" --extra-editor-arg=-testCategory --extra-editor-arg=!Performance --reruncount=1 --clean-library-on-rerun artifacts: logs: paths: diff --git a/.yamato/performance-tests.yml b/.yamato/performance-tests.yml index abdbef444e..db17a4120c 100644 --- a/.yamato/performance-tests.yml +++ b/.yamato/performance-tests.yml @@ -18,26 +18,15 @@ performance_editor_tests_-_NGO_{{ platform.name }}_{{ editor }}_no_data_reportin - sudo apt-get update -q - sudo apt install -qy imagemagick {% endif %} + - npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - # Platform specific UTR setup -{% if platform.name == "win" %} - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat -{% else %} - - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr -{% endif %} - # Installing editor - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait # Build Player - - | -{% if platform.name == "win" %} - utr.bat --suite=editor --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --timeout=3600 --artifacts-path=artifacts --extra-editor-arg=-assemblyNames --extra-editor-arg=Unity.NetCode.* --extra-editor-arg=-testCategory --extra-editor-arg=Performance --extra-editor-arg=-enablePackageManagerTraces --reruncount=1 --clean-library-on-rerun --dontreportperformancedata -{% else %} - ./utr --suite=editor --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --timeout=3600 --artifacts-path=artifacts --extra-editor-arg=-assemblyNames --extra-editor-arg=Unity.NetCode.* --extra-editor-arg=-testCategory --extra-editor-arg=Performance --extra-editor-arg=-enablePackageManagerTraces --reruncount=1 --clean-library-on-rerun --dontreportperformancedata -{% endif %} + - UnifiedTestRunner --suite=editor --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --timeout=3600 --artifacts-path=artifacts --extra-editor-arg=-assemblyNames --extra-editor-arg=Unity.NetCode.* --extra-editor-arg=-testCategory --extra-editor-arg=Performance --extra-editor-arg=-enablePackageManagerTraces --reruncount=1 --clean-library-on-rerun --dontreportperformancedata artifacts: logs: diff --git a/.yamato/webgl-build.yml b/.yamato/webgl-build.yml index 97a182acdb..aa809701c6 100644 --- a/.yamato/webgl-build.yml +++ b/.yamato/webgl-build.yml @@ -20,25 +20,12 @@ webgl_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: commands: # Installing tools - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - # Platform specific UTR setup - - | -{% if platform.name == "win" %} - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat -{% else %} - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr -{% endif %} # Installing editor - unity-downloader-cli -u {{ editor }} -c Editor -c webgl -c il2cpp -w --fast # Build Player - - | -{% if platform.name == "win" %} - utr.bat --suite=playmode --platform=WebGL --scripting-backend=il2cpp --testproject={{ project.path }} --editor-location=.Editor --artifacts_path=artifacts --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg="-cloudEnvironment staging" --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 -{% else %} - ./utr --suite=playmode --platform=WebGL --scripting-backend=il2cpp --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=artifacts --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg="-cloudEnvironment staging" --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 -{% endif %} + - UnifiedTestRunner --suite=playmode --platform=WebGL --scripting-backend=il2cpp --testproject={{ project.path }} --editor-location=.Editor --artifacts_path=artifacts --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg="-cloudEnvironment staging" --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 artifacts: logs: From cbbe083ac57f7b28feb911934ed5bca610ab3565 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 27 Feb 2025 15:56:24 +0100 Subject: [PATCH 04/53] corrected typo --- .yamato/desktop-standalone-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index 2a62b07be8..5d1071cd44 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -44,7 +44,6 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ dependencies: - .yamato/project-pack.yml#project_pack_-_{{ project.name }}_{{ platform.name }} -{% endif %} {% endfor -%} {% endfor -%} {% endfor -%} From 54d7a9927581f59f1ed115d6f0783790f690406a Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 10:44:18 +0100 Subject: [PATCH 05/53] Removed unused code and corrected command --- .yamato/desktop-standalone-tests.yml | 10 ++-------- .../NetworkObjectSpawnManyObjectsTests.cs | 3 --- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index 5d1071cd44..e84b9e2046 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -19,13 +19,7 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ type: {% if platform.name == "mac" %} {{ platform.type }} {% else %} {{ platform.type }}::GPU {% endif %} image: {{ platform.image }} flavor: {{ platform.flavor }} - commands: -# Installing tools -{% if platform.name == "ubuntu" %} - - sudo apt-get update -q - - sudo apt install -qy imagemagick -{% endif %} - + commands: - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple # Installing editor @@ -64,7 +58,7 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ image: {{ platform.image }} flavor: {{ platform.flavor }} commands: -{% if editor == "2021.3" or platform.name == "ubuntu" %} +{% if editor == "2021.3" && platform.name == "ubuntu" %} - sudo apt-get install -y libssl1.1 # For this specific configuration there is a difference in what libssl version is installed on the image and what editor uses. This should be removed when 2021 editor is out of support {% endif %} - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple # Installing unity downloader diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs index 66b2b7b0f6..4968c9469f 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs @@ -1,5 +1,4 @@ using System.Collections; -using NUnit.Framework; using Unity.Netcode.TestHelpers.Runtime; using UnityEngine; using UnityEngine.TestTools; @@ -47,8 +46,6 @@ protected override void OnServerAndClientsCreated() } [UnityTest] - // When this test fails it does so without an exception and will wait the default ~6 minutes - // [Timeout(360000)] // Tracked in MTT-11360 public IEnumerator WhenManyObjectsAreSpawnedAtOnce_AllAreReceived() { for (int x = 0; x < k_SpawnedObjects; x++) From 481c159640173227a6f4e9931bfa89ec9c100d8d Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 11:07:33 +0100 Subject: [PATCH 06/53] Code Coverage test with upm-pvp --- .yamato/code-coverage.yml | 2 +- .yamato/package-pack.yml | 23 ----------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index c0aa7e59fd..2ef01fb7f9 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -23,6 +23,6 @@ code_coverage_{{ platform.name }}_{{ editor }}: - "upm-ci~/test-results/**/*" - "upm-ci~/test-results/CoverageResults/**/*" dependencies: - - .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}_upmCI + - .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }} {% endfor -%} {% endfor -%} \ No newline at end of file diff --git a/.yamato/package-pack.yml b/.yamato/package-pack.yml index 1d54e47212..a9ab902847 100644 --- a/.yamato/package-pack.yml +++ b/.yamato/package-pack.yml @@ -25,27 +25,4 @@ package_pack_-_ngo_{{ platform.name }}: packages: paths: - "upm-ci~/**" -{% endfor -%} - -# This is in essence the same job as the one above with the difference that upm-ci is used instead of upm-pvp -# The reason for using it is that I had some problems with Code Coverage which in its current form uses upm-ci but if we would use the other pack job (the one above) we would need to use upm-pvp -# I had some problems with getting it to work so as temporary solution I created this pack job which is used ONLY as a dependency of Code Coverage job (other jobs use the above definition of pack job) -# TODO: remove this job and utilize the above one for Code Coverage job. This is tracked in MTT-11383 -{% for platform in test_platforms.default -%} -{% for project in projects.default -%} -package_pack_-_ngo_{{ platform.name }}_upmCI: - name: Package Pack (legacy upm-ci) - NGO [{{ platform.name }}] - agent: - type: {{ platform.type }} - image: {{ platform.image }} - flavor: {{ platform.flavor }} - timeout: 0.25 - commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - upm-ci project pack --project-path {{ project.path }} - artifacts: - packages: - paths: - - "upm-ci~/packages/**/*" -{% endfor -%} {% endfor -%} \ No newline at end of file From 901b3b1b8a361e9815ebfb6cbcc5fd456a4ea7f0 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 11:26:16 +0100 Subject: [PATCH 07/53] Adding test CleanImport job --- .yamato/_triggers.yml | 3 +++ .yamato/clean-import-job.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .yamato/clean-import-job.yml diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index e8e7a330ce..056aab7d72 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -66,6 +66,9 @@ develop_nightly: # Build player for webgl platform on trunk and 2021 editors - .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_ubuntu_trunk - .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_win_2021.3 + # Clean import test + - .yamato/clean-import-job.yml#clean_import_testproject_trunk + - .yamato/clean-import-job.yml#clean_import_testproject_2021.3 # Run all tests on weekly bases diff --git a/.yamato/clean-import-job.yml b/.yamato/clean-import-job.yml new file mode 100644 index 0000000000..71b49bbd0d --- /dev/null +++ b/.yamato/clean-import-job.yml @@ -0,0 +1,28 @@ +{% metadata_file .yamato/project.metafile %} +--- + +{% for platform in test_platforms.default -%} +{% for project in projects.default -%} +{% for editor in validation_editors.all -%} +clean_import_{{ project.name }}_{{ editor }}: + name: Clean Import - [{{ project.name }}, {{ editor }}] + agent: + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor }} + commands: + - command: npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - command: unity-downloader-cli -u {{ editor }} -c Editor --fast --wait + - command: "clean-log-checker --logfile=artifacts/NGO-CleanLog.txt --ignore \"Rebuilding Library because the asset database could not be found!\" --ignore \"Rebuilding Library because the metadata folder could not be found!\" --ignore \"Project manifest update is not allowed on this project.\" --ignore \"Native leak detection mode: EnabledWithStackTrace\" --ignore \"Native leak detection mode: Enabled\" --ignore \"Native leak detection mode: Disabled\" --ignore \"The project currently uses the compatibility mode where the Render Graph API is disabled. Support for this mode will be removed in future Unity versions. Migrate existing ScriptableRenderPasses to the new RenderGraph API. After the migration, disable the compatibility mode in Edit > Projects Settings > Graphics > Render Graph.\"" + after: + - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd + artifacts: + CrashDumps: + paths: + - CrashDumps/** + logs: + paths: + - artifacts/** +{% endfor -%} +{% endfor -%} +{% endfor -%} \ No newline at end of file From 488850d37fefa685d6e3107f34545c2fd196e728 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 11:28:29 +0100 Subject: [PATCH 08/53] linter --- .yamato/clean-import-job.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.yamato/clean-import-job.yml b/.yamato/clean-import-job.yml index 71b49bbd0d..c217eba580 100644 --- a/.yamato/clean-import-job.yml +++ b/.yamato/clean-import-job.yml @@ -17,12 +17,10 @@ clean_import_{{ project.name }}_{{ editor }}: after: - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd artifacts: - CrashDumps: - paths: - - CrashDumps/** logs: paths: - artifacts/** + - CrashDumps/** {% endfor -%} {% endfor -%} {% endfor -%} \ No newline at end of file From ea631b1eb389432dc9ac81c869107595b1a5c449 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 12:41:07 +0100 Subject: [PATCH 09/53] typo --- .yamato/clean-import-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/clean-import-job.yml b/.yamato/clean-import-job.yml index c217eba580..dd0456425c 100644 --- a/.yamato/clean-import-job.yml +++ b/.yamato/clean-import-job.yml @@ -1,6 +1,6 @@ {% metadata_file .yamato/project.metafile %} --- - + {% for platform in test_platforms.default -%} {% for project in projects.default -%} {% for editor in validation_editors.all -%} From 3f2a34cc098be3ee20de098e7bab9bd818d79727 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 12:45:53 +0100 Subject: [PATCH 10/53] Code coverage command corrected to use UTR --- .yamato/code-coverage.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index 2ef01fb7f9..e6ed2e7cc1 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -16,11 +16,12 @@ code_coverage_{{ platform.name }}_{{ editor }}: commands: - npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait - - DISPLAY=:0 upm-ci package test -u {{ editor }} --package-path com.unity.netcode.gameobjects --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime' --extra-utr-arg="--extra-editor-arg=--burst-disable-compilation --extra-editor-arg=testCategory --extra-editor-arg=!Performance --timeout=1800 --reruncount=1 --clean-library-on-rerun" + - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor + - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage --code-coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --extra-editor-arg=testCategory --extra-editor-arg=!Performance --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results artifacts: logs: paths: - - "upm-ci~/test-results/**/*" + - "test-results/**/*" - "upm-ci~/test-results/CoverageResults/**/*" dependencies: - .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }} From a6e58acbd87a9bd6dbca8bfab30808f97bee5940 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 12:56:51 +0100 Subject: [PATCH 11/53] removed command keyword --- .yamato/clean-import-job.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.yamato/clean-import-job.yml b/.yamato/clean-import-job.yml index dd0456425c..e7ea9587b5 100644 --- a/.yamato/clean-import-job.yml +++ b/.yamato/clean-import-job.yml @@ -11,11 +11,11 @@ clean_import_{{ project.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - command: npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - command: unity-downloader-cli -u {{ editor }} -c Editor --fast --wait - - command: "clean-log-checker --logfile=artifacts/NGO-CleanLog.txt --ignore \"Rebuilding Library because the asset database could not be found!\" --ignore \"Rebuilding Library because the metadata folder could not be found!\" --ignore \"Project manifest update is not allowed on this project.\" --ignore \"Native leak detection mode: EnabledWithStackTrace\" --ignore \"Native leak detection mode: Enabled\" --ignore \"Native leak detection mode: Disabled\" --ignore \"The project currently uses the compatibility mode where the Render Graph API is disabled. Support for this mode will be removed in future Unity versions. Migrate existing ScriptableRenderPasses to the new RenderGraph API. After the migration, disable the compatibility mode in Edit > Projects Settings > Graphics > Render Graph.\"" + - npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait + - "clean-log-checker --logfile=artifacts/NGO-CleanLog.txt --ignore \"Rebuilding Library because the asset database could not be found!\" --ignore \"Rebuilding Library because the metadata folder could not be found!\" --ignore \"Project manifest update is not allowed on this project.\" --ignore \"Native leak detection mode: EnabledWithStackTrace\" --ignore \"Native leak detection mode: Enabled\" --ignore \"Native leak detection mode: Disabled\" --ignore \"The project currently uses the compatibility mode where the Render Graph API is disabled. Support for this mode will be removed in future Unity versions. Migrate existing ScriptableRenderPasses to the new RenderGraph API. After the migration, disable the compatibility mode in Edit > Projects Settings > Graphics > Render Graph.\"" after: - - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd + - .yamato\generated-scripts\infrastructure-instability-detection-win.cmd artifacts: logs: paths: From 2728908d4e41cd342462b1ca58c2e55e381faded Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 12:59:59 +0100 Subject: [PATCH 12/53] removed clean import job attempt --- .yamato/clean-import-job.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .yamato/clean-import-job.yml diff --git a/.yamato/clean-import-job.yml b/.yamato/clean-import-job.yml deleted file mode 100644 index e7ea9587b5..0000000000 --- a/.yamato/clean-import-job.yml +++ /dev/null @@ -1,26 +0,0 @@ -{% metadata_file .yamato/project.metafile %} ---- - -{% for platform in test_platforms.default -%} -{% for project in projects.default -%} -{% for editor in validation_editors.all -%} -clean_import_{{ project.name }}_{{ editor }}: - name: Clean Import - [{{ project.name }}, {{ editor }}] - agent: - type: {{ platform.type }} - image: {{ platform.image }} - flavor: {{ platform.flavor }} - commands: - - npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait - - "clean-log-checker --logfile=artifacts/NGO-CleanLog.txt --ignore \"Rebuilding Library because the asset database could not be found!\" --ignore \"Rebuilding Library because the metadata folder could not be found!\" --ignore \"Project manifest update is not allowed on this project.\" --ignore \"Native leak detection mode: EnabledWithStackTrace\" --ignore \"Native leak detection mode: Enabled\" --ignore \"Native leak detection mode: Disabled\" --ignore \"The project currently uses the compatibility mode where the Render Graph API is disabled. Support for this mode will be removed in future Unity versions. Migrate existing ScriptableRenderPasses to the new RenderGraph API. After the migration, disable the compatibility mode in Edit > Projects Settings > Graphics > Render Graph.\"" - after: - - .yamato\generated-scripts\infrastructure-instability-detection-win.cmd - artifacts: - logs: - paths: - - artifacts/** - - CrashDumps/** -{% endfor -%} -{% endfor -%} -{% endfor -%} \ No newline at end of file From 930e4c82dba229832527ffdd75ae01622c2cc371 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 13:04:55 +0100 Subject: [PATCH 13/53] Removed timeouts in UniversalRpcTests for testing --- .../Tests/Runtime/UniversalRpcTests.cs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs index 584a13ae62..56bec2462d 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs @@ -918,7 +918,6 @@ public void RethrowTargetInvocationException(Action action) } } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingNoOverride : UniversalRpcTestsBase @@ -949,7 +948,6 @@ public void TestSendingNoOverride( } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSenderClientId : UniversalRpcTestsBase @@ -980,7 +978,6 @@ public void TestSenderClientId( } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingNoOverrideWithParams : UniversalRpcTestsBase @@ -1023,7 +1020,6 @@ public void TestSendingNoOverrideWithParams( } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingNoOverrideWithParamsAndRpcParams : UniversalRpcTestsBase @@ -1066,7 +1062,6 @@ public void TestSendingNoOverrideWithParamsAndRpcParams( } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestRequireOwnership : UniversalRpcTestsBase @@ -1103,7 +1098,6 @@ public void TestRequireOwnership( } } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestDisallowedOverride : UniversalRpcTestsBase @@ -1139,7 +1133,6 @@ public void TestDisallowedOverride( } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingWithTargetOverride : UniversalRpcTestsBase @@ -1173,7 +1166,6 @@ public void TestSendingWithTargetOverride( } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingWithSingleOverride : UniversalRpcTestsBase @@ -1221,7 +1213,6 @@ public IEnumerator TestSendingWithSingleOverride() } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingWithSingleNotOverride : UniversalRpcTestsBase @@ -1269,7 +1260,6 @@ public IEnumerator TestSendingWithSingleNotOverride() } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingWithGroupOverride : UniversalRpcTestsBase @@ -1347,8 +1337,6 @@ [Values] AllocationType allocationType } } - - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingWithGroupNotOverride : UniversalRpcTestsBase @@ -1427,7 +1415,6 @@ [Values] AllocationType allocationType } } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestDefaultSendToSpecifiedInParamsSendingToServerAndOwner : UniversalRpcTestsBase @@ -1438,7 +1425,6 @@ public UniversalRpcTestDefaultSendToSpecifiedInParamsSendingToServerAndOwner(Hos } } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestDeferLocal : UniversalRpcTestsBase @@ -1626,7 +1612,6 @@ public IEnumerator TestDeferLocalOverrideToFalse() } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestMutualRecursion : UniversalRpcTestsBase @@ -1676,7 +1661,6 @@ public void TestMutualRecursion() } - [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSelfRecursion : UniversalRpcTestsBase @@ -1715,8 +1699,7 @@ public void TestSelfRecursion() } } - - [Timeout(1200000)] // Tracked in MTT-11359 + [TestFixture(ObjType.Server)] [TestFixture(ObjType.Client)] internal class UniversalRpcTestRpcTargetUse : UniversalRpcTestsBase From 2015c678030f7cf9c4e82882285c847e27b22b19 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 14:13:36 +0100 Subject: [PATCH 14/53] Modified artifacts of code coverage --- .yamato/code-coverage.yml | 3 ++- .../Tests/Runtime/UniversalRpcTests.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index e6ed2e7cc1..8f9cb9e789 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -22,7 +22,8 @@ code_coverage_{{ platform.name }}_{{ editor }}: logs: paths: - "test-results/**/*" - - "upm-ci~/test-results/CoverageResults/**/*" + - "test-results/CodeCoverage/**/*" + - "test-results/CoverageResults/**/*" dependencies: - .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }} {% endfor -%} diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs index 56bec2462d..0c5be031c7 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs @@ -1699,7 +1699,7 @@ public void TestSelfRecursion() } } - + [TestFixture(ObjType.Server)] [TestFixture(ObjType.Client)] internal class UniversalRpcTestRpcTargetUse : UniversalRpcTestsBase From c2ed1206674f2c7b391ee88476512e2f5323804a Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 14:20:36 +0100 Subject: [PATCH 15/53] Reenabled WhenAnticipating_ValueChangesImmediately for testing --- .../Tests/Runtime/NetworkTransformAnticipationTests.cs | 1 - com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransformAnticipationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransformAnticipationTests.cs index 5b11e84a48..f88c95d461 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransformAnticipationTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransformAnticipationTests.cs @@ -115,7 +115,6 @@ public AnticipatedNetworkTransform GetOtherClientComponent() } [Test] - [UnityPlatform(exclude = new[] { RuntimePlatform.Android })] // Tracked in MTT-11361 public void WhenAnticipating_ValueChangesImmediately() { var testComponent = GetTestComponent(); diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs index 0c5be031c7..cbf91e4e01 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs @@ -1653,6 +1653,7 @@ public void TestMutualRecursion() Clear(); } + serverObj.Stop = true; WaitForMessageReceivedWithTimeTravel(serverList); Assert.IsFalse(serverObj.Stop); From 268c522d7dbbefc6c75a49a268e2ea46c0dc34c4 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 28 Feb 2025 14:38:44 +0100 Subject: [PATCH 16/53] corrected typo --- .yamato/desktop-standalone-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index e84b9e2046..736d19c945 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -58,7 +58,7 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ image: {{ platform.image }} flavor: {{ platform.flavor }} commands: -{% if editor == "2021.3" && platform.name == "ubuntu" %} +{% if editor == "2021.3" and platform.name == "ubuntu" %} - sudo apt-get install -y libssl1.1 # For this specific configuration there is a difference in what libssl version is installed on the image and what editor uses. This should be removed when 2021 editor is out of support {% endif %} - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple # Installing unity downloader From 0cbdb86701dc957d564cd80031bd7031f4a15e25 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 3 Mar 2025 15:38:52 +0100 Subject: [PATCH 17/53] Reverted changes related to tests because this commit focuses on CI --- .../NetworkObjectSpawnManyObjectsTests.cs | 2 ++ .../NetworkTransformAnticipationTests.cs | 1 + .../Tests/Runtime/UniversalRpcTests.cs | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs index 4968c9469f..2aeb43e895 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs @@ -46,6 +46,8 @@ protected override void OnServerAndClientsCreated() } [UnityTest] + // When this test fails it does so without an exception and will wait the default ~6 minutes + [Timeout(360000)] // Tracked in MTT-11360 public IEnumerator WhenManyObjectsAreSpawnedAtOnce_AllAreReceived() { for (int x = 0; x < k_SpawnedObjects; x++) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransformAnticipationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransformAnticipationTests.cs index f88c95d461..5b11e84a48 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransformAnticipationTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransformAnticipationTests.cs @@ -115,6 +115,7 @@ public AnticipatedNetworkTransform GetOtherClientComponent() } [Test] + [UnityPlatform(exclude = new[] { RuntimePlatform.Android })] // Tracked in MTT-11361 public void WhenAnticipating_ValueChangesImmediately() { var testComponent = GetTestComponent(); diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs index cbf91e4e01..69674c20d9 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/UniversalRpcTests.cs @@ -918,6 +918,7 @@ public void RethrowTargetInvocationException(Action action) } } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingNoOverride : UniversalRpcTestsBase @@ -948,6 +949,7 @@ public void TestSendingNoOverride( } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSenderClientId : UniversalRpcTestsBase @@ -978,6 +980,7 @@ public void TestSenderClientId( } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingNoOverrideWithParams : UniversalRpcTestsBase @@ -1020,6 +1023,7 @@ public void TestSendingNoOverrideWithParams( } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingNoOverrideWithParamsAndRpcParams : UniversalRpcTestsBase @@ -1062,6 +1066,7 @@ public void TestSendingNoOverrideWithParamsAndRpcParams( } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestRequireOwnership : UniversalRpcTestsBase @@ -1098,6 +1103,7 @@ public void TestRequireOwnership( } } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestDisallowedOverride : UniversalRpcTestsBase @@ -1133,6 +1139,7 @@ public void TestDisallowedOverride( } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingWithTargetOverride : UniversalRpcTestsBase @@ -1166,6 +1173,7 @@ public void TestSendingWithTargetOverride( } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingWithSingleOverride : UniversalRpcTestsBase @@ -1213,6 +1221,7 @@ public IEnumerator TestSendingWithSingleOverride() } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingWithSingleNotOverride : UniversalRpcTestsBase @@ -1260,6 +1269,7 @@ public IEnumerator TestSendingWithSingleNotOverride() } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingWithGroupOverride : UniversalRpcTestsBase @@ -1337,6 +1347,8 @@ [Values] AllocationType allocationType } } + + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSendingWithGroupNotOverride : UniversalRpcTestsBase @@ -1415,6 +1427,7 @@ [Values] AllocationType allocationType } } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestDefaultSendToSpecifiedInParamsSendingToServerAndOwner : UniversalRpcTestsBase @@ -1425,6 +1438,7 @@ public UniversalRpcTestDefaultSendToSpecifiedInParamsSendingToServerAndOwner(Hos } } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestDeferLocal : UniversalRpcTestsBase @@ -1612,6 +1626,7 @@ public IEnumerator TestDeferLocalOverrideToFalse() } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestMutualRecursion : UniversalRpcTestsBase @@ -1662,6 +1677,7 @@ public void TestMutualRecursion() } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] internal class UniversalRpcTestSelfRecursion : UniversalRpcTestsBase @@ -1701,6 +1717,7 @@ public void TestSelfRecursion() } + [Timeout(1200000)] // Tracked in MTT-11359 [TestFixture(ObjType.Server)] [TestFixture(ObjType.Client)] internal class UniversalRpcTestRpcTargetUse : UniversalRpcTestsBase From 1945b641fba8e9b49f2b3d14d2044ac09ca527c7 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 3 Mar 2025 15:39:45 +0100 Subject: [PATCH 18/53] correction --- .../Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs index 2aeb43e895..4ed1f816fc 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSpawnManyObjectsTests.cs @@ -1,4 +1,5 @@ using System.Collections; +using NUnit.Framework; using Unity.Netcode.TestHelpers.Runtime; using UnityEngine; using UnityEngine.TestTools; From 0d0ef5a2e5582cfa796f993f9790eba564d9fb73 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 12:39:17 +0100 Subject: [PATCH 19/53] Added ci README file --- .yamato/CI_README.md | 80 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .yamato/CI_README.md diff --git a/.yamato/CI_README.md b/.yamato/CI_README.md new file mode 100644 index 0000000000..f5eafa856b --- /dev/null +++ b/.yamato/CI_README.md @@ -0,0 +1,80 @@ +# Netcode for GameObjects CI Documentation + +## Overview +This document provides an overview of the Continuous Integration (CI) implementation for Netcode for GameObjects. +Specifics of each test are described within related files (for example .yamato/package-tests.yml) and this file present high level overview related to overall implementation. + +## Test Configurations +CI related files are present inside .yamato/ folder and we can distinguish specific tests + +### Helper jobs +- `.yamato/package-pack.yml` responsible for generating package artifacts (.tgz) required for testing and publishing. +- `.yamato/project-pack.yml` responsible for generating package artifacts (.tgz) required for testing and publishing. This packs all packages of a given project. +- `.yamato/_run-all.yml` responsible for grouping tests into groups for easier management (for example "all console tests"). +- `.yamato/_triggers.yml` responsible for defining triggers (PR, nightly, weekly etc.) and defining which tests to run. +- `disable-burst-if-requested.py` responsible for helping to disable burst if needed. +- `.yamato/project.metafile` being the central configuration file defining test environments, platforms, projects, editors and other parameters used. + +### In-Editor Tests +- `.yamato/package-tests.yml` responsible for running package tests. +- `.yamato/project-tests.yml` responsible for running project tests. +- `.yamato/project-updated-dependencies-test.yml` responsible for running tests after updating dependencies to latest ones. +- `.yamato/project-standards.yml` responsible for running standards check on a package. +- `.yamato/code-coverage.yml` responsible for running code coverage analysis. +- `.yamato/performance-tests.yml` responsible for running performance tests. +- `.yamato/webgl-build.yml` responsible for making a build for webgl platform. + +### Standalone Tests +- `.yamato/desktop-standalone-tests.yml` responsible for running tests on standalone desktops. +- `.yamato/console-standalone-test.yml` responsible for running tests on standalone consoles. +- `.yamato/mobile-standalone-test.yml` responsible for running tests on standalone mobiles. + +### Wrench jobs +This file is auto generated by wrench and used for automating release process. +Those tests can also be used by our CI as dependencies. +- `.yamato/wrench/api-validation-jobs.yml` responsible for validating api for a given package version (for example if there are no breaking changes when updating patch version) +- `.yamato/wrench/package-pack-jobs.yml` responsible for generating package artifacts (.tgz) required for testing and publishing. +- `.yamato/wrench/preview-a-p-v.yml` responsible for validating PVP (Package Verification Profiles) standards for the package. +- `.yamato/wrench/promotion-jobs.yml` responsible for publishing. +- `.yamato/wrench/publish-trigger.yml` responsible for defining jobs that need to pass in order to publish. +- `.yamato/wrench/recipe-regeneration.yml` responsible for verifying regeneration of wrench recipes (no manual changes). +- `.yamato/wrench/validation-jobs.yml` responsible for running package tests. +- `.yamato/wrench/wrench_config.json` this is the configuration file for wrench. +- `.yamato/generated-scripts/` is a collection of infrastructure instability detection tools. + +## Jobs Configuration Structure +This section explains some configuration details that may be confusing while looking at .yml files. + +### Job Generation +Our configuration uses a dynamic job generation approach based on the `.yamato/project.metafile` configuration. While it may appear that only one job is defined per file, the system (Yamato) actually generates multiple jobs through nested loops. +Usually only 1 job is defined and then generated with multiple configurations/parameters but in case of standalone tests 2 jobs are defined which are responsible for building and then testing. + +### Job Naming Convention +Because the jobs are being generated their names will be filled by given parameters from project.metfaile. For example jobs from .yamato/console-standalone-test may have names like: +- Display Name (in Yamato): `Build testproject - [win, 6000.0, il2cpp]` +- Internal Job Name (used when adding dependency for example): `console_standalone_build_testproject_win_6000.0` + +## Platform Support +Currently, the CI implementation supports the following platforms: +1. Console Platforms: + - Switch + - PS4 + - PS5 + - Xbox360 + - XboxOne +2. Mobile Platforms: + - Android + - iOS +3. Desktop Platforms: + - Windows + - Ubuntu + - macOS +4. Unity Editor Versions + - Supports NGOv1.X (2021.3+ editors) +5. Architectures + - x64 + - ARM64 (This is present for consoles/mobiles but will be extended. More information is present in specific standalone test files) + +## Design Considerations +In theory, we could manually write jobs for every configuration. However, this approach would be more error-prone, especially when modifications or fixes are needed, as it would require keeping track of all configurations. +The downside of our current approach is that it can sometimes impact readability due to the use of nested if and for statements. \ No newline at end of file From 33346b07c9b1026ac837921d6ac4737b8cd6469c Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 12:45:37 +0100 Subject: [PATCH 20/53] Corrected mobile standalone tests naming --- .yamato/_run-all.yml | 6 +++--- .yamato/mobile-standalone-test.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.yamato/_run-all.yml b/.yamato/_run-all.yml index 7c37aa7179..417c46943a 100644 --- a/.yamato/_run-all.yml +++ b/.yamato/_run-all.yml @@ -170,7 +170,7 @@ run_all_project_tests_mobile_standalone: {% for project in projects.default -%} {% for platform in test_platforms.mobile_test -%} {% for editor in validation_editors.all -%} - - .yamato/mobile-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }} + - .yamato/mobile-standalone-test.yml#mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }} {% endfor -%} {% endfor -%} {% endfor -%} @@ -183,7 +183,7 @@ run_all_project_tests_mobile_standalone_trunk: {% for project in projects.default -%} {% for platform in test_platforms.mobile_test -%} {% for editor in validation_editors.default -%} - - .yamato/mobile-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }} + - .yamato/mobile-standalone-test.yml#mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }} {% endfor -%} {% endfor -%} {% endfor -%} @@ -194,7 +194,7 @@ run_all_project_tests_mobile_standalone_2021: dependencies: {% for project in projects.default -%} {% for platform in test_platforms.mobile_test -%} - - .yamato/mobile-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_2021.3 + - .yamato/mobile-standalone-test.yml#mobile_standalone_test_{{ project.name }}_{{ platform.name }}_2021.3 {% endfor -%} {% endfor -%} diff --git a/.yamato/mobile-standalone-test.yml b/.yamato/mobile-standalone-test.yml index 3ee06212d4..4d80282a1b 100644 --- a/.yamato/mobile-standalone-test.yml +++ b/.yamato/mobile-standalone-test.yml @@ -14,7 +14,7 @@ {% for project in projects.default -%} {% for platform in test_platforms.mobile_build -%} {% for editor in validation_editors.all -%} -build_{{ project.name }}_{{ platform.name }}_{{ editor }}: +mobile_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: name: Build {{ project.name }} - [{{ platform.name }}, {{ editor }}, il2cpp] agent: type: {{ platform.type }} @@ -49,7 +49,7 @@ build_{{ project.name }}_{{ platform.name }}_{{ editor }}: {% for project in projects.default -%} {% for platform in test_platforms.mobile_test -%} {% for editor in validation_editors.all -%} -run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}: +mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: name: Run {{ project.name }} Tests - [{{ platform.name }}, {{ editor }}, il2cpp] agent: type: {{ platform.type }} @@ -91,7 +91,7 @@ run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}: paths: - "test-results/**/*" dependencies: - - .yamato/mobile-standalone-test.yml#build_{{ project.name }}_{{ platform.name }}_{{ editor }} + - .yamato/mobile-standalone-test.yml#mobile_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }} {% endfor -%} {% endfor -%} {% endfor -%} From 5fa43eba5316e35ef5b820787bf56121f9acdc1b Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 12:46:30 +0100 Subject: [PATCH 21/53] Added comments to run-all file --- .yamato/_run-all.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.yamato/_run-all.yml b/.yamato/_run-all.yml index 417c46943a..0b5c9ca44a 100644 --- a/.yamato/_run-all.yml +++ b/.yamato/_run-all.yml @@ -1,6 +1,16 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- +# DESCRIPTION-------------------------------------------------------------------------- +# Those jobs group together related test as dependencies to allow to easily manage running a given set of tests. +# This enables efficient test execution for different validation scenarios + +# QUALITY CONSIDERATIONS--------------------------------------------------------------- +# It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job. + +#----------------------------------------------------------------------------------- + + # Runs all package tests run_all_package_tests: name: Run All Package Tests From 7be30cdea9079e3d22a6e8cdccd34d637c30835a Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 12:48:18 +0100 Subject: [PATCH 22/53] Added triggers.yml comments --- .yamato/_triggers.yml | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index 056aab7d72..d9c6efacc6 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -1,6 +1,44 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- +# DESCRIPTION-------------------------------------------------------------------------- +# This configuration defines three main CI trigger patterns: +# 1. Pull Request Validation: Validation performed on PR basis +# 2. Nightly Development: Test set run nightly (validates most important test cases) +# 3. Weekly Full Validation: Test set run weekly (validates all test cases to prevent any surprises) +# Each pattern represents different balance between validation depth, execution time and CI resource usage + +# TRIGGER PATTERNS------------------------------------------------------------------- +# Pull Request: +# This test validates Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered +# Triggers on PRs to develop, develop, and release branches +# Focuses on critical validation paths that we should validate before merging PRs +# Cancels previous runs on new commits +# Excludes draft PRs + +# Nightly: +# This test validates same subset as pull_request_trigger with addition of mobile/console tests and webgl builds +# Runs daily on develop (local configuration) +# Includes all test types but only on trunk. +# Adds platform-specific and APV validation + +# Weekly: +# This test validates same subset as develop_nightly but runs per all supported editors as well as executes code coverage test and runs project standards per project +# Runs across all supported editor versions +# Includes code coverage analysis +# Validates all projects and standards + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- +# Jobs configurations are generated by ensuring that all dependencies are successful. +# The dependencies are taken from _run-all.yml file where we can gather multiple tests into proper sets + +# QUALITY CONSIDERATIONS--------------------------------------------------------------- +# It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job. + + + +#----------------------------------------------------------------------------------- + # Run all relevant tasks when a pull request targeting the develop or release branch is created or updated. pull_request_trigger: name: Pull Request Trigger (develop, develop-2.0.0, & release branches) From 6344e048a1d2bf70e31882286dcb5b2c2ca6cedd Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 12:51:00 +0100 Subject: [PATCH 23/53] Added code-coverage comments and modifications (same as in develop-2.0.0 branch) --- .yamato/_run-all.yml | 6 ++--- .yamato/_triggers.yml | 49 +++++++++++++++++++-------------------- .yamato/code-coverage.yml | 37 +++++++++++++++++++++-------- 3 files changed, 54 insertions(+), 38 deletions(-) diff --git a/.yamato/_run-all.yml b/.yamato/_run-all.yml index 0b5c9ca44a..4ccaa9c2e0 100644 --- a/.yamato/_run-all.yml +++ b/.yamato/_run-all.yml @@ -2,11 +2,11 @@ --- # DESCRIPTION-------------------------------------------------------------------------- -# Those jobs group together related test as dependencies to allow to easily manage running a given set of tests. -# This enables efficient test execution for different validation scenarios + # Those jobs group together related test as dependencies to allow to easily manage running a given set of tests. + # This enables efficient test execution for different validation scenarios # QUALITY CONSIDERATIONS--------------------------------------------------------------- -# It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job. + # It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job. #----------------------------------------------------------------------------------- diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index d9c6efacc6..e3e42504f4 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -2,39 +2,38 @@ --- # DESCRIPTION-------------------------------------------------------------------------- -# This configuration defines three main CI trigger patterns: -# 1. Pull Request Validation: Validation performed on PR basis -# 2. Nightly Development: Test set run nightly (validates most important test cases) -# 3. Weekly Full Validation: Test set run weekly (validates all test cases to prevent any surprises) -# Each pattern represents different balance between validation depth, execution time and CI resource usage + # This configuration defines three main CI trigger patterns: + # 1. Pull Request Validation: Validation performed on PR basis + # 2. Nightly Development: Test set run nightly (validates most important test cases) + # 3. Weekly Full Validation: Test set run weekly (validates all test cases to prevent any surprises) + # Each pattern represents different balance between validation depth, execution time and CI resource usage # TRIGGER PATTERNS------------------------------------------------------------------- -# Pull Request: -# This test validates Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered -# Triggers on PRs to develop, develop, and release branches -# Focuses on critical validation paths that we should validate before merging PRs -# Cancels previous runs on new commits -# Excludes draft PRs + # Pull Request: + # This test validates Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered + # Triggers on PRs to develop, develop, and release branches + # Focuses on critical validation paths that we should validate before merging PRs + # Cancels previous runs on new commits + # Excludes draft PRs -# Nightly: -# This test validates same subset as pull_request_trigger with addition of mobile/console tests and webgl builds -# Runs daily on develop (local configuration) -# Includes all test types but only on trunk. -# Adds platform-specific and APV validation + # Nightly: + # This test validates same subset as pull_request_trigger with addition of mobile/console tests and webgl builds + # Runs daily on develop (local configuration) + # Includes all test types but only on trunk. + # Adds platform-specific and APV validation -# Weekly: -# This test validates same subset as develop_nightly but runs per all supported editors as well as executes code coverage test and runs project standards per project -# Runs across all supported editor versions -# Includes code coverage analysis -# Validates all projects and standards + # Weekly: + # This test validates same subset as develop_nightly but runs per all supported editors as well as executes code coverage test and runs project standards per project + # Runs across all supported editor versions + # Includes code coverage analysis + # Validates all projects and standards # CONFIGURATION STRUCTURE-------------------------------------------------------------- -# Jobs configurations are generated by ensuring that all dependencies are successful. -# The dependencies are taken from _run-all.yml file where we can gather multiple tests into proper sets + # Jobs configurations are generated by ensuring that all dependencies are successful. + # The dependencies are taken from _run-all.yml file where we can gather multiple tests into proper sets # QUALITY CONSIDERATIONS--------------------------------------------------------------- -# It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job. - + # It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job. #----------------------------------------------------------------------------------- diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index 8f9cb9e789..f339f5c4b6 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -1,10 +1,30 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Runs package tests in order to determine code coverage of the NGO package. -# In essence it's performing the same task as .yamato/package-test jobs with the overhead being the measured code coverage -# It's ok for code coverage to be performed only on one platform (default) since code coverage won't change much between those. -# Default platform was chosen (ubuntu) since it's the fastest and most resource friendly with default editor. +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible for executing package tests with code coverage analysis enabled. + # Coverage analysis provides insights into: + # Test coverage metrics for NGO assemblies + # Line and branch coverage statistics + # Generated HTML reports for coverage visualization + # Additional metrics for coverage analysis + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs are generated using nested loops through: + # 1. For default platform only (Ubuntu) since coverage would not vary between platforms (no need for checks on more platforms) + # 2. For default editor version (trunk) since coverage would not vary between editors (no need for checks on more editors) + +#TECHNICAL CONSIDERATIONS--------------------------------------------------------------- + # In theory this job also runs package tests, but we don't want to use it as default since is heavier (because of added coverage analysis) and coverage is not changing that often + # Requires Unity Editor installation + # Burst compilation is disabled to ensure accurate coverage measurement + # In order to properly use -coverage-results-path parameter we need to start it with $PWD (which means the absolute path). Otherwise, coverage results will not be visible + +# QUALITY CONSIDERATIONS-------------------------------------------------------------------- + # TODO: somewhere in 2025 we will be able to upload resuls to CodeCov from public repos + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + + {% for platform in test_platforms.default -%} {% for editor in validation_editors.default -%} code_coverage_{{ platform.name }}_{{ editor }}: @@ -14,16 +34,13 @@ code_coverage_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait + - unity-downloader-cli -u {{ editor }} -c Editor - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor - - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage --code-coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --extra-editor-arg=testCategory --extra-editor-arg=!Performance --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results + - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage -coverage-results-path=$PWD/test-results/CodeCoverage --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results artifacts: logs: paths: - "test-results/**/*" - - "test-results/CodeCoverage/**/*" - - "test-results/CoverageResults/**/*" dependencies: - .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }} {% endfor -%} From 7f258188f8e4ef5594c9bb750e06fea5de23e442 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 12:54:45 +0100 Subject: [PATCH 24/53] Added console-standalone comments --- .yamato/_run-all.yml | 6 +-- .yamato/console-standalone-test.yml | 67 ++++++++++++++++++----------- 2 files changed, 44 insertions(+), 29 deletions(-) diff --git a/.yamato/_run-all.yml b/.yamato/_run-all.yml index 4ccaa9c2e0..372152bb19 100644 --- a/.yamato/_run-all.yml +++ b/.yamato/_run-all.yml @@ -216,7 +216,7 @@ run_all_project_tests_console_standalone: {% for project in projects.default -%} {% for platform in test_platforms.console_test -%} {% for editor in validation_editors.all -%} - - .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }} + - .yamato/console-standalone-test.yml#console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }} {% endfor -%} {% endfor -%} {% endfor -%} @@ -229,7 +229,7 @@ run_all_project_tests_console_standalone_trunk: {% for project in projects.default -%} {% for platform in test_platforms.console_test -%} {% for editor in validation_editors.default -%} - - .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }} + - .yamato/console-standalone-test.yml#console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }} {% endfor -%} {% endfor -%} {% endfor -%} @@ -240,6 +240,6 @@ run_all_project_tests_console_standalone_2021: dependencies: {% for project in projects.default -%} {% for platform in test_platforms.console_test -%} - - .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_2021.3 + - .yamato/console-standalone-test.yml#console_standalone_test_{{ project.name }}_{{ platform.name }}_2021.3 {% endfor -%} {% endfor -%} diff --git a/.yamato/console-standalone-test.yml b/.yamato/console-standalone-test.yml index 4ab96d8273..13f44dd910 100644 --- a/.yamato/console-standalone-test.yml +++ b/.yamato/console-standalone-test.yml @@ -1,34 +1,54 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Builds a player on console standalone platform and executes RuntimeTests (equivalent to PlayMode tests) of the NGO package in the Standalone build. -# Default project (testptoject) in this case is used as a context. -# Builds/Tests are made on each console platform (PS4, PS5, Switch, XboxOne, XboxSeriesX) as in project.metafile declaration -# Builds/Tests are made on each supported editor as in project.metafile declaration +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible for Console platform test validation. + # Those tests cover both PlayMode and EditMode tests from package test assemblies. -# For SOME of the console devices it's necessary to split build and run phases so it was split for all -# For all consoles we need to use il2cpp scripting backend (so no testing with mono) -# Switch works only with ARM64 and the rest with x64 architectures -# For now all platforms used for building are windows based +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs are generated using nested loops (separate build phase and run phase). Worth noting that run phase uses the build as dependency: + # 1. For all console platform (Switch, ps4, ps5, xbox360, xboxOne) + # 2. For all supported Unity Editor versions (for NGOv1.X this means 2021.3+ editors) + # 3. For the default project. -# Builds are made with x64 architecture machines since those are compatible to run on ARM64 devices +# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- + # For console devices a split is required into two phases: + # 1. Build Phase: Creates standalone players for console platforms + # 2. Run Phase: Executes runtime tests on actual console devices + # The Run phase uses build job as dependency + + # Note: More of a Unity specific but test assemblies need to be included in the build phase command + # Note: All builds can be made on x64 machines since those are compatible with ARM64 target devices + +# PLATFORM SPECIFICS----------------------------------------------------------------- + # Common Requirements: + # All consoles require IL2CPP scripting backend + # Platform-specific SDK environment variables + + # Platform-Specific: + # Switch: ARM64 architecture only + # Other Consoles: x64 architecture + # Each console requires specific SDK paths and tools + +# QUALITY THOUGHTS-------------------------------------------------------------------- + # TODO: consider adding all projects that have tests + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + + + +# BUILD PHASE CONFIGURATION------------------------------------------------------------------------------------ {% for project in projects.default -%} {% for platform in test_platforms.console_build -%} {% for editor in validation_editors.all -%} -build_{{ project.name }}_{{ platform.name }}_{{ editor }}: +console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: name: Build {{ project.name }} - [{{ platform.name }}, {{ editor }}, il2cpp{% if platform.name == "switch" %}, arm64{% endif %}] agent: type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - # Installing tools. unity-downloader-cli and utr should be already preinstalled on the image - - sudo pip install unity-downloader-cli - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --fast --wait - - # Platform specific Build + - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} - 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 --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 - variables: # PS4 related SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00' @@ -52,11 +72,11 @@ build_{{ project.name }}_{{ platform.name }}_{{ editor }}: -# Executes RuntimeTests of the NGO package in the Standalone build for consoles +# RUN PHASE CONFIGURATION------------------------------------------------------------------------------------ {% for project in projects.default -%} {% for platform in test_platforms.console_test -%} {% for editor in validation_editors.all -%} -run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}: +console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: name: Run {{ project.name }} Tests - [{{ platform.name }}, {{ editor }}, il2cpp] agent: type: {{ platform.type }} @@ -66,13 +86,8 @@ run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}: model: {{ platform.model }} {% endif %} commands: - # Installing tools. - - sudo pip install unity-downloader-cli - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --fast --wait - - # Platform specific Execution + - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} - UnifiedTestRunner --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 - variables: # PS4 related SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00' @@ -88,7 +103,7 @@ run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}: paths: - "test-results/**/*" dependencies: - - .yamato/console-standalone-test.yml#build_{{ project.name }}_{{ platform.name }}_{{ editor }} + - .yamato/console-standalone-test.yml#console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }} {% endfor -%} {% endfor -%} {% endfor -%} \ No newline at end of file From fed9f937f63b5c752551130b8aa10870fc1fbfdc Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 12:58:27 +0100 Subject: [PATCH 25/53] Added desktop-standalone comments --- .yamato/desktop-standalone-tests.yml | 76 +++++++++++++++++++--------- 1 file changed, 52 insertions(+), 24 deletions(-) diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index 736d19c945..ce9e68f9c1 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -1,14 +1,34 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Builds a player on desktop standalone platform and executes RuntimeTests (equivalent to PlayMode tests) of the NGO package in the Standalone build. -# Default project (testptoject) in this case is used as a context. -# Builds are made on each desktop platform as in project.metafile declaration -# Builds are made on each supported editor as in project.metafile declaration -# Builds are made with different scripting backends as in project.metafile declaration -# ARM64 architectures are for now not considered since Windows_arm64 is recommended to use only after builds (would require separation here) and when it comes to macOS_arm64 there is problem with OpenCL not being available +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible for Desktop platform test validation. + # Those tests cover both PlayMode and EditMode tests from package test assemblies. -# Build phase +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs are generated using nested loops (separate build phase and run phase). Worth noting that run phase uses the build as dependency: + # 1. For all desktop platform (Windows, macOS, Ubuntu) + # 2. For all supported Unity Editor versions (for NGOv1.X this means 2021.3+ editors) + # 3. For the default project. + # 4. For all scripting backends (mono, il2cpp) + +# 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: + # 1. Build Phase: Creates standalone players for desktop platforms + # 2. Run Phase: Executes runtime tests on actual desktop devices + # The Run phase uses build job as dependency + + # Note: More of a Unity specific but test assemblies need to be included in the build phase command + # Note: All builds can be made on x64 machines since those are compatible with ARM64 target devices + +# QUALITY THOUGHTS-------------------------------------------------------------------- + # TODO: consider adding all projects that have tests + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + +#----------------------------------------------------------------------------------- + + +# BUILD PHASE CONFIGURATION------------------------------------------------------------------------------------ {% for project in projects.default -%} {% for platform in test_platforms.desktop -%} {% for editor in validation_editors.all -%} @@ -19,15 +39,9 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ type: {% if platform.name == "mac" %} {{ platform.type }} {% else %} {{ platform.type }}::GPU {% endif %} image: {{ platform.image }} flavor: {{ platform.flavor }} - commands: - - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - -# Installing editor - - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --fast --wait - -# Build Player + commands: + - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 - artifacts: players: paths: @@ -35,7 +49,6 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ logs: paths: - "artifacts/**/*" - dependencies: - .yamato/project-pack.yml#project_pack_-_{{ project.name }}_{{ platform.name }} {% endfor -%} @@ -46,7 +59,7 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ -# Run phase +# RUN PHASE CONFIGURATION------------------------------------------------------------------------------------ {% for project in projects.default -%} {% for platform in test_platforms.desktop -%} {% for editor in validation_editors.all -%} @@ -57,15 +70,30 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ type: {% if platform.name == "mac" %} {{ platform.type }} {% else %} {{ platform.type }}::GPU {% endif %} image: {{ platform.image }} flavor: {{ platform.flavor }} - commands: -{% if editor == "2021.3" and platform.name == "ubuntu" %} - - sudo apt-get install -y libssl1.1 # For this specific configuration there is a difference in what libssl version is installed on the image and what editor uses. This should be removed when 2021 editor is out of support + +# Set additional variables for running the echo server +{% if platform.name != "win" %} + variables: + ECHO_SERVER_PORT: "7788" + # Set this to ensure the DA codec tests will fail if they cannot connect to the echo-server + # The default is to ignore the codec tests if the echo-server fails to connect + ENSURE_CODEC_TESTS: "true" {% endif %} - - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple # Installing unity downloader - - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --fast --wait # Installing appropriate Unity version for the test case. Important to note is the fact that even though we have a build we still need the editor to run tests -# Running Standalone desktop tests + commands: + - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} - UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 + + # If ubuntu, run rust echo server +{% if platform.name != "win" %} + - git clone https://github.com/Unity-Technologies/mps-common-multiplayer-backend.git + # Install rust + - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + # Build the echo server + - cd ./mps-common-multiplayer-backend/runtime && $HOME/.cargo/bin/cargo build --example ngo_echo_server + # Run the echo server in the background - this will reuse the artifacts from the build + - cd ./mps-common-multiplayer-backend/runtime && $HOME/.cargo/bin/cargo run --example ngo_echo_server -- --port $ECHO_SERVER_PORT & +{% endif %} artifacts: logs: From 76a05f996cbf19f98a2b629e63e34f8dc79cf3c5 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 13:01:45 +0100 Subject: [PATCH 26/53] Added mobile-standalone comments --- .yamato/mobile-standalone-test.yml | 91 ++++++++++++++++-------------- 1 file changed, 50 insertions(+), 41 deletions(-) diff --git a/.yamato/mobile-standalone-test.yml b/.yamato/mobile-standalone-test.yml index 4d80282a1b..6cb1f95845 100644 --- a/.yamato/mobile-standalone-test.yml +++ b/.yamato/mobile-standalone-test.yml @@ -1,33 +1,52 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- - -# Builds a player on mobile standalone platform and executes RuntimeTests (equivalent to PlayMode tests) of the NGO package in the Standalone build. -# Default project (testptoject) in this case is used as a context. -# Builds/Tests are made on each mobile platform (Android and iOS) as in project.metafile declaration -# Builds/Tests are made on each supported editor as in project.metafile declaration - -# For mobile devices it's necessary to split build and run phases -# For iOS we need to use il2cpp. For android we could use both but il2cpp is recommended so for now we will only use il2cpp as scripting backend -# iOS works only with ARM64 and Android is tested with both ARM64 and ARMv7 -# Builds are made with x64 architecture machines since those are compatible to run on ARM64 devices +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible for Mobile platform test validation. + # Those tests cover both PlayMode and EditMode tests from package test assemblies. + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs are generated using nested loops through: + # 1. For all mobile platform (Android, iOS) + # 2. For all supported Unity Editor versions (for NGOv1.X this means 2021.3+ editors) + # 3. For the default project. + +# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- + # For mobile devices a split is required into two phases: + # 1. Build Phase: Creates standalone players for mobile platforms + # 2. Run Phase: Executes runtime tests on actual mobile devices + # The Run phase uses build job as dependency + # Note: More of a Unity specific but test assemblies need to be included in the build phase command + # Note: All builds can be made on x64 machines since those are compatible with ARM64 target devices + +# PLATFORM SPECIFICS-------------------------------------------------------------------- + # iOS Requirements: + # Must use IL2CPP scripting backend + # Only supports ARM64 architecture + # Builds on macOS agents only + + # Android Requirements: + # Uses IL2CPP scripting backend (recommended over Mono) + # Supports both ARM64 and ARMv7 architectures + # Can be built on any desktop platform + +# QUALITY CONSIDERATIONS-------------------------------------------------------------------- + # TODO: consider adding all projects that have tests + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + + +# BUILD PHASE CONFIGURATION------------------------------------------------------------------------------------ {% for project in projects.default -%} {% for platform in test_platforms.mobile_build -%} {% for editor in validation_editors.all -%} mobile_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: - name: Build {{ project.name }} - [{{ platform.name }}, {{ editor }}, il2cpp] + name: Build {{ project.name }} - [{{ platform.name }}, {{ editor }}, il2cpp] agent: - type: {{ platform.type }} - image: {{ platform.image }} - flavor: {{ platform.flavor }} + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor }} commands: - # Installing tools - - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - # Installing editor - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} --fast --wait - - # Platform specific Build + - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 artifacts: players: @@ -36,16 +55,12 @@ mobile_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: logs: paths: - "artifacts/**/*" - - variables: - CI: true - ENABLE_BURST_COMPILATION: False {% endfor -%} {% endfor -%} {% endfor -%} -# Executes RuntimeTests of the NGO package in the Standalone build for mobiles +# RUN PHASE CONFIGURATION------------------------------------------------------------------------------------ {% for project in projects.default -%} {% for platform in test_platforms.mobile_test -%} {% for editor in validation_editors.all -%} @@ -58,32 +73,26 @@ mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: {% if platform.model %} model: {{ platform.model }} {% endif %} - # Skip repository cloning - skip_checkout: true commands: - # Installing tools - - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - # Installing editor. We still need the editor to run tests on standalone build - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} --fast --wait - + # Installing editor. We still need the editor to run tests on standalone build and for that the Editor is required + - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} + {% if platform.standalone == "Android" %} # Download standalone UnityTestRunner and ADB setup - - command: curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat - command: wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey.pub -O %USERPROFILE%/.android/adbkey.pub - command: wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey -O %USERPROFILE%/.android/adbkey - command: gsudo NetSh Advfirewall set allprofiles state off - + # Connect to Android device - command: '"%ANDROID_SDK_ROOT%\platform-tools\adb.exe" connect %BOKKEN_DEVICE_IP%' - - # Run tests + + # Run tests for Android devices - | set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP% UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --editor-location=.Editor --player-connection-ip=%BOKKEN_HOST_IP% --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=3600 {% else %} - - # Run tests + + # Run tests for non-Android devices - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --editor-location=.Editor --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=3600 {% endif %} artifacts: From f0dde52c4ea9f3032b48f3ca1da3afdb2f4d2f38 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 13:04:01 +0100 Subject: [PATCH 27/53] Added package-pack comments --- .yamato/package-pack.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.yamato/package-pack.yml b/.yamato/package-pack.yml index a9ab902847..cefa255eec 100644 --- a/.yamato/package-pack.yml +++ b/.yamato/package-pack.yml @@ -1,9 +1,28 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Packs Netcode for GameObjects together with performing initial checks. -# For this job no specific platform support and no running Unity instance is required so small agent (as per project.metafile definition) could be used to save resources and speed up the process. -# If everyone adheres to this rule it can create bottlenecks (since everyone would use this machine) so we decided to pack with the same platform as the given job runs on +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible for packing a specific package. It generates package artifacts (.tgz) required for testing and publishing, ensuring all dependencies are properly bundled and validated before any test execution. + # The job itself doesn't test anything specific but rather it prepares project packages that will be consumed by other pipeline jobs. + # The job performs additional validation by using Package Verification Pipeline (PVP). It includes x-ray validation for quick package structure verification + # Because of that validation we can detect errors at the early stage of testing so not to waste CI resources + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs are generated using nested loops through: + # 1. For all desktop platforms (Windows, Ubuntu, macOS) + +# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- + # Job does not require Unity Editor in order to perform packing. + # Job uses PVP x-ray for lightweight validation + # Job generates both packages artifacts and pvp-results file. + # In theory, we could just use one platform for packing projects (for example ubuntu) but in order to reduce confusion we are using same platform as the job utilizing project pack as dependency. + +# QUALITY CONSIDERATIONS-------------------------------------------------------------------- + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + # TODO: we should aim to replace target PVP profile from supported to gold + +#------------------------------------------------------------------------------------ + {% for platform in test_platforms.desktop -%} package_pack_-_ngo_{{ platform.name }}: name: Package Pack (and x-ray) - NGO [{{ platform.name }}] From ea8457cc67ccec23e87686e5a936ff4d5db22ec9 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 13:05:03 +0100 Subject: [PATCH 28/53] Added package-pack comments and modifications --- .yamato/package-tests.yml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.yamato/package-tests.yml b/.yamato/package-tests.yml index ae00d50f83..2342ffb1c7 100644 --- a/.yamato/package-tests.yml +++ b/.yamato/package-tests.yml @@ -1,9 +1,29 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Executes PlayMode and EditMode tests of the NGO package in the Editor context -# Those tests run in the editor so we don't need to consider different scripting backends or architectures -# Tests are executed for all supported editors on each desktop platform as in project.metafile declaration +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible for execution of package-specific tests in Unity Editor context + # Those tests cover both PlayMode and EditMode tests from package test assemblies + # Additionally it combines Package Verification Pipeline (PVP) validation. This ensures that package is compatible with Unity standards + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs are generated using nested loops through: + # 1. For all desktop platforms (Windows, Ubuntu, macOS) + # 2. For all supported Unity Editor versions (for NGOv1.X this means 2021.3+ editors) + +# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- + # This job runs in Editor context only (no player builds required) + # No scripting backend variations needed (Editor context) + # Architecture variations not applicable (Editor context) + # Requires project packaging as prerequisite (dependency job) + # Uses PVP for package validation. Specifically it looks for supported profiles which we should conform to but takes ./pvpExceptions.json file into consideration where we note our known issues related to PVP checks + +# QUALITY CONSIDERATIONS-------------------------------------------------------------------- + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + # TODO: we should aim to replace target PVP profile from supported to gold + +#------------------------------------------------------------------------------------ + {% for platform in test_platforms.desktop -%} {% for editor in validation_editors.all -%} package_test_-_ngo_{{ editor }}_{{ platform.name }}: @@ -17,13 +37,14 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}: UNITY_EXT_LOGGING: 1 commands: - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait - - # Validate packages. + + # Validate PVP checks for package. - upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --results pvp-results - upm-pvp require {% if platform.name == "win" %}"%XRAY_PROFILE%"{% else %}"$XRAY_PROFILE"{% endif %} --results pvp-results + # Run UTR to test packages. - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --unity .Editor - - {% if platform.name == "ubuntu" %}DISPLAY=:0 {% endif %} UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --artifacts-path=test-results "--ff={ops.upmpvpevidence.enable=true}" --extra-editor-arg=-testCategory --extra-editor-arg=!Performance --reruncount=1 --clean-library-on-rerun + - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --artifacts-path=test-results "--ff={ops.upmpvpevidence.enable=true}" --reruncount=1 --clean-library-on-rerun artifacts: logs: paths: From ac49aac686d3eaf2402e7cd285a5e18ddf5829cf Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 13:06:47 +0100 Subject: [PATCH 29/53] Added performance tests comments and modifications --- .yamato/performance-tests.yml | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.yamato/performance-tests.yml b/.yamato/performance-tests.yml index db17a4120c..1a5fb82f6e 100644 --- a/.yamato/performance-tests.yml +++ b/.yamato/performance-tests.yml @@ -1,8 +1,27 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Performance tests for the `com.unity.netcode.gameobjects` package. No performance data will be reported. -# Performance tests are executed within editor on desktop platforms in context of default project (testproject) +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible for executing performance tests for NGO package. + # Its configuration is set to not report any data but just to give results (at least in current state since we don't have any tests to run). + # Currently, because of lack of performance tests this job will always return "no tests have been selected" and because oif that it's not included in any trigger jobs. + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs configurations are generated using nested loops through: + # 1. For all desktop platforms (Windows, Ubuntu, macOS) + # 2. For all supported Unity Editor versions (For NGOv1.X it means 2021.3+) + # 3. For the default project (project is used only as a context for the build). TODO-comment: if performance tests would be included in projects then we should make an appropriate split. + +# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- + # Tests are run in Editor context only + # No performance metrics are reported to monitoring systems + +# QUALITY CONSIDERATIONS-------------------------------------------------------------------- + # TODO: Currently NGO don't have any performance tests so this job is a placeholder for the future. We should discuss how to approach the topic of performance testing + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + +#------------------------------------------------------------------------------------ + {% for platform in test_platforms.desktop -%} {% for editor in validation_editors.all -%} {% for project in projects.default -%} @@ -13,32 +32,13 @@ performance_editor_tests_-_NGO_{{ platform.name }}_{{ editor }}_no_data_reportin image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - # Installing tools -{% if platform.name == "ubuntu" %} - - sudo apt-get update -q - - sudo apt install -qy imagemagick -{% endif %} - - - npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - # Installing editor - - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait - - # Build Player - - UnifiedTestRunner --suite=editor --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --timeout=3600 --artifacts-path=artifacts --extra-editor-arg=-assemblyNames --extra-editor-arg=Unity.NetCode.* --extra-editor-arg=-testCategory --extra-editor-arg=Performance --extra-editor-arg=-enablePackageManagerTraces --reruncount=1 --clean-library-on-rerun --dontreportperformancedata - + - unity-downloader-cli -u {{ editor }} -c Editor # Installing basic editor + - UnifiedTestRunner --suite=editor --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --timeout=3600 --artifacts-path=artifacts --extra-editor-arg=-assemblyNames --extra-editor-arg=Unity.NetCode.* --extra-editor-arg=-testCategory --extra-editor-arg=Performance --extra-editor-arg=-enablePackageManagerTraces --reruncount=1 --clean-library-on-rerun --dontreportperformancedata + # TODO: when performance tests will be present we need to add actual execution of this test artifacts: logs: paths: - - '*.log' - - '*.xml' - - artifacts/**/* - - {{ project.name }}/Logs/** - - {{ project.name }}/Library/*.log - - {{ project.name }}/*.log - - {{ project.name }}/Builds/*.log - - build/test-results/** + - "artifacts/**/*" {% endfor -%} {% endfor -%} {% endfor -%} \ No newline at end of file From 3174cf403b323c58eee2780f4f73e5e3f25ecfd0 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 13:10:12 +0100 Subject: [PATCH 30/53] project.metafile comments --- .yamato/project.metafile | 49 ++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/.yamato/project.metafile b/.yamato/project.metafile index 960e48835e..ccb659fed3 100644 --- a/.yamato/project.metafile +++ b/.yamato/project.metafile @@ -1,4 +1,22 @@ -# The small agent was created to handle jobs that don't involve running Unity (for example pack job). +# DESCRIPTION----------------------------------------------------------------------------------------------------------------- + # This file is the central configuration file defining test environments, platforms, projects, editors and other parameters used. + # Data from this file is used to generate CI pipeline configurations through templating in other .yamato/ files. + # This provides consistent environment definitions across all CI jobs. It's easier to modify values in central place (for example image reference) than having to modify every job + +# VALUE MEANING---------------------------------------------------------------------------------------------------------------------------- + # Usual fields being defined are + # name --> Identifier used to distinguish different configurations in the CI pipeline + # type --> Specifies the Bokken agent type (e.g., Unity::VM, Unity::VM::osx, Unity::mobile::shield) + # image --> Defines the package-ci Bokken image to use for the environment (e.g., package-ci/ubuntu-22.04:v4). This is basically a device configuration + # flavor --> Determines the VM size/resources (e.g., b1.small, b1.large, m1.mac) + # standalone --> Specifies the build target platform (e.g., StandaloneLinux64, Android, IOS) + # model --> Defines specific hardware model requirements (e.g., rtx2080, SE for iPhone SE) + # base --> Indicates the base operating system for build operations (e.g., win, mac) + # architecture --> Specifies the target CPU architecture (e.g., armv7, arm64) + + +# SMALL AGENT CONFIGURATION--------------------------------------------------------------------------------------------------- +# The small agent was created to handle jobs that don't involve running Unity and are in general super light when it comes to resource usage (for example pack job). # It uses ubuntu since Linux VMs are faster and cheaper to provision than Mac or Windows Virtual Machines (VMs). # The b1.small flavour is nearly always sufficient for jobs that don’t involve running Unity Editor. small_agent_platform: @@ -7,7 +25,13 @@ small_agent_platform: image: package-ci/ubuntu-22.04:v4 flavor: b1.small -# Platforms that project will/can be tested on. + +# PLATFORM CONFIGURATIONS---------------------------------------------------------------------------------------------------------------- +# test_platforms specifies platforms that project will/can be tested on. +# For desktops we include Windows, Ubuntu and Mac, for mobiles we include Android and iOS, for consoles we include ps4, ps5, switch, xbox360 and xboxOne +# For mobile and console a split was required for build and test jobs and this is also applied for desktops for consistency (though for desktop this split is not required) + + test_platforms: # Default platform is used for all basic jobs. Ubuntu was chosen since it's fastest and most available default: @@ -35,6 +59,7 @@ test_platforms: flavor: m1.mac standalone: StandaloneOSX # For mobile devices there is a split between the build and run phase so there is a need of splitting specification for both + # TODO: For android we could consider adding ARM64 configuration mobile_build: - name: android type: Unity::VM @@ -43,7 +68,7 @@ test_platforms: standalone: Android base: win architecture: armv7 - # iOS modern builds are ARM64-only, thus no testing with armv7 (as in android case) + # iOS modern builds are ARM64-only, thus no testing with armv7 - name: ios-arm64 type: Unity::VM::osx image: package-ci/macos-13:v4 @@ -121,9 +146,10 @@ test_platforms: flavor: b1.large standalone: GameCoreScarlett - -# Editors to be used for testing. -# Since NGOv2 official support started from U6 it means that only those editors should be used for testing +# EDITOR CONFIGURATIONS------------------------------------------------------------------------------- +# Editors to be used for testing. NGOv1.X official support started from 2021.3 editor +# TODO: When a new editor will be released it should be added to this list. Correct also if we will stop supporting one of the editors present here + validation_editors: default: - trunk @@ -135,15 +161,18 @@ validation_editors: - trunk -# Scripting backends used by Standalone RunTimeTests +# Scripting backends used by Standalone RunTimeTests--------------------------------------------------- + scripting_backends: - mono - il2cpp -# Projects within the repository that will be tested. Name will be used -# for job ids, so it should not contain spaces/non-supported characters -# The default project will also be used for validation, code coverage etc. +# PROJECTS CONFIGURATIONS------------------------------------------------------------------------------- +# Projects within the repository that will be tested/build. +# The default project should be used for general validation, code coverage and other tests where choice of project should not matter (because we are interested in NGO package) +# has_tests --> describes if projects contains any tests to run. + projects: default: - name: testproject From 5923ae5acf9bd600da378a2658784934f1461ee5 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 13:11:12 +0100 Subject: [PATCH 31/53] project-pack comments --- .yamato/project-pack.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.yamato/project-pack.yml b/.yamato/project-pack.yml index 0963d99271..8fe8d2b41b 100644 --- a/.yamato/project-pack.yml +++ b/.yamato/project-pack.yml @@ -1,9 +1,26 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Jobs that iterate through and packs all NGO projects listed (to use in different jobs) -# For this job no specific platform support and no running Unity instance is required so small agent (as per project.metafile definition) coul be used to save resources and speed up the process -# If everyone adheres to this rule it can create bottlenecks (since everyone would use this machine) so we decided to pack project with the same platform as the given job runs on +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible for packing a specific project. It generates package artifacts (.tgz) required for testing and publishing, ensuring all dependencies are properly bundled and validated before any test execution. + # The job itself doesn't test anything specific but rather it prepares project packages that will be consumed by other pipeline jobs. + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs configurations are generated using nested loops through: + # 1. For all projects (testproject, minimalproject, testproject-tools-integration). + # 2. For all desktop platforms (Win, Ubuntu, Mac) + +# TECHNICAL CONSIDERATIONS-------------------------------------------------------------------- + # Job does not require Unity Editor in order to perform packing. + # In theory, we could just use one platform for packing projects (for example ubuntu) but in order to reduce confusion we are using same platform as the job utilizing project pack as dependency. + +# QUALITY CONSIDERATIONS-------------------------------------------------------------------- + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + # TODO: Currently upm-ci is being used but in the future it will be replaced by upm-pvp. Additionally this would allow us to run PVP checks on projects + + +#-------------------------------------------------------------------------------------- + {% for project in projects.all -%} {% for platform in test_platforms.desktop -%} project_pack_-_{{ project.name }}_{{ platform.name }}: @@ -13,7 +30,7 @@ project_pack_-_{{ project.name }}_{{ platform.name }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it - upm-ci project pack --project-path {{ project.path }} artifacts: packages: From d4a6ea6ed218313ec8984c81eb20c070a4a6a267 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 13:12:51 +0100 Subject: [PATCH 32/53] project-standards comments --- .yamato/project-standards.yml | 45 +++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/.yamato/project-standards.yml b/.yamato/project-standards.yml index 0bb442971e..948873171e 100644 --- a/.yamato/project-standards.yml +++ b/.yamato/project-standards.yml @@ -1,9 +1,32 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Project standards are being checked for package (in project context). -# It should be enough to perform the test on default project (testproject) but to make sure that all projects conform to our standards job for each of them will be available. -# Tests are executed for default editor (trunk) on default platform (ubuntu) as in project.metafile declaration since results would be the same across editors and platforms. +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible for validating project compliance with NGO coding standards and conventions + # Standards validation includes: + # Code formatting compliance + # Project structure validation + # Coding convention adherence + # Solution file synchronization + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs configurations are generated using nested loops through: + # 1. For all NGO projects (testproject, testproject-tools-interation, minimalproject) + # 2. For default platform only (Ubuntu) since standards would not vary between platforms (no need for checks on more platforms) + # 3. For default editor version (trunk) since standards would not vary between editors (no need for checks on more editors) + +# TECHNICAL CONSTRAINTS--------------------------------------------------------------- + # Requires .NET SDK installed (should be preinstalled on the image so we just check for version) + # Needs Unity Editor for solution synchronization + # Uses custom standards validation tool (netcode.standards) + # Generates no test artifacts (pass/fail only). Eventual failure will be visible in the logs + +# QUALITY THOUGHTS-------------------------------------------------------------------- + # While testproject validation would be sufficient, since it validates both project and package (where package is our main concern) jobs for all projects are being generated to ensure that we conform to quality standards in all projects. + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + +#------------------------------------------------------------------------------------ + {% for project in projects.all -%} {% for platform in test_platforms.default -%} {% for editor in validation_editors.all -%} @@ -14,17 +37,13 @@ standards_{{ platform.name }}_{{ project.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - # .NET environment setup + # .NET environment setup. Ensures required .NET SDK and formatting tools are available - dotnet --version - dotnet format --version - - # Unity setup - - pip install unity-downloader-cli --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - unity-downloader-cli -u {{ editor }} -c editor --wait --fast - - .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ project.path }} -quit - - # Standards check - - dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --check + + - unity-downloader-cli -u {{ editor }} -c editor # Downloads basic editor + - .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ project.path }} -quit # This command is used to invoke Unity in a "headless" mode. It's used to sync the project + - dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --check # Runs standards check {% endfor -%} {% endfor -%} {% endfor -%} \ No newline at end of file From a2f7491e8114a559294067461c43d25ec3670df7 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 13:14:03 +0100 Subject: [PATCH 33/53] project-tests comments and modifications --- .yamato/project-tests.yml | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/.yamato/project-tests.yml b/.yamato/project-tests.yml index ec91e04540..f0872c76a9 100644 --- a/.yamato/project-tests.yml +++ b/.yamato/project-tests.yml @@ -1,10 +1,29 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Executes PlayMode and EditMode tests of the given project (ones that have tests) in the Editor context -# Those tests don't include NGO package tests since they are handled on their respective jobs. -# Those tests run in the editor so we don't need to consider different scripting backends or architectures -# Tests are executed for all supported editors on each desktop platform as in project.metafile declaration +# DESCRIPTION-------------------------------------------------------------------------- + # This job executes project-specific tests in Unity Editor context + # Those tests cover both PlayMode and EditMode tests from project test assemblies + # NGO package tests are NOT being executed within this job (those are handled in separate package test jobs) + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs configurations are generated using nested loops through: + # 1. For all projects WITH TESTS (filtered by has_tests flag) (testproject, testproject-tools-interation) [For more info look into project.metafile configuration] + # 2. For all desktop platforms (Windows, Ubuntu, macOS) + # 3. For all supported Unity Editor versions (for NGOv1.X this means 2021.3+ editors) + +# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- + # This job runs in Editor context only (no player builds is required) + # No scripting backend variations needed (Editor context) + # Architecture variations not applicable (Editor context) + # Requires project packaging as prerequisite (dependency job) + +# QUALITY CONSIDERATIONS-------------------------------------------------------------------- + # TODO: Currently upm-ci is being used but in the future it will be replaced by upm-pvp + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + +#------------------------------------------------------------------------------------ + {% for project in projects.all -%} {% if project.has_tests == "true" -%} {% for platform in test_platforms.desktop -%} @@ -16,9 +35,9 @@ test_{{ project.name }}_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait - - {% if platform.name == "ubuntu" %}DISPLAY=:0 && {% endif %}upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg="--extra-editor-arg=-testCategory --extra-editor-arg=!Performance --reruncount=1 --clean-library-on-rerun" + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it + - unity-downloader-cli -u {{ editor }} -c Editor # Installing basic editor for tests execution + - upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg="--reruncount=1 --clean-library-on-rerun" # project tests execution via upm-ci artifacts: logs: paths: From 325292718da54ae0006fac26dd16b16d6fc4be61 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 13:15:15 +0100 Subject: [PATCH 34/53] project-updated-dependencies comments --- .yamato/project-updated-dependencies-test.yml | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.yamato/project-updated-dependencies-test.yml b/.yamato/project-updated-dependencies-test.yml index cdc44c9e8e..11f05ea541 100644 --- a/.yamato/project-updated-dependencies-test.yml +++ b/.yamato/project-updated-dependencies-test.yml @@ -1,9 +1,28 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Executes package tests for each package referenced in the project using the newest compatible version of the package dependencies. -# This is just to ensure that no critical change is made. It will be run on a default editor and default platform (it can be discussed if we should run it per all editors and platforms) -{% for project in projects.default -%} +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible fo validating package compatibility with latest dependency versions. + # This helps detect potential breaking changes from dependency updates early + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs configurations are generated using nested loops through: + # 1. For all projects (testproject, minimalproject, testproject-tools-integration). + # 2. For all desktop platforms (Win, Ubuntu, Mac) + # 3. For all supported editors (For NGOv1.X it means 2021.3+) + +# TECHNICAL CONSIDERATIONS---------------------------------------------------------------- + # This job requires successful project packaging before execution (job dependency) + # This job tests only NGO package dependencies (com.unity.netcode.gameobjects) + # The results are being generated in upm-ci~/test-results directory (specific of upm-ci) + +# QUALITY CONSIDERATIONS--------------------------------------------------------------------- + # TODO: Currently upm-ci is being used but in the future it will be replaced by upm-pvp + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + +#-------------------------------------------------------------------------------------- + +{% for project in projects.all -%} {% for platform in test_platforms.desktop -%} {% for editor in validation_editors.all -%} updated-dependencies_{{ project.name }}_NGO_{{ platform.name }}_{{ editor }}: @@ -13,15 +32,14 @@ updated-dependencies_{{ project.name }}_NGO_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it - upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type updated-dependencies-tests --package-filter com.unity.netcode.gameobjects artifacts: logs: paths: - "upm-ci~/test-results/**/*" dependencies: - - path: .yamato/project-pack.yml#project_pack_-_{{ project.name }}_{{ platform.name }} - rerun: always + - .yamato/project-pack.yml#project_pack_-_{{ project.name }}_{{ platform.name }} {% endfor -%} {% endfor -%} {% endfor -%} From dd812670f373e1dce5dff9eb60ab078a63cc75ee Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 13:16:41 +0100 Subject: [PATCH 35/53] webgl-build comments --- .yamato/webgl-build.yml | 54 +++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/.yamato/webgl-build.yml b/.yamato/webgl-build.yml index aa809701c6..eac41210fd 100644 --- a/.yamato/webgl-build.yml +++ b/.yamato/webgl-build.yml @@ -1,40 +1,52 @@ -{% metadata_file .yamato/project.metafile %} +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. --- -# Builds a player on WebGl standalone platform without executing any tests. -# This setup performs build-only validation since WebGL runs in browser and for tests to be executed we would need to -# consider having a web server, browser automation and overall complex test setup. -# Default project (testptoject) in this case is used as a context. -# WebGL requires Il2cpp scripting backend so mono is not considered -# ARM64 architectures are not considered since Windows_arm64 is recommended to use only after builds and when it comes to macOS_arm64 there is problem with OpenCL not being available -# Builds are made on each desktop platform as in project.metafile declaration +# DESCRIPTION-------------------------------------------------------------------------- + # This job is responsible for validating a successful building of a player on WebGl standalone platform. + # This job WILL NOT execute any tests, we only validate the building process. + # This is because WebGL runs in browser and for tests to be executed we would need to consider having a web server, browser automation and overall complex test setup which currently we don't have. + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Jobs configurations are generated using nested loops through: + # 1. For the default project (project is used only as a context for the build). + # 2. For all desktop platforms (Windows, Ubuntu, macOS) + # 3. For all supported Unity Editor versions (For NGOv1.X it means 2021.3+) + +# TECHNICAL CONSIDERATIONS---------------------------------------------------------------- + # WebGL requires IL2CPP scripting backend (Mono is not supported) + # We are not using ARM64 architectures since we only perform a build action. x64 architectures are preferred for build phase (in order to optimize available resource usage) + # We only perform build validation (no runtime testing) + +# QUALITY CONSIDERATIONS-------------------------------------------------------------------- + # In the future we could try to implement an infrastructure to run test in webgl context but this could be quite complicated and would need to be evaluated if it's worth it + # To see where this job is included (in trigger job definitions) look into _triggers.yml file + +#-------------------------------------------------------------------------------------- + {% for project in projects.default -%} {% for platform in test_platforms.desktop -%} {% for editor in validation_editors.all -%} webgl_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: name: WebGl Build - {{ project.name }} [{{ platform.name }}, {{ editor }}, il2cpp] agent: - type: {% if platform.name == "mac" %} {{ platform.type }} {% else %} {{ platform.type }}::GPU {% endif %} + type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - # Installing tools - - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - # Installing editor - - unity-downloader-cli -u {{ editor }} -c Editor -c webgl -c il2cpp -w --fast - - # Build Player - - UnifiedTestRunner --suite=playmode --platform=WebGL --scripting-backend=il2cpp --testproject={{ project.path }} --editor-location=.Editor --artifacts_path=artifacts --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg="-cloudEnvironment staging" --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 - + - unity-downloader-cli -u {{ editor }} -c Editor -c webgl -c il2cpp # Downloading the editor with additional webgl and il2cpp components + + # The following step builds the player with defined options such as: + # Suite parameter if defined since it's a mandatory field to define which test suite should be used, but it doesn't matter in this case since we won't run any tests (--suite) + # Editor is run in batchmode, which means that Unity runs command line arguments without the need for human interaction. It also suppresses pop-up windows that require human interaction (such as the Save Scene window). We should always run Unity in batch mode when using command line arguments, because it allows automation to run without interruption. (--extra-editor-arg=-batchmode) + # Engine is initialized in ‘nographics’ mode since we don't need any graphics for this case (--extra-editor-arg=-nographics) + # In case of failure the job will be rerunned once (--reruncount=1) with clean library (--clean-library-on-rerun) + # This will perform only building phase (--build-only) with a timeout of 3m (--timeout=1800) + - UnifiedTestRunner --suite=playmode --platform=WebGL --scripting-backend=il2cpp --testproject={{ project.path }} --editor-location=.Editor --artifacts_path=artifacts --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 artifacts: logs: paths: - "artifacts/**/*" - "build/players/**/*" - variables: - CI: true - ENABLE_BURST_COMPILATION: False {% endfor -%} {% endfor -%} {% endfor -%} From 65715c39ff1f0918ee48a1831172eb98af19ad1a Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 16:26:25 +0100 Subject: [PATCH 36/53] Readme file name change --- .yamato/{CI_README.md => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .yamato/{CI_README.md => README.md} (100%) diff --git a/.yamato/CI_README.md b/.yamato/README.md similarity index 100% rename from .yamato/CI_README.md rename to .yamato/README.md From 5aaaf9d856d0c6765569b7a1bffe5f43509d1fa3 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 17:28:17 +0100 Subject: [PATCH 37/53] Added --wait flag when downloading editor --- .yamato/code-coverage.yml | 2 +- .yamato/console-standalone-test.yml | 4 ++-- .yamato/desktop-standalone-tests.yml | 4 ++-- .yamato/mobile-standalone-test.yml | 4 ++-- .yamato/package-tests.yml | 2 +- .yamato/performance-tests.yml | 2 +- .yamato/project-standards.yml | 2 +- .yamato/project-tests.yml | 2 +- .yamato/webgl-build.yml | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index f339f5c4b6..b85532ebdc 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -34,7 +34,7 @@ code_coverage_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - unity-downloader-cli -u {{ editor }} -c Editor + - unity-downloader-cli -u {{ editor }} -c Editor --wait - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage -coverage-results-path=$PWD/test-results/CodeCoverage --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results artifacts: diff --git a/.yamato/console-standalone-test.yml b/.yamato/console-standalone-test.yml index 13f44dd910..378d8ff66a 100644 --- a/.yamato/console-standalone-test.yml +++ b/.yamato/console-standalone-test.yml @@ -47,7 +47,7 @@ console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} + - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --wait - 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 --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 variables: # PS4 related @@ -86,7 +86,7 @@ console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: model: {{ platform.model }} {% endif %} commands: - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} + - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --wait - UnifiedTestRunner --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 variables: # PS4 related diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index ce9e68f9c1..b78cdb1627 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -40,7 +40,7 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} + - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --wait - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 artifacts: players: @@ -81,7 +81,7 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ {% endif %} commands: - - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} + - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --wait - UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 # If ubuntu, run rust echo server diff --git a/.yamato/mobile-standalone-test.yml b/.yamato/mobile-standalone-test.yml index 6cb1f95845..2b6fc14f5d 100644 --- a/.yamato/mobile-standalone-test.yml +++ b/.yamato/mobile-standalone-test.yml @@ -46,7 +46,7 @@ mobile_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} + - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} --wait - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 artifacts: players: @@ -75,7 +75,7 @@ mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: {% endif %} commands: # Installing editor. We still need the editor to run tests on standalone build and for that the Editor is required - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} + - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} --wait {% if platform.standalone == "Android" %} # Download standalone UnityTestRunner and ADB setup diff --git a/.yamato/package-tests.yml b/.yamato/package-tests.yml index 2342ffb1c7..c7bd72333b 100644 --- a/.yamato/package-tests.yml +++ b/.yamato/package-tests.yml @@ -36,7 +36,7 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}: XRAY_PROFILE: "supported ./pvpExceptions.json" UNITY_EXT_LOGGING: 1 commands: - - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait + - unity-downloader-cli -u {{ editor }} -c Editor --wait # Validate PVP checks for package. - upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --results pvp-results diff --git a/.yamato/performance-tests.yml b/.yamato/performance-tests.yml index 1a5fb82f6e..33c66a47a2 100644 --- a/.yamato/performance-tests.yml +++ b/.yamato/performance-tests.yml @@ -32,7 +32,7 @@ performance_editor_tests_-_NGO_{{ platform.name }}_{{ editor }}_no_data_reportin image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - unity-downloader-cli -u {{ editor }} -c Editor # Installing basic editor + - unity-downloader-cli -u {{ editor }} -c Editor --wait # Installing basic editor - UnifiedTestRunner --suite=editor --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --timeout=3600 --artifacts-path=artifacts --extra-editor-arg=-assemblyNames --extra-editor-arg=Unity.NetCode.* --extra-editor-arg=-testCategory --extra-editor-arg=Performance --extra-editor-arg=-enablePackageManagerTraces --reruncount=1 --clean-library-on-rerun --dontreportperformancedata # TODO: when performance tests will be present we need to add actual execution of this test artifacts: diff --git a/.yamato/project-standards.yml b/.yamato/project-standards.yml index 948873171e..0208ceaa8b 100644 --- a/.yamato/project-standards.yml +++ b/.yamato/project-standards.yml @@ -41,7 +41,7 @@ standards_{{ platform.name }}_{{ project.name }}_{{ editor }}: - dotnet --version - dotnet format --version - - unity-downloader-cli -u {{ editor }} -c editor # Downloads basic editor + - unity-downloader-cli -u {{ editor }} -c editor --wait # Downloads basic editor - .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ project.path }} -quit # This command is used to invoke Unity in a "headless" mode. It's used to sync the project - dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --check # Runs standards check {% endfor -%} diff --git a/.yamato/project-tests.yml b/.yamato/project-tests.yml index f0872c76a9..7017e23a9b 100644 --- a/.yamato/project-tests.yml +++ b/.yamato/project-tests.yml @@ -36,7 +36,7 @@ test_{{ project.name }}_{{ platform.name }}_{{ editor }}: flavor: {{ platform.flavor }} commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it - - unity-downloader-cli -u {{ editor }} -c Editor # Installing basic editor for tests execution + - unity-downloader-cli -u {{ editor }} -c Editor --wait # Installing basic editor for tests execution - upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg="--reruncount=1 --clean-library-on-rerun" # project tests execution via upm-ci artifacts: logs: diff --git a/.yamato/webgl-build.yml b/.yamato/webgl-build.yml index eac41210fd..109c24d7bd 100644 --- a/.yamato/webgl-build.yml +++ b/.yamato/webgl-build.yml @@ -33,7 +33,7 @@ webgl_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - unity-downloader-cli -u {{ editor }} -c Editor -c webgl -c il2cpp # Downloading the editor with additional webgl and il2cpp components + - unity-downloader-cli -u {{ editor }} -c Editor -c webgl -c il2cpp --wait # Downloading the editor with additional webgl and il2cpp components # The following step builds the player with defined options such as: # Suite parameter if defined since it's a mandatory field to define which test suite should be used, but it doesn't matter in this case since we won't run any tests (--suite) From 8213695af53c76f5caf0ab87e77d9357aa19669a Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Wed, 12 Mar 2025 19:11:32 +0100 Subject: [PATCH 38/53] Removed rust server setup since it was intended only for NGOv2.X --- .yamato/desktop-standalone-tests.yml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index b78cdb1627..44b1d48a74 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -70,31 +70,9 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ type: {% if platform.name == "mac" %} {{ platform.type }} {% else %} {{ platform.type }}::GPU {% endif %} image: {{ platform.image }} flavor: {{ platform.flavor }} - -# Set additional variables for running the echo server -{% if platform.name != "win" %} - variables: - ECHO_SERVER_PORT: "7788" - # Set this to ensure the DA codec tests will fail if they cannot connect to the echo-server - # The default is to ignore the codec tests if the echo-server fails to connect - ENSURE_CODEC_TESTS: "true" -{% endif %} - commands: - unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --wait - UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 - - # If ubuntu, run rust echo server -{% if platform.name != "win" %} - - git clone https://github.com/Unity-Technologies/mps-common-multiplayer-backend.git - # Install rust - - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - # Build the echo server - - cd ./mps-common-multiplayer-backend/runtime && $HOME/.cargo/bin/cargo build --example ngo_echo_server - # Run the echo server in the background - this will reuse the artifacts from the build - - cd ./mps-common-multiplayer-backend/runtime && $HOME/.cargo/bin/cargo run --example ngo_echo_server -- --port $ECHO_SERVER_PORT & -{% endif %} - artifacts: logs: paths: From 00f9f262a1eab1531db481cc3d294582b9465788 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 13 Mar 2025 12:59:51 +0100 Subject: [PATCH 39/53] Modified mac model to Silicon --- .yamato/desktop-standalone-tests.yml | 6 ++++++ .yamato/project.metafile | 1 + 2 files changed, 7 insertions(+) diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index 44b1d48a74..82ac4f53e8 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -39,6 +39,9 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ type: {% if platform.name == "mac" %} {{ platform.type }} {% else %} {{ platform.type }}::GPU {% endif %} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + 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 -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --wait - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 @@ -70,6 +73,9 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ type: {% if platform.name == "mac" %} {{ platform.type }} {% else %} {{ platform.type }}::GPU {% endif %} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + 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 -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --wait - UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 diff --git a/.yamato/project.metafile b/.yamato/project.metafile index ccb659fed3..8119768856 100644 --- a/.yamato/project.metafile +++ b/.yamato/project.metafile @@ -58,6 +58,7 @@ test_platforms: image: package-ci/macos-13:v4 flavor: m1.mac standalone: StandaloneOSX + model: M1 # The default model (an x64 Intel Mac VM) quite often caused a known issue of doing all the bitflips in packages resulting in failures # For mobile devices there is a split between the build and run phase so there is a need of splitting specification for both # TODO: For android we could consider adding ARM64 configuration mobile_build: From 0bb55741711c18458008f97f057d46825a3a7563 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 13 Mar 2025 13:02:00 +0100 Subject: [PATCH 40/53] Corrected editor download command --- .yamato/code-coverage.yml | 2 +- .yamato/console-standalone-test.yml | 4 ++-- .yamato/desktop-standalone-tests.yml | 4 ++-- .yamato/mobile-standalone-test.yml | 2 +- .yamato/package-tests.yml | 2 +- .yamato/performance-tests.yml | 2 +- .yamato/project-standards.yml | 2 +- .yamato/project-tests.yml | 2 +- .yamato/webgl-build.yml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index b85532ebdc..af462642a6 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -34,7 +34,7 @@ code_coverage_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - unity-downloader-cli -u {{ editor }} -c Editor --wait + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage -coverage-results-path=$PWD/test-results/CodeCoverage --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results artifacts: diff --git a/.yamato/console-standalone-test.yml b/.yamato/console-standalone-test.yml index 378d8ff66a..acf06747f3 100644 --- a/.yamato/console-standalone-test.yml +++ b/.yamato/console-standalone-test.yml @@ -47,7 +47,7 @@ console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --wait + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} - 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 --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 variables: # PS4 related @@ -86,7 +86,7 @@ console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: model: {{ platform.model }} {% endif %} commands: - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --wait + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} - UnifiedTestRunner --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 variables: # PS4 related diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index 82ac4f53e8..ec17d182fc 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -43,7 +43,7 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ 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 -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --wait + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 artifacts: players: @@ -77,7 +77,7 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ 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 -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --wait + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} - UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800 artifacts: logs: diff --git a/.yamato/mobile-standalone-test.yml b/.yamato/mobile-standalone-test.yml index 2b6fc14f5d..e20d42e9bc 100644 --- a/.yamato/mobile-standalone-test.yml +++ b/.yamato/mobile-standalone-test.yml @@ -75,7 +75,7 @@ mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: {% endif %} commands: # Installing editor. We still need the editor to run tests on standalone build and for that the Editor is required - - unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} --wait + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} {% if platform.standalone == "Android" %} # Download standalone UnityTestRunner and ADB setup diff --git a/.yamato/package-tests.yml b/.yamato/package-tests.yml index c7bd72333b..fbb4cc930c 100644 --- a/.yamato/package-tests.yml +++ b/.yamato/package-tests.yml @@ -36,7 +36,7 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}: XRAY_PROFILE: "supported ./pvpExceptions.json" UNITY_EXT_LOGGING: 1 commands: - - unity-downloader-cli -u {{ editor }} -c Editor --wait + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Validate PVP checks for package. - upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --results pvp-results diff --git a/.yamato/performance-tests.yml b/.yamato/performance-tests.yml index 33c66a47a2..435c96c3ba 100644 --- a/.yamato/performance-tests.yml +++ b/.yamato/performance-tests.yml @@ -32,7 +32,7 @@ performance_editor_tests_-_NGO_{{ platform.name }}_{{ editor }}_no_data_reportin image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - unity-downloader-cli -u {{ editor }} -c Editor --wait # Installing basic editor + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor - UnifiedTestRunner --suite=editor --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --timeout=3600 --artifacts-path=artifacts --extra-editor-arg=-assemblyNames --extra-editor-arg=Unity.NetCode.* --extra-editor-arg=-testCategory --extra-editor-arg=Performance --extra-editor-arg=-enablePackageManagerTraces --reruncount=1 --clean-library-on-rerun --dontreportperformancedata # TODO: when performance tests will be present we need to add actual execution of this test artifacts: diff --git a/.yamato/project-standards.yml b/.yamato/project-standards.yml index 0208ceaa8b..1fe2ffa505 100644 --- a/.yamato/project-standards.yml +++ b/.yamato/project-standards.yml @@ -41,7 +41,7 @@ standards_{{ platform.name }}_{{ project.name }}_{{ editor }}: - dotnet --version - dotnet format --version - - unity-downloader-cli -u {{ editor }} -c editor --wait # Downloads basic editor + - unity-downloader-cli --fast --wait -u {{ editor }} -c editor # Downloads basic editor - .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ project.path }} -quit # This command is used to invoke Unity in a "headless" mode. It's used to sync the project - dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --check # Runs standards check {% endfor -%} diff --git a/.yamato/project-tests.yml b/.yamato/project-tests.yml index 7017e23a9b..0502e66261 100644 --- a/.yamato/project-tests.yml +++ b/.yamato/project-tests.yml @@ -36,7 +36,7 @@ test_{{ project.name }}_{{ platform.name }}_{{ editor }}: flavor: {{ platform.flavor }} commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it - - unity-downloader-cli -u {{ editor }} -c Editor --wait # Installing basic editor for tests execution + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for tests execution - upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg="--reruncount=1 --clean-library-on-rerun" # project tests execution via upm-ci artifacts: logs: diff --git a/.yamato/webgl-build.yml b/.yamato/webgl-build.yml index 109c24d7bd..20af6345b5 100644 --- a/.yamato/webgl-build.yml +++ b/.yamato/webgl-build.yml @@ -33,7 +33,7 @@ webgl_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} commands: - - unity-downloader-cli -u {{ editor }} -c Editor -c webgl -c il2cpp --wait # Downloading the editor with additional webgl and il2cpp components + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c webgl -c il2cpp # Downloading the editor with additional webgl and il2cpp components # The following step builds the player with defined options such as: # Suite parameter if defined since it's a mandatory field to define which test suite should be used, but it doesn't matter in this case since we won't run any tests (--suite) From c1881699a80ccbf3d63eaf07d271158ff52b9ca9 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 13 Mar 2025 13:20:32 +0100 Subject: [PATCH 41/53] Added models considerations to CI configurations --- .yamato/code-coverage.yml | 3 +++ .yamato/console-standalone-test.yml | 5 ++++- .yamato/mobile-standalone-test.yml | 11 +++++++---- .yamato/package-pack.yml | 3 +++ .yamato/package-tests.yml | 3 +++ .yamato/performance-tests.yml | 3 +++ .yamato/project-pack.yml | 3 +++ .yamato/project-standards.yml | 3 +++ .yamato/project-tests.yml | 3 +++ .yamato/project-updated-dependencies-test.yml | 3 +++ .yamato/webgl-build.yml | 3 +++ 11 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index af462642a6..4c79ca0db5 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -33,6 +33,9 @@ code_coverage_{{ platform.name }}_{{ editor }}: type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + 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 - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor diff --git a/.yamato/console-standalone-test.yml b/.yamato/console-standalone-test.yml index acf06747f3..0bbd9f9a00 100644 --- a/.yamato/console-standalone-test.yml +++ b/.yamato/console-standalone-test.yml @@ -46,6 +46,9 @@ console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + 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 }} - 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 --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 @@ -83,7 +86,7 @@ console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} {% if platform.model %} - model: {{ platform.model }} + 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 }} diff --git a/.yamato/mobile-standalone-test.yml b/.yamato/mobile-standalone-test.yml index e20d42e9bc..8a1ca65b4d 100644 --- a/.yamato/mobile-standalone-test.yml +++ b/.yamato/mobile-standalone-test.yml @@ -42,9 +42,12 @@ mobile_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: name: Build {{ project.name }} - [{{ platform.name }}, {{ editor }}, il2cpp] agent: - type: {{ platform.type }} - image: {{ platform.image }} - flavor: {{ platform.flavor }} + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor }} +{% if platform.model %} + 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 -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %} --wait - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 @@ -71,7 +74,7 @@ mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: image: {{ platform.image }} flavor: {{ platform.flavor }} {% if platform.model %} - model: {{ platform.model }} + model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile) {% endif %} commands: # Installing editor. We still need the editor to run tests on standalone build and for that the Editor is required diff --git a/.yamato/package-pack.yml b/.yamato/package-pack.yml index cefa255eec..61e794f110 100644 --- a/.yamato/package-pack.yml +++ b/.yamato/package-pack.yml @@ -30,6 +30,9 @@ package_pack_-_ngo_{{ platform.name }}: type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile) +{% endif %} timeout: 0.25 variables: XRAY_PROFILE: "supported ./pvpExceptions.json" diff --git a/.yamato/package-tests.yml b/.yamato/package-tests.yml index fbb4cc930c..6ece339177 100644 --- a/.yamato/package-tests.yml +++ b/.yamato/package-tests.yml @@ -32,6 +32,9 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}: type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile) +{% endif %} variables: XRAY_PROFILE: "supported ./pvpExceptions.json" UNITY_EXT_LOGGING: 1 diff --git a/.yamato/performance-tests.yml b/.yamato/performance-tests.yml index 435c96c3ba..3e047fff7c 100644 --- a/.yamato/performance-tests.yml +++ b/.yamato/performance-tests.yml @@ -31,6 +31,9 @@ performance_editor_tests_-_NGO_{{ platform.name }}_{{ editor }}_no_data_reportin type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + 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 # Installing basic editor - UnifiedTestRunner --suite=editor --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --timeout=3600 --artifacts-path=artifacts --extra-editor-arg=-assemblyNames --extra-editor-arg=Unity.NetCode.* --extra-editor-arg=-testCategory --extra-editor-arg=Performance --extra-editor-arg=-enablePackageManagerTraces --reruncount=1 --clean-library-on-rerun --dontreportperformancedata diff --git a/.yamato/project-pack.yml b/.yamato/project-pack.yml index 8fe8d2b41b..d9dd6143d5 100644 --- a/.yamato/project-pack.yml +++ b/.yamato/project-pack.yml @@ -29,6 +29,9 @@ project_pack_-_{{ project.name }}_{{ platform.name }}: type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile) +{% endif %} commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it - upm-ci project pack --project-path {{ project.path }} diff --git a/.yamato/project-standards.yml b/.yamato/project-standards.yml index 1fe2ffa505..bac3109695 100644 --- a/.yamato/project-standards.yml +++ b/.yamato/project-standards.yml @@ -36,6 +36,9 @@ standards_{{ platform.name }}_{{ project.name }}_{{ editor }}: type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile) +{% endif %} commands: # .NET environment setup. Ensures required .NET SDK and formatting tools are available - dotnet --version diff --git a/.yamato/project-tests.yml b/.yamato/project-tests.yml index 0502e66261..8d5dabada1 100644 --- a/.yamato/project-tests.yml +++ b/.yamato/project-tests.yml @@ -34,6 +34,9 @@ test_{{ project.name }}_{{ platform.name }}_{{ editor }}: type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile) +{% endif %} commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for tests execution diff --git a/.yamato/project-updated-dependencies-test.yml b/.yamato/project-updated-dependencies-test.yml index 11f05ea541..5b7530ac60 100644 --- a/.yamato/project-updated-dependencies-test.yml +++ b/.yamato/project-updated-dependencies-test.yml @@ -31,6 +31,9 @@ updated-dependencies_{{ project.name }}_NGO_{{ platform.name }}_{{ editor }}: type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile) +{% endif %} commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it - upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type updated-dependencies-tests --package-filter com.unity.netcode.gameobjects diff --git a/.yamato/webgl-build.yml b/.yamato/webgl-build.yml index 20af6345b5..96eeea9e83 100644 --- a/.yamato/webgl-build.yml +++ b/.yamato/webgl-build.yml @@ -32,6 +32,9 @@ webgl_build_{{ project.name }}_{{ platform.name }}_{{ editor }}: type: {{ platform.type }} image: {{ platform.image }} flavor: {{ platform.flavor }} +{% if platform.model %} + 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 webgl -c il2cpp # Downloading the editor with additional webgl and il2cpp components From 30587727e7b8c5440d7f0a3c8ecae9c0413c12ea Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Fri, 21 Feb 2025 11:10:37 -0600 Subject: [PATCH 42/53] fix This fixes the minimal project standards issue. --- com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs index 8e885ead97..f4a77abc4c 100644 --- a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs @@ -1,4 +1,6 @@ +#if COM_UNITY_MODULES_ANIMATION || COM_UNITY_MODULES_PHYSICS || COM_UNITY_MODULES_PHYSICS2D using Unity.Netcode.Components; +#endif #if UNITY_UNET_PRESENT using Unity.Netcode.Transports.UNET; #endif From 33ef41224c5c98978ca8334628046219e23f32db Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 13 Mar 2025 13:22:12 +0100 Subject: [PATCH 43/53] Revert "fix" This reverts commit 30587727e7b8c5440d7f0a3c8ecae9c0413c12ea. --- com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs index f4a77abc4c..8e885ead97 100644 --- a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs @@ -1,6 +1,4 @@ -#if COM_UNITY_MODULES_ANIMATION || COM_UNITY_MODULES_PHYSICS || COM_UNITY_MODULES_PHYSICS2D using Unity.Netcode.Components; -#endif #if UNITY_UNET_PRESENT using Unity.Netcode.Transports.UNET; #endif From 7a2b3d5ba449418e453af5a9f1496d80ce269cda Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 13 Mar 2025 13:24:54 +0100 Subject: [PATCH 44/53] Corrected macOS image --- .yamato/project.metafile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/project.metafile b/.yamato/project.metafile index 8119768856..0c9c6ae1e1 100644 --- a/.yamato/project.metafile +++ b/.yamato/project.metafile @@ -55,7 +55,7 @@ test_platforms: model: rtx2080 - name: mac type: Unity::VM::osx - image: package-ci/macos-13:v4 + image: package-ci/macos-13-arm64:v4 # ARM64 to support M1 model (below) flavor: m1.mac standalone: StandaloneOSX model: M1 # The default model (an x64 Intel Mac VM) quite often caused a known issue of doing all the bitflips in packages resulting in failures From 54b844f264b5f3152341a3869b8d64ce9b8e6fb4 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 13 Mar 2025 13:32:52 +0100 Subject: [PATCH 45/53] Added arm64 component to editors where necessary --- .yamato/code-coverage.yml | 2 +- .yamato/desktop-standalone-tests.yml | 2 +- .yamato/package-tests.yml | 2 +- .yamato/performance-tests.yml | 6 +++--- .yamato/project-standards.yml | 3 ++- .yamato/project-tests.yml | 2 +- .yamato/webgl-build.yml | 4 ++-- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index 4c79ca0db5..fcc64a4ccf 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -37,7 +37,7 @@ code_coverage_{{ 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 + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage -coverage-results-path=$PWD/test-results/CodeCoverage --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results artifacts: diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index ec17d182fc..e2b0252be8 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -43,7 +43,7 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ 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 {% if backend == "il2cpp" %} -c il2cpp {% endif %} + - 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 - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 artifacts: players: diff --git a/.yamato/package-tests.yml b/.yamato/package-tests.yml index 6ece339177..0c27c49626 100644 --- a/.yamato/package-tests.yml +++ b/.yamato/package-tests.yml @@ -39,7 +39,7 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}: XRAY_PROFILE: "supported ./pvpExceptions.json" UNITY_EXT_LOGGING: 1 commands: - - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models # Validate PVP checks for package. - upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --results pvp-results diff --git a/.yamato/performance-tests.yml b/.yamato/performance-tests.yml index 3e047fff7c..e18b2ff19d 100644 --- a/.yamato/performance-tests.yml +++ b/.yamato/performance-tests.yml @@ -35,9 +35,9 @@ performance_editor_tests_-_NGO_{{ platform.name }}_{{ editor }}_no_data_reportin 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 # Installing basic editor - - UnifiedTestRunner --suite=editor --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --timeout=3600 --artifacts-path=artifacts --extra-editor-arg=-assemblyNames --extra-editor-arg=Unity.NetCode.* --extra-editor-arg=-testCategory --extra-editor-arg=Performance --extra-editor-arg=-enablePackageManagerTraces --reruncount=1 --clean-library-on-rerun --dontreportperformancedata - # TODO: when performance tests will be present we need to add actual execution of this test + - unity-downloader-cli -u {{ editor }} -c Editor --wait {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models. Installing basic editor + - UnifiedTestRunner --suite=editor --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --timeout=3600 --artifacts-path=artifacts --extra-editor-arg=-assemblyNames --extra-editor-arg=Unity.NetCode.* --extra-editor-arg=-testCategory --extra-editor-arg=Performance --extra-editor-arg=-enablePackageManagerTraces --reruncount=1 --clean-library-on-rerun --dontreportperformancedata + # TODO: when performance tests will be present we need to add actuall execution of this test artifacts: logs: paths: diff --git a/.yamato/project-standards.yml b/.yamato/project-standards.yml index bac3109695..dd88c60e68 100644 --- a/.yamato/project-standards.yml +++ b/.yamato/project-standards.yml @@ -44,7 +44,8 @@ standards_{{ platform.name }}_{{ project.name }}_{{ editor }}: - dotnet --version - dotnet format --version - - unity-downloader-cli --fast --wait -u {{ editor }} -c editor # Downloads basic editor + - unity-downloader-cli --fast --wait -u {{ editor }} -c editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models. Downloads basic editor + - .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ project.path }} -quit # This command is used to invoke Unity in a "headless" mode. It's used to sync the project - dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --check # Runs standards check {% endfor -%} diff --git a/.yamato/project-tests.yml b/.yamato/project-tests.yml index 8d5dabada1..153f452170 100644 --- a/.yamato/project-tests.yml +++ b/.yamato/project-tests.yml @@ -39,7 +39,7 @@ test_{{ project.name }}_{{ platform.name }}_{{ editor }}: {% endif %} commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it - - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for tests execution + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models. Installing basic editor for tests execution - upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg="--reruncount=1 --clean-library-on-rerun" # project tests execution via upm-ci artifacts: logs: diff --git a/.yamato/webgl-build.yml b/.yamato/webgl-build.yml index 96eeea9e83..33fac79782 100644 --- a/.yamato/webgl-build.yml +++ b/.yamato/webgl-build.yml @@ -36,8 +36,8 @@ webgl_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 webgl -c il2cpp # Downloading the editor with additional webgl and il2cpp components - + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c webgl -c il2cpp {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models. Downloading the editor with additional webgl and il2cpp components + # The following step builds the player with defined options such as: # Suite parameter if defined since it's a mandatory field to define which test suite should be used, but it doesn't matter in this case since we won't run any tests (--suite) # Editor is run in batchmode, which means that Unity runs command line arguments without the need for human interaction. It also suppresses pop-up windows that require human interaction (such as the Save Scene window). We should always run Unity in batch mode when using command line arguments, because it allows automation to run without interruption. (--extra-editor-arg=-batchmode) From 8bbbb4c2d5fc3783f4644d79fd1dc37715b99832 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 13 Mar 2025 14:24:14 +0100 Subject: [PATCH 46/53] Corrected editor architecture --- .yamato/desktop-standalone-tests.yml | 2 +- .yamato/package-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/desktop-standalone-tests.yml b/.yamato/desktop-standalone-tests.yml index e2b0252be8..ec17d182fc 100644 --- a/.yamato/desktop-standalone-tests.yml +++ b/.yamato/desktop-standalone-tests.yml @@ -43,7 +43,7 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ 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 {% 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 %} - UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800 artifacts: players: diff --git a/.yamato/package-tests.yml b/.yamato/package-tests.yml index 0c27c49626..6ece339177 100644 --- a/.yamato/package-tests.yml +++ b/.yamato/package-tests.yml @@ -39,7 +39,7 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}: XRAY_PROFILE: "supported ./pvpExceptions.json" UNITY_EXT_LOGGING: 1 commands: - - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Validate PVP checks for package. - upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --results pvp-results From afa6822263b7481ce5a01ef813f2627a2f63d436 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 14 Mar 2025 10:49:53 +0100 Subject: [PATCH 47/53] Corrected editor for package-tests (using arm64 for macs) --- .yamato/package-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/package-tests.yml b/.yamato/package-tests.yml index 6ece339177..c642b17c62 100644 --- a/.yamato/package-tests.yml +++ b/.yamato/package-tests.yml @@ -39,7 +39,7 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}: XRAY_PROFILE: "supported ./pvpExceptions.json" UNITY_EXT_LOGGING: 1 commands: - - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models. # Validate PVP checks for package. - upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --results pvp-results From 969fc0937109df983766bfbbe8587f007c4ca3ab Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 14 Mar 2025 13:04:24 +0100 Subject: [PATCH 48/53] Added ignoring graphics for package tests --- .yamato/package-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/package-tests.yml b/.yamato/package-tests.yml index c642b17c62..0d354967ae 100644 --- a/.yamato/package-tests.yml +++ b/.yamato/package-tests.yml @@ -47,7 +47,7 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}: # Run UTR to test packages. - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --unity .Editor - - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --artifacts-path=test-results "--ff={ops.upmpvpevidence.enable=true}" --reruncount=1 --clean-library-on-rerun + - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --artifacts-path=test-results "--ff={ops.upmpvpevidence.enable=true}" --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun artifacts: logs: paths: From 7991b4690dc33e61bbcb7a0170876634dbe73e72 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 14 Mar 2025 13:38:52 +0100 Subject: [PATCH 49/53] Added exception about "Failed to find a suitable OpenCL device, baking cannot use GPU lightmapper." --- pvpExceptions.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pvpExceptions.json b/pvpExceptions.json index 4deefeeb86..b3aaff683e 100644 --- a/pvpExceptions.json +++ b/pvpExceptions.json @@ -5,6 +5,11 @@ "CHANGELOG.md: line 9: Unreleased section is not allowed for public release" ] }, + "PVP-300-4": { + "errors": [ + "Failed to find a suitable OpenCL device, baking cannot use GPU lightmapper." + ] + }, "PVP-150-1": { "errors": [ "Unity.Netcode.Components.NetworkTransform: void OnSynchronize(ref BufferSerializer): empty tag", From a669ecfc7dcac6a2cbe7cf46d9c40bafb069c29c Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 17 Mar 2025 13:18:21 +0100 Subject: [PATCH 50/53] Disabled tests on macOS --- .../Tests/Editor/Timing/NetworkTimeTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs b/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs index be53a0df7f..cd7eb35809 100644 --- a/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs @@ -38,6 +38,7 @@ public void TestTimeAsFloat(double d, float f, uint tickRate) } [Test] + [UnityPlatform(exclude = new[] { RuntimePlatform.OSXPlayer })] // Tracked in MTT-11608 [TestCase(53.55d, 53.5d, 10u)] [TestCase(1013553.55d, 1013553.5d, 10u)] [TestCase(0d, 0d, 10u)] @@ -56,7 +57,7 @@ public void TestToFixedTime(double time, double expectedFixedTime, uint tickRate [TestCase(17.32d, 0.2d / 60d)] [TestCase(-42.44d, 1d / 60d - 0.4d / 60d)] [TestCase(-6d, 0)] - [TestCase(int.MaxValue / 61d, 0.00082, 10d)] // Int.Max / 61 / (1/60) to get divisor then: Int.Max - divisor * 1 / 60 + // [TestCase(int.MaxValue / 61d, 0.00082, 10d)] // Int.Max / 61 / (1/60) to get divisor then: Int.Max - divisor * 1 / 60 ------(Tracked in MTT-11608) public void NetworkTimeCreate(double time, double tickOffset, double epsilon = 0.0001d) { var networkTime = new NetworkTime(60, time); From e46867e0036fcf0d65c545e6768264583d193936 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 17 Mar 2025 13:20:31 +0100 Subject: [PATCH 51/53] added disabled platform --- .../Tests/Editor/Timing/NetworkTimeTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs b/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs index cd7eb35809..112ea6991a 100644 --- a/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs @@ -38,7 +38,7 @@ public void TestTimeAsFloat(double d, float f, uint tickRate) } [Test] - [UnityPlatform(exclude = new[] { RuntimePlatform.OSXPlayer })] // Tracked in MTT-11608 + [UnityPlatform(exclude = new[] { RuntimePlatform.OSXPlayer, RuntimePlatform.OSXEditor })] // Tracked in MTT-11608 [TestCase(53.55d, 53.5d, 10u)] [TestCase(1013553.55d, 1013553.5d, 10u)] [TestCase(0d, 0d, 10u)] From b7b4ba686b8aa964de6fb6219af61474bf405b8f Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 17 Mar 2025 13:31:09 +0100 Subject: [PATCH 52/53] Added using directive --- .../Tests/Editor/Timing/NetworkTimeTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs b/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs index 112ea6991a..60744599cf 100644 --- a/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs @@ -3,6 +3,7 @@ using System.Linq; using NUnit.Framework; using UnityEngine; +using UnityEngine.TestTools; using Random = System.Random; namespace Unity.Netcode.EditorTests From 08d17a788539593bf900eec45d597b4b3ee05711 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 17 Mar 2025 14:27:14 +0100 Subject: [PATCH 53/53] Corrected test disablement --- .../Tests/Editor/Timing/NetworkTimeTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs b/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs index 60744599cf..9256951193 100644 --- a/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Editor/Timing/NetworkTimeTests.cs @@ -54,11 +54,12 @@ public void TestToFixedTime(double time, double expectedFixedTime, uint tickRate } [Test] + [UnityPlatform(exclude = new[] { RuntimePlatform.OSXPlayer, RuntimePlatform.OSXEditor })] // Tracked in MTT-11608 [TestCase(34d, 0)] [TestCase(17.32d, 0.2d / 60d)] [TestCase(-42.44d, 1d / 60d - 0.4d / 60d)] [TestCase(-6d, 0)] - // [TestCase(int.MaxValue / 61d, 0.00082, 10d)] // Int.Max / 61 / (1/60) to get divisor then: Int.Max - divisor * 1 / 60 ------(Tracked in MTT-11608) + [TestCase(int.MaxValue / 61d, 0.00082, 10d)] // Int.Max / 61 / (1/60) to get divisor then: Int.Max - divisor * 1 / 60 public void NetworkTimeCreate(double time, double tickOffset, double epsilon = 0.0001d) { var networkTime = new NetworkTime(60, time);