| 
 | 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 NGOv2.X (6000.0+ 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.  | 
0 commit comments