Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: [2.X] CI failures fixes #3302

Draft
wants to merge 14 commits into
base: develop-2.0.0
Choose a base branch
from
4 changes: 2 additions & 2 deletions .yamato/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +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
- {% if platform.name == "ubuntu" %}DISPLAY=:0 {% endif %} 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"
- 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 --coverage-results-path=upm-ci~/test-results/CoverageResults"
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}_upmCI
{% endfor -%}
{% endfor -%}
24 changes: 24 additions & 0 deletions .yamato/package-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,28 @@ 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
{% 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 -%}
2 changes: 2 additions & 0 deletions com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ private bool CheckForStateChange(ref NetworkTransformState networkState, ref Tra
#else
var position = InLocalSpace ? transformToUse.localPosition : transformToUse.position;
var rotation = InLocalSpace ? transformToUse.localRotation : transformToUse.rotation;
var positionThreshold = Vector3.one * PositionThreshold;
var positionThreshold = Vector3.one * PositionThreshold;
var rotationThreshold = Vector3.one * RotAngleThreshold;
#endif
var rotAngles = rotation.eulerAngles;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public WaitForMetricValues(IMetricDispatcher dispatcher, DirectionalMetricInfo d
dispatcher.RegisterObserver(this);
}

abstract public void Observe(MetricCollection collection);
public abstract void Observe(MetricCollection collection);

public void AssertMetricValuesHaveNotBeenFound()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Collections;
using NUnit.Framework;
using Unity.Multiplayer.Tools.NetStats;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
using System.Linq;
using NUnit.Framework;
using Unity.Multiplayer.Tools.MetricTypes;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine;
using UnityEngine.TestTools;

using Unity.Netcode.TestHelpers.Runtime.Metrics;

namespace Unity.Netcode.RuntimeTests.Metrics
{
internal class NetworkObjectMetricsTests : SingleClientMetricTestBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Linq;
using NUnit.Framework;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
using NUnit.Framework;
using Unity.Collections;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#if MULTIPLAYER_TOOLS
#if MULTIPLAYER_TOOLS_1_0_0_PRE_7

using System.Collections;
using NUnit.Framework;
using Unity.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using NUnit.Framework;
using Unity.Collections;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using NUnit.Framework;
using Unity.Collections;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
using NUnit.Framework;
using Unity.Collections;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using NUnit.Framework;
using Unity.Collections;
using Unity.Multiplayer.Tools.MetricTypes;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.TestTools;

namespace Unity.Netcode.RuntimeTests.Metrics
{
Expand Down
1 change: 1 addition & 0 deletions minimalproject/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dependencies": {
"com.unity.ide.rider": "3.0.34",
"com.unity.netcode.gameobjects": "file:../../com.unity.netcode.gameobjects"
},
"testables": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
using NUnit.Framework;
using Unity.Multiplayer.Tools.MetricTypes;
using Unity.Netcode;
using Unity.Netcode.TestHelpers.Runtime;
using Unity.Netcode.TestHelpers.Runtime.Metrics;
using UnityEngine.SceneManagement;
using UnityEngine.TestTools;
using Unity.Netcode.TestHelpers.Runtime;
using SceneEventType = Unity.Netcode.SceneEventType;

namespace TestProject.ToolsIntegration.RuntimeTests
Expand Down
4 changes: 2 additions & 2 deletions testproject-tools-integration/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"registry": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates",
"dependencies": {
"com.unity.ai.navigation": "2.0.5",
"com.unity.ide.rider": "3.0.31",
"com.unity.ide.rider": "3.0.34",
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.multiplayer.center": "1.0.0",
"com.unity.multiplayer.tools": "2.2.3",
"com.unity.netcode.gameobjects": "file:../../com.unity.netcode.gameobjects",
Expand Down
75 changes: 50 additions & 25 deletions testproject-tools-integration/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,61 @@
"dependencies": {
"com.unity.modules.ai": "1.0.0"
},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
"url": "https://packages.unity.com"
},
"com.unity.burst": {
"version": "1.8.19",
"depth": 2,
"version": "1.8.18",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.2.1",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
"url": "https://packages.unity.com"
},
"com.unity.collections": {
"version": "2.5.1",
"depth": 2,
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.burst": "1.8.17",
"com.unity.nuget.mono-cecil": "1.11.4",
"com.unity.test-framework": "1.4.5",
"com.unity.nuget.mono-cecil": "1.11.4",
"com.unity.test-framework.performance": "3.0.3"
},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
"url": "https://packages.unity.com"
},
"com.unity.ext.nunit": {
"version": "2.0.5",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.31",
"version": "3.0.34",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.ext.nunit": "1.0.6"
},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
"url": "https://packages.unity.com"
},
"com.unity.ide.visualstudio": {
"version": "2.0.22",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.test-framework": "1.1.9"
},
"url": "https://packages.unity.com"
},
"com.unity.mathematics": {
"version": "1.3.2",
"depth": 2,
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
"url": "https://packages.unity.com"
},
"com.unity.multiplayer.center": {
"version": "1.0.0",
Expand All @@ -63,17 +72,19 @@
}
},
"com.unity.multiplayer.tools": {
"version": "https://github.com/Unity-Technologies/com.unity.multiplayer.tools.git#f935904741c349dc41ba24fda6639041128e8f19",
"version": "2.2.3",
"depth": 0,
"source": "git",
"source": "registry",
"dependencies": {
"com.unity.profiling.core": "1.0.0-pre.1",
"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.nuget.mono-cecil": "1.10.1",
"com.unity.collections": "1.1.0",
"com.unity.modules.uielements": "1.0.0"
"com.unity.burst": "1.8.18",
"com.unity.collections": "2.5.1",
"com.unity.mathematics": "1.3.2",
"com.unity.profiling.core": "1.0.2",
"com.unity.nuget.mono-cecil": "1.11.4",
"com.unity.modules.uielements": "1.0.0",
"com.unity.nuget.newtonsoft-json": "3.2.1"
},
"hash": "f935904741c349dc41ba24fda6639041128e8f19"
"url": "https://packages.unity.com"
},
"com.unity.netcode.gameobjects": {
"version": "file:../../com.unity.netcode.gameobjects",
Expand All @@ -89,7 +100,21 @@
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "3.2.1",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.profiling.core": {
"version": "1.0.2",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.4.6",
Expand All @@ -100,7 +125,7 @@
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
"url": "https://packages.unity.com"
},
"com.unity.test-framework.performance": {
"version": "3.0.3",
Expand All @@ -110,18 +135,18 @@
"com.unity.test-framework": "1.1.31",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
"url": "https://packages.unity.com"
},
"com.unity.transport": {
"version": "2.4.0",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.collections": "2.2.1",
"com.unity.burst": "1.8.12",
"com.unity.collections": "2.2.1",
"com.unity.mathematics": "1.3.1"
},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
"url": "https://packages.unity.com"
},
"com.unity.modules.accessibility": {
"version": "1.0.0",
Expand Down