Skip to content

Commit 1c1960a

Browse files
authored
Merge branch 'develop' into chore/add_auto_labeler
2 parents e7e9ee9 + d17d98b commit 1c1960a

Some content is hidden

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

46 files changed

+1341
-805
lines changed

.yamato/README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Netcode for GameObjects CI Documentation
2+
3+
## Overview
4+
This document provides an overview of the Continuous Integration (CI) implementation for Netcode for GameObjects.
5+
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.
6+
7+
## Test Configurations
8+
CI related files are present inside .yamato/ folder and we can distinguish specific tests
9+
10+
### Helper jobs
11+
- `.yamato/package-pack.yml` responsible for generating package artifacts (.tgz) required for testing and publishing.
12+
- `.yamato/project-pack.yml` responsible for generating package artifacts (.tgz) required for testing and publishing. This packs all packages of a given project.
13+
- `.yamato/_run-all.yml` responsible for grouping tests into groups for easier management (for example "all console tests").
14+
- `.yamato/_triggers.yml` responsible for defining triggers (PR, nightly, weekly etc.) and defining which tests to run.
15+
- `disable-burst-if-requested.py` responsible for helping to disable burst if needed.
16+
- `.yamato/project.metafile` being the central configuration file defining test environments, platforms, projects, editors and other parameters used.
17+
18+
### In-Editor Tests
19+
- `.yamato/package-tests.yml` responsible for running package tests.
20+
- `.yamato/project-tests.yml` responsible for running project tests.
21+
- `.yamato/project-updated-dependencies-test.yml` responsible for running tests after updating dependencies to latest ones.
22+
- `.yamato/project-standards.yml` responsible for running standards check on a package.
23+
- `.yamato/code-coverage.yml` responsible for running code coverage analysis.
24+
- `.yamato/performance-tests.yml` responsible for running performance tests.
25+
- `.yamato/webgl-build.yml` responsible for making a build for webgl platform.
26+
27+
### Standalone Tests
28+
- `.yamato/desktop-standalone-tests.yml` responsible for running tests on standalone desktops.
29+
- `.yamato/console-standalone-test.yml` responsible for running tests on standalone consoles.
30+
- `.yamato/mobile-standalone-test.yml` responsible for running tests on standalone mobiles.
31+
32+
### Wrench jobs
33+
This file is auto generated by wrench and used for automating release process.
34+
Those tests can also be used by our CI as dependencies.
35+
- `.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)
36+
- `.yamato/wrench/package-pack-jobs.yml` responsible for generating package artifacts (.tgz) required for testing and publishing.
37+
- `.yamato/wrench/preview-a-p-v.yml` responsible for validating PVP (Package Verification Profiles) standards for the package.
38+
- `.yamato/wrench/promotion-jobs.yml` responsible for publishing.
39+
- `.yamato/wrench/publish-trigger.yml` responsible for defining jobs that need to pass in order to publish.
40+
- `.yamato/wrench/recipe-regeneration.yml` responsible for verifying regeneration of wrench recipes (no manual changes).
41+
- `.yamato/wrench/validation-jobs.yml` responsible for running package tests.
42+
- `.yamato/wrench/wrench_config.json` this is the configuration file for wrench.
43+
- `.yamato/generated-scripts/` is a collection of infrastructure instability detection tools.
44+
45+
## Jobs Configuration Structure
46+
This section explains some configuration details that may be confusing while looking at .yml files.
47+
48+
### Job Generation
49+
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.
50+
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.
51+
52+
### Job Naming Convention
53+
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:
54+
- Display Name (in Yamato): `Build testproject - [win, 6000.0, il2cpp]`
55+
- Internal Job Name (used when adding dependency for example): `console_standalone_build_testproject_win_6000.0`
56+
57+
## Platform Support
58+
Currently, the CI implementation supports the following platforms:
59+
1. Console Platforms:
60+
- Switch
61+
- PS4
62+
- PS5
63+
- Xbox360
64+
- XboxOne
65+
2. Mobile Platforms:
66+
- Android
67+
- iOS
68+
3. Desktop Platforms:
69+
- Windows
70+
- Ubuntu
71+
- macOS
72+
4. Unity Editor Versions
73+
- Supports NGOv1.X (2021.3+ editors)
74+
5. Architectures
75+
- x64
76+
- ARM64 (This is present for consoles/mobiles but will be extended. More information is present in specific standalone test files)
77+
78+
## Design Considerations
79+
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.
80+
The downside of our current approach is that it can sometimes impact readability due to the use of nested if and for statements.

.yamato/_run-all.yml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
{% metadata_file .yamato/project.metafile %}
1+
{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file.
22
---
33

4+
# DESCRIPTION--------------------------------------------------------------------------
5+
# Those jobs group together related test as dependencies to allow to easily manage running a given set of tests.
6+
# This enables efficient test execution for different validation scenarios
7+
8+
# QUALITY CONSIDERATIONS---------------------------------------------------------------
9+
# 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.
10+
11+
#-----------------------------------------------------------------------------------
12+
13+
414
# Runs all package tests
515
run_all_package_tests:
616
name: Run All Package Tests
@@ -92,9 +102,11 @@ run_all_webgl_builds:
92102
dependencies:
93103
{% for project in projects.default -%}
94104
{% for platform in test_platforms.desktop -%}
105+
{% if platform.name != "mac" -%} # There is an error about "Light baking could not be started because no valid OpenCL device could be found". Tracked in MTT-11726
95106
{% for editor in validation_editors.all -%}
96107
- .yamato/webgl-build.yml#webgl_build_{{ project.name }}_{{ platform.name }}_{{ editor }}
97108
{% endfor -%}
109+
{% endif -%}
98110
{% endfor -%}
99111
{% endfor -%}
100112

@@ -105,9 +117,11 @@ run_all_webgl_builds_trunk:
105117
dependencies:
106118
{% for project in projects.default -%}
107119
{% for platform in test_platforms.desktop -%}
120+
{% if platform.name != "mac" -%} # There is an error about "Light baking could not be started because no valid OpenCL device could be found". Tracked in MTT-11726
108121
{% for editor in validation_editors.default -%}
109122
- .yamato/webgl-build.yml#webgl_build_{{ project.name }}_{{ platform.name }}_{{ editor }}
110123
{% endfor -%}
124+
{% endif -%}
111125
{% endfor -%}
112126
{% endfor -%}
113127

@@ -117,7 +131,9 @@ run_all_webgl_builds_2021:
117131
dependencies:
118132
{% for project in projects.default -%}
119133
{% for platform in test_platforms.desktop -%}
134+
{% if platform.name != "mac" -%} # There is an error about "Light baking could not be started because no valid OpenCL device could be found". Tracked in MTT-11726
120135
- .yamato/webgl-build.yml#webgl_build_{{ project.name }}_{{ platform.name }}_2021.3
136+
{% endif -%}
121137
{% endfor -%}
122138
{% endfor -%}
123139

@@ -130,13 +146,7 @@ run_all_project_tests_desktop_standalone:
130146
{% for platform in test_platforms.desktop -%}
131147
{% for editor in validation_editors.all -%}
132148
{% for backend in scripting_backends -%}
133-
# 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
134-
# 1) The 2021 editor will soon be out of support
135-
# 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
136-
# 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
137-
{% if editor != "2021.3" or platform.name != "ubuntu" %}
138149
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
139-
{% endif -%}
140150
{% endfor -%}
141151
{% endfor -%}
142152
{% endfor -%}
@@ -164,13 +174,7 @@ run_all_project_tests_desktop_standalone_2021:
164174
{% for project in projects.default -%}
165175
{% for platform in test_platforms.desktop -%}
166176
{% for backend in scripting_backends -%}
167-
# 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
168-
# 1) The 2021 editor will soon be out of support
169-
# 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
170-
# 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
171-
{% if platform.name != "ubuntu" %}
172177
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_2021.3
173-
{% endif -%}
174178
{% endfor -%}
175179
{% endfor -%}
176180
{% endfor -%}
@@ -182,7 +186,7 @@ run_all_project_tests_mobile_standalone:
182186
{% for project in projects.default -%}
183187
{% for platform in test_platforms.mobile_test -%}
184188
{% for editor in validation_editors.all -%}
185-
- .yamato/mobile-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}
189+
- .yamato/mobile-standalone-test.yml#mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}
186190
{% endfor -%}
187191
{% endfor -%}
188192
{% endfor -%}
@@ -195,7 +199,7 @@ run_all_project_tests_mobile_standalone_trunk:
195199
{% for project in projects.default -%}
196200
{% for platform in test_platforms.mobile_test -%}
197201
{% for editor in validation_editors.default -%}
198-
- .yamato/mobile-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}
202+
- .yamato/mobile-standalone-test.yml#mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}
199203
{% endfor -%}
200204
{% endfor -%}
201205
{% endfor -%}
@@ -206,7 +210,7 @@ run_all_project_tests_mobile_standalone_2021:
206210
dependencies:
207211
{% for project in projects.default -%}
208212
{% for platform in test_platforms.mobile_test -%}
209-
- .yamato/mobile-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_2021.3
213+
- .yamato/mobile-standalone-test.yml#mobile_standalone_test_{{ project.name }}_{{ platform.name }}_2021.3
210214
{% endfor -%}
211215
{% endfor -%}
212216

@@ -218,10 +222,7 @@ run_all_project_tests_console_standalone:
218222
{% for project in projects.default -%}
219223
{% for platform in test_platforms.console_test -%}
220224
{% for editor in validation_editors.all -%}
221-
# 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
222-
{% if editor != "2023.3" %}
223-
- .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}
224-
{% endif -%}
225+
- .yamato/console-standalone-test.yml#console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}
225226
{% endfor -%}
226227
{% endfor -%}
227228
{% endfor -%}
@@ -234,7 +235,7 @@ run_all_project_tests_console_standalone_trunk:
234235
{% for project in projects.default -%}
235236
{% for platform in test_platforms.console_test -%}
236237
{% for editor in validation_editors.default -%}
237-
- .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}
238+
- .yamato/console-standalone-test.yml#console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}
238239
{% endfor -%}
239240
{% endfor -%}
240241
{% endfor -%}
@@ -245,6 +246,6 @@ run_all_project_tests_console_standalone_2021:
245246
dependencies:
246247
{% for project in projects.default -%}
247248
{% for platform in test_platforms.console_test -%}
248-
- .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_2021.3
249+
- .yamato/console-standalone-test.yml#console_standalone_test_{{ project.name }}_{{ platform.name }}_2021.3
249250
{% endfor -%}
250251
{% endfor -%}

.yamato/_triggers.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,43 @@
1-
{% metadata_file .yamato/project.metafile %}
1+
{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file.
22
---
33

4+
# DESCRIPTION--------------------------------------------------------------------------
5+
# This configuration defines three main CI trigger patterns:
6+
# 1. Pull Request Validation: Validation performed on PR basis
7+
# 2. Nightly Development: Test set run nightly (validates most important test cases)
8+
# 3. Weekly Full Validation: Test set run weekly (validates all test cases to prevent any surprises)
9+
# Each pattern represents different balance between validation depth, execution time and CI resource usage
10+
11+
# TRIGGER PATTERNS-------------------------------------------------------------------
12+
# Pull Request:
13+
# This test validates Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered
14+
# Triggers on PRs to develop, develop, and release branches
15+
# Focuses on critical validation paths that we should validate before merging PRs
16+
# Cancels previous runs on new commits
17+
# Excludes draft PRs
18+
19+
# Nightly:
20+
# This test validates same subset as pull_request_trigger with addition of mobile/console tests and webgl builds
21+
# Runs daily on develop (local configuration)
22+
# Includes all test types but only on trunk.
23+
# Adds platform-specific and APV validation
24+
25+
# Weekly:
26+
# 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
27+
# Runs across all supported editor versions
28+
# Includes code coverage analysis
29+
# Validates all projects and standards
30+
31+
# CONFIGURATION STRUCTURE--------------------------------------------------------------
32+
# Jobs configurations are generated by ensuring that all dependencies are successful.
33+
# The dependencies are taken from _run-all.yml file where we can gather multiple tests into proper sets
34+
35+
# QUALITY CONSIDERATIONS---------------------------------------------------------------
36+
# 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.
37+
38+
39+
#-----------------------------------------------------------------------------------
40+
441
# Run all relevant tasks when a pull request targeting the develop or release branch is created or updated.
542
pull_request_trigger:
643
name: Pull Request Trigger (develop, develop-2.0.0, & release branches)
@@ -66,6 +103,9 @@ develop_nightly:
66103
# Build player for webgl platform on trunk and 2021 editors
67104
- .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_ubuntu_trunk
68105
- .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_win_2021.3
106+
# Clean import test
107+
- .yamato/clean-import-job.yml#clean_import_testproject_trunk
108+
- .yamato/clean-import-job.yml#clean_import_testproject_2021.3
69109

70110

71111
# Run all tests on weekly bases

0 commit comments

Comments
 (0)