Skip to content

Commit e02624e

Browse files
committed
Merge branch 'develop-2.0.0' into shadow-package/com.unity.netcode.gameobjects
2 parents b7f8675 + 95e472b commit e02624e

122 files changed

Lines changed: 1743 additions & 3815 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr-description-validation.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ jobs:
3030
const pr = context.payload.pull_request;
3131
const body = pr.body || '';
3232
33-
// List of users to skip description validation
33+
// List of user patterns to skip description validation
3434
// This should be automations where we don't care that much about the description format
35-
const skipUsersPrefixes = [
36-
'unity-renovate',
37-
'svc-'
35+
const skipUserPatterns = [
36+
/^unity-renovate/,
37+
/(^|-)svc(-|$)/
3838
];
39-
40-
// If PR author is in the skip list, exit early
39+
40+
// If PR author matches the skip list, exit early
4141
const author = pr.user.login;
4242
console.log(`PR author: ${author}`);
43-
if (skipUsersPrefixes.some(prefix => author.startsWith(prefix))) {
43+
if (skipUserPatterns.some(pattern => pattern.test(author))) {
4444
console.log(`Skipping PR description check for user: ${author}`);
4545
return;
4646
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ utr.bat
1212
Tools/CI/bin
1313
Tools/CI/obj
1414

15+
# Do not include the packages-lock file
16+
packages-lock.json

.yamato/_run-all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ run_quick_checks:
1616
name: Run Quick Initial Checks
1717
dependencies:
1818
# Ensure the code is running to our current standards
19-
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.default }}
19+
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.standards }}
2020
# This is needed for most of the jobs to execute tests + it runs xray PVP checks (all fast checks)
2121
- .yamato/package-pack.yml#package_pack_-_ngo_win
2222

@@ -115,7 +115,7 @@ run_all_projects_standards:
115115
dependencies:
116116
{% for platform in test_platforms.default -%}
117117
{% for project in projects.all -%}
118-
{% for editor in validation_editors.default -%}
118+
{% for editor in validation_editors.standards -%}
119119
- .yamato/project-standards.yml#standards_{{ platform.name }}_{{ project.name }}_{{ editor }}
120120
{% endfor -%}
121121
{% endfor -%}

.yamato/_triggers.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
pr_minimal_required_checks:
5252
name: Minimal PR checks
5353
dependencies:
54-
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.default }}
54+
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.standards }}
5555
- .yamato/package-pack.yml#package_pack_-_ngo_win
5656
triggers:
5757
expression: |-
@@ -89,8 +89,8 @@ pr_code_changes_checks:
8989
# Note that our daily tests will anyway run both test configurations in "minimal supported" and "trunk" configurations
9090
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_ubuntu_il2cpp_{{ pinnedTrunk }}
9191
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_{{ pinnedTrunk }}
92-
# Run code coverage test
93-
- .yamato/code-coverage.yml#code_coverage_ubuntu_{{ validation_editors.default }}
92+
# Run code coverage test (PRs use the pinned "safe" trunk)
93+
- .yamato/code-coverage.yml#code_coverage_project_test_testproject_ubuntu_{{ pinnedTrunk }}
9494
triggers:
9595
expression: |-
9696
(pull_request.comment eq "ngo" OR
@@ -130,7 +130,7 @@ develop_nightly:
130130
rerun: always
131131
dependencies:
132132
# Run project standards to verify package/default project
133-
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.default }}
133+
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.standards }}
134134
# Run APV jobs to make sure the change won't break any dependants
135135
- .yamato/wrench/preview-a-p-v.yml#all_preview_apv_jobs
136136
# Run package EditMode and Playmode tests on desktop platforms on trunk and 6000.0
@@ -159,8 +159,8 @@ develop_nightly:
159159
- .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_win_6000.0
160160
# Run API validation to early-detect all new APIs that would force us to release new minor version of the package. Note that for this to work the package version in package.json must correspond to "actual package state" which means that it should be higher than last released version
161161
- .yamato/vetting-test.yml#vetting_test
162-
# Run code coverage test
163-
- .yamato/code-coverage.yml#code_coverage_ubuntu_{{ validation_editors.default }}
162+
# Run code coverage test (nightly uses actual trunk)
163+
- .yamato/code-coverage.yml#code_coverage_project_test_testproject_ubuntu_trunk
164164

165165

166166
# Run all tests on weekly bases

.yamato/code-coverage.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,37 @@
22
---
33

44
# DESCRIPTION--------------------------------------------------------------------------
5-
# This job is responsible for executing package tests with code coverage analysis enabled.
5+
# This job runs the in-repo testproject tests with code coverage analysis enabled.
6+
# The project tests also exercise the NGO package tests, so a separate package-test coverage job is not needed.
67
# Coverage analysis provides insights into:
78
# Test coverage metrics for NGO assemblies
89
# Line and branch coverage statistics
910
# Generated HTML reports for coverage visualization
1011
# Additional metrics for coverage analysis
1112

1213
# CONFIGURATION STRUCTURE--------------------------------------------------------------
13-
# Jobs are generated using nested loops through:
14-
# 1. For default platform only (Ubuntu) since coverage would not vary between platforms (no need for checks on more platforms)
15-
# 2. For default editor version (trunk) since coverage would not vary between editors (no need for checks on more editors)
14+
# Jobs are generated for:
15+
# 1. Default platform only (Ubuntu) since coverage would not vary between platforms (no need for checks on more platforms)
16+
# 2. Two editors: actual "trunk" (used by nightly) and the "pinnedTrunk" safe version (used by PRs).
17+
# Occasionally trunk breaks our tests, so PRs run against a pinned "safe" trunk while nightly runs actual trunk.
1618

1719
#TECHNICAL CONSIDERATIONS---------------------------------------------------------------
18-
# 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
1920
# Requires Unity Editor installation
2021
# Burst compilation is disabled to ensure accurate coverage measurement
2122
# 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
2223

2324
# QUALITY CONSIDERATIONS--------------------------------------------------------------------
24-
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
25-
25+
# To see where this job is included (in trigger job definitions) look into _triggers.yml file. Currently:
26+
# [Code Coverage] Project Test runs on PR changes (pr_code_changes_checks, pinnedTrunk) and nightly (develop_nightly, trunk)
2627

28+
{% assign coverage_editors = "trunk," | append: pinnedTrunk | split: "," -%}
2729

2830
{% for platform in test_platforms.default -%}
29-
{% for editor in validation_editors.default -%}
30-
code_coverage_{{ platform.name }}_{{ editor }}:
31-
name: Code Coverage - NGO [{{ platform.name }}, {{ editor }}]
31+
{% for project in projects.default -%}
32+
{% for editor in coverage_editors -%}
33+
{% if editor == "trunk" -%}{% assign editor_label = "trunk" -%}{% else -%}{% assign editor_label = "pinnedTrunk" -%}{% endif -%}
34+
code_coverage_project_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
35+
name: '[Code Coverage] Project Test - NGO {{ project.name }} [{{ platform.name }}, {{ editor }}]'
3236
agent:
3337
type: {{ platform.type }}
3438
image: {{ platform.image }}
@@ -38,13 +42,14 @@ code_coverage_{{ platform.name }}_{{ editor }}:
3842
{% endif %}
3943
commands:
4044
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models
41-
- upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor
42-
- UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage --coverage-upload-options="reportsDir:$PWD/test-results/CoverageResults;name:NGOv2_{{ platform.name }}_{{ editor }};flags:NGOv2_{{ platform.name }}_{{ editor }};verbose" --coverage-results-path=$PWD/test-results/CoverageResults --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout={{ test_timeout }} --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --artifacts-path=test-results
45+
- UnifiedTestRunner --testproject={{ project.path }} --suite=editor --suite=playmode --editor-location=.Editor --enable-code-coverage --coverage-upload-options="reportsDir:$PWD/test-results/CoverageResults;name:NGOv2_project_{{ project.name }}_{{ platform.name }}_{{ editor_label }};flags:NGOv2_project_{{ project.name }}_{{ platform.name }}_{{ editor_label }};verbose" --coverage-results-path=$PWD/test-results/CoverageResults --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout={{ test_timeout }} --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --artifacts-path=test-results
4346
artifacts:
4447
logs:
4548
paths:
4649
- "test-results/**/*"
4750
dependencies:
51+
- .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors
4852
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}
4953
{% endfor -%}
5054
{% endfor -%}
55+
{% endfor -%}

.yamato/console-standalone-test.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
# Each console requires specific SDK paths and tools
3232

3333
# QUALITY THOUGHTS--------------------------------------------------------------------
34-
# TODO: consider adding all projects that have tests
3534
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
3635

3736

@@ -51,16 +50,16 @@ console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
5150
{% endif %}
5251
commands:
5352
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
54-
- 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={{ test_timeout}}
53+
- UnifiedTestRunner --testproject={{ project.path }} --architecture={% if platform.name == "switch" %}arm64{% else %}x64{% endif %} --scripting-backend=il2cpp --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --artifacts-path=artifacts --player-save-path=build/players --testfilter="Unity.Netcode.RuntimeTests.*" --extra-editor-arg=-batchmode --extra-editor-arg=-nographics{% if platform.name == "switch" %} --extra-editor-arg=-overrideTextureCompression --extra-editor-arg=ForceUncompressed{% endif %} --reruncount=1 --clean-library-on-rerun --build-only --timeout={{ test_timeout}}
5554
variables:
5655
# PS4 related
5756
SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00'
58-
# PS5 related --> THIS WAS DISABLED IN PROJECT.METAFILE. SEE MTT-12118
59-
SCE_PROSPERO_SDK_DIR: 'C:\Program Files (x86)\SCE\Prospero SDKs\9.000'
60-
SHADER_COMPILER_PATH: '${SCE_PROSPERO_SDK_DIR}\target\bins'
57+
# PS5 related --> win10-ps5:v4 ships SDK 13.000 but defaults SCE_PROSPERO_SDK_DIR to an unsupported version, so set it explicitly.
58+
SCE_PROSPERO_SDK_DIR: 'C:\Program Files (x86)\SCE\Prospero SDKs\13.000'
59+
SHADER_COMPILER_PATH: '${SCE_PROSPERO_SDK_DIR}\host_tools\bin'
6160
SCE_ROOT_DIR: 'C:\Program Files (x86)\SCE'
62-
# Switch related
63-
NINTENDO_SDK_ROOT: 'C:\Nintendo\nx_sdk-18_3_0\NintendoSDK'
61+
# Switch related --> Switch is DISABLED in project.metafile (MTT-15636): 6000.x/trunk editors mandate NintendoSDK 22.2.x, which is not installed on win10-switch:v4 (only nintendosdk-en-21_4_0 is). This target path is correct for when PETS ships 22.2.x and Switch is re-enabled.
62+
NINTENDO_SDK_ROOT: 'C:\Nintendo\nintendosdk-en-22_2_0\NintendoSDK'
6463
UNITY_NINTENDOSDK_CLI_TOOLS: '${NINTENDO_SDK_ROOT}\Tools\CommandLineTools'
6564
artifacts:
6665
players:
@@ -94,12 +93,12 @@ console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
9493
variables:
9594
# PS4 related
9695
SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00'
97-
# PS5 related --> THIS WAS DISABLED IN PROJECT.METAFILE. SEE MTT-12118
98-
SCE_PROSPERO_SDK_DIR: 'C:\Program Files (x86)\SCE\Prospero SDKs\9.000'
99-
SHADER_COMPILER_PATH: '${SCE_PROSPERO_SDK_DIR}\target\bins'
96+
# PS5 related --> win10-ps5:v4 ships SDK 13.000 but defaults SCE_PROSPERO_SDK_DIR to an unsupported version, so set it explicitly.
97+
SCE_PROSPERO_SDK_DIR: 'C:\Program Files (x86)\SCE\Prospero SDKs\13.000'
98+
SHADER_COMPILER_PATH: '${SCE_PROSPERO_SDK_DIR}\host_tools\bin'
10099
SCE_ROOT_DIR: 'C:\Program Files (x86)\SCE'
101-
# Switch related
102-
NINTENDO_SDK_ROOT: 'C:\Nintendo\nx_sdk-18_3_0\NintendoSDK'
100+
# Switch related --> Switch is DISABLED in project.metafile (MTT-15636): 6000.x/trunk editors mandate NintendoSDK 22.2.x, which is not installed on win10-switch:v4 (only nintendosdk-en-21_4_0 is). This target path is correct for when PETS ships 22.2.x and Switch is re-enabled.
101+
NINTENDO_SDK_ROOT: 'C:\Nintendo\nintendosdk-en-22_2_0\NintendoSDK'
103102
UNITY_NINTENDOSDK_CLI_TOOLS: '${NINTENDO_SDK_ROOT}\Tools\CommandLineTools'
104103
artifacts:
105104
logs:

.yamato/project-standards.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
{% for project in projects.all -%}
3232
{% for platform in test_platforms.default -%}
33-
{% for editor in validation_editors.default -%}
33+
{% for editor in validation_editors.standards -%}
3434
standards_{{ platform.name }}_{{ project.name }}_{{ editor }}:
3535
name: Standards Check - NGO {{ project.name }} [{{ platform.name }}, {{ editor }}]
3636
agent:
@@ -48,8 +48,7 @@ standards_{{ platform.name }}_{{ project.name }}_{{ editor }}:
4848
- 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
4949
- .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
5050
- dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --fix # Auto-fix formatting issues
51-
- git checkout -- {{ project.path }}/Packages/manifest.json {{ project.path }}/Packages/packages-lock.json {{ project.path }}/ProjectSettings/ProjectVersion.txt 2>/dev/null || true # Restore files that Unity may have modified (we only want to check code formatting)
52-
- 'git diff --exit-code || (echo "ERROR: Code formatting issues found. Run dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --fix locally and commit the changes." && exit 1)' # Fail if formatter made any changes
51+
- 'git diff --exit-code || (echo "ERROR: Code formatting issues found. Run dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --fix locally and commit the changes. Note that dotnet version that was used in this check depends on the image that was used so local results may differ (see the first command of this job to know which dotnet version was used)" && exit 1)' # Fail if formatter made any changes
5352
{% endfor -%}
5453
{% endfor -%}
5554
{% endfor -%}

.yamato/project.metafile

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,15 @@ test_platforms:
111111
flavor: b1.large
112112
larger_flavor: b1.xlarge
113113
standalone: PS4
114-
# - name: ps5 --> SEE MTT-12118
115-
# type: Unity::VM
116-
# image: package-ci/win10-ps5:v4
117-
# flavor: b1.large
118-
# larger_flavor: b1.xlarge
119-
# standalone: PS5
120-
# - name: switch --> TEMPORARILY DISABLED. SEE MTT-12118
121-
# The NintendoSDK on the win10-switch:v4 Bokken image is incomplete for the SDK
122-
# version the newer editor Playback Engines require: 18_3_0 is missing the
123-
# nintendo-switch-support lib the new toolchain links against, and 21_4_3 is missing the
124-
# Tools\Graphics\NvnTools (GraphicsConverter) libraries needed to package textures.
125-
# Neither is fixable from .yamato; re-enable once Package CI ships a complete SDK on the image.
114+
# ps5: win10-ps5:v4 defaults SCE_PROSPERO_SDK_DIR to an unsupported SDK, so it is overridden to 13.000 in console-standalone-test.yml.
115+
- name: ps5
116+
type: Unity::VM
117+
image: package-ci/win10-ps5:v4
118+
flavor: b1.large
119+
larger_flavor: b1.xlarge
120+
standalone: PS5
121+
# switch --> DISABLED. SEE MTT-15636 (split from MTT-12118). 6000.x/trunk editors mandate NintendoSDK 22.2.x, but package-ci/win10-switch:v4 currently ships only nintendosdk-en-21_4_0. That fixes texture packaging but the native IL2CPP link then fails (undefined symbol std::__1::__hash_memory, from the 22_02 SwitchPlayer.a). Re-enable once PETS publishes a win10-switch image with nintendosdk-en-22_2_x.
122+
# - name: switch
126123
# type: Unity::VM
127124
# image: package-ci/win10-switch:v4
128125
# flavor: b1.large
@@ -147,13 +144,14 @@ test_platforms:
147144
flavor: b1.large
148145
larger_flavor: b1.xlarge
149146
standalone: PS4
150-
#- name: ps5 --> SEE MTT-12118
151-
# type: Unity::console::ps5
152-
# image: package-ci/win10-ps5:v4
153-
# flavor: b1.large
154-
# larger_flavor: b1.xlarge
155-
# standalone: PS5
156-
# - name: switch --> TEMPORARILY DISABLED. SEE MTT-12118 (incomplete NintendoSDK on win10-switch:v4 image)
147+
- name: ps5
148+
type: Unity::console::ps5
149+
image: package-ci/win10-ps5:v4
150+
flavor: b1.large
151+
larger_flavor: b1.xlarge
152+
standalone: PS5
153+
# switch --> DISABLED. SEE MTT-15636 (needs NintendoSDK 22.2.x on the image; see console_build note).
154+
# - name: switch
157155
# type: Unity::console::switch
158156
# image: package-ci/win10-switch:v4
159157
# flavor: b1.large
@@ -176,6 +174,7 @@ test_platforms:
176174
# EDITOR CONFIGURATIONS-------------------------------------------------------------------------------
177175
# Editors to be used for testing. NGOv2.X official support started from 6000.0 editor
178176
# TODO: When a new editor will be released it should be added to this list
177+
# standards editor is used for standards check so we won't get random manifest changes due to newer editor being used
179178

180179
validation_editors:
181180
default:
@@ -189,6 +188,8 @@ validation_editors:
189188
- 5fe7931aab8c4fff9274e15ef0800125c68b8d6a
190189
minimal:
191190
- 6000.0
191+
standards:
192+
- 6000.0.72f1
192193
pinnedTrunk: 5fe7931aab8c4fff9274e15ef0800125c68b8d6a
193194

194195

0 commit comments

Comments
 (0)