You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: [NGOv1.X] Corrections of CI setup issues (#3326)
This PR focuses on fixing CI issues raised in
#3303
and before. Specifically:
1. 2023.3 editor was removed from supported list since based on official
info it transitioned into 6000 editor and 2023 editor (by itself) is not
supported. The associated ticket was (MTT-11355)
2. In case of ubuntu and 2021 editor (MTT-11354) correct version of
libssl is being installed
3. UTR command was corrected to use preinstalled UTR on the image
instead of downloading it
4. Removed upm-ci project pack definition and converted Code Coverage
test to use upm-pvp pack job
5. Simplifies some unnecessary CI commands
6. Added detailed comments regarding CI setup and commands
7. Created CI_README file which describes overall configuration
structure.
8. For macOS devices we now use M1 model (Apple Silicon) in contrast to
default x64 Intel Mac which introduced a lot of bit-flipping errors
---------
Co-authored-by: NoelStephensUnity <[email protected]>
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.
Copy file name to clipboardExpand all lines: .yamato/_run-all.yml
+17-22Lines changed: 17 additions & 22 deletions
Original file line number
Diff line number
Diff 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.
# 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.
# 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" %}
# 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
{% for platform in test_platforms.console_test -%}
220
218
{% 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
Copy file name to clipboardExpand all lines: .yamato/_triggers.yml
+41-1Lines changed: 41 additions & 1 deletion
Original file line number
Diff line number
Diff 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.
# 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
# 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.
{% metadata_file .yamato/project.metafile %}# All configuration that is used to create different configurations (used in for loops) is taken from this file.
2
2
---
3
3
4
-
# Runs package tests in order to determine code coverage of the NGO package.
5
-
# In essence it's performing the same task as .yamato/package-test jobs with the overhead being the measured code coverage
6
-
# It's ok for code coverage to be performed only on one platform (default) since code coverage won't change much between those.
7
-
# Default platform was chosen (ubuntu) since it's the fastest and most resource friendly with default editor.
# 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
19
+
# Requires Unity Editor installation
20
+
# Burst compilation is disabled to ensure accurate coverage measurement
21
+
# 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
0 commit comments