-
Notifications
You must be signed in to change notification settings - Fork 460
Expand file tree
/
Copy pathconsole-standalone-test.yml
More file actions
112 lines (99 loc) · 5.68 KB
/
console-standalone-test.yml
File metadata and controls
112 lines (99 loc) · 5.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file.
---
# DESCRIPTION--------------------------------------------------------------------------
# This job is responsible for Console platform test validation.
# Those tests cover both PlayMode and EditMode tests from package test assemblies.
# CONFIGURATION STRUCTURE--------------------------------------------------------------
# Jobs are generated using nested loops (separate build phase and run phase). Worth noting that run phase uses the build as dependency:
# 1. For all console platform (Switch, ps4, ps5, xbox360, xboxOne)
# 2. For all supported Unity Editor versions (for NGOv2.X this means 6000.0+ editors)
# 3. For the default project.
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
# For console devices a split is required into two phases:
# 1. Build Phase: Creates standalone players for console platforms
# 2. Run Phase: Executes runtime tests on actual console devices
# The Run phase uses build job as dependency
# Note: More of a Unity specific but test assemblies need to be included in the build phase command
# Note: All builds can be made on x64 machines since those are compatible with ARM64 target devices
# PLATFORM SPECIFICS-----------------------------------------------------------------
# Common Requirements:
# All consoles require IL2CPP scripting backend
# Platform-specific SDK environment variables
# Platform-Specific:
# Switch: ARM64 architecture only
# Other Consoles: x64 architecture
# Each console requires specific SDK paths and tools
# QUALITY THOUGHTS--------------------------------------------------------------------
# TODO: consider adding all projects that have tests
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
# BUILD PHASE CONFIGURATION------------------------------------------------------------------------------------
{% for project in projects.default -%}
{% for platform in test_platforms.console_build -%}
{% for editor in validation_editors.all -%}
console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
name: Build {{ project.name }} - [{{ platform.name }}, {{ editor }}, il2cpp{% if platform.name == "switch" %}, arm64{% endif %}]
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor }}
{% if platform.model %}
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
{% endif %}
commands:
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
- 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}}
variables:
# PS4 related
SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00'
# PS5 related --> THIS WAS DISABLED IN PROJECT.METAFILE. SEE MTT-12118
SCE_PROSPERO_SDK_DIR: 'C:\Program Files (x86)\SCE\Prospero SDKs\9.000'
SHADER_COMPILER_PATH: '${SCE_PROSPERO_SDK_DIR}\target\bins'
SCE_ROOT_DIR: 'C:\Program Files (x86)\SCE'
# Switch related
NINTENDO_SDK_ROOT: 'C:\Nintendo\nx_sdk-18_3_0\NintendoSDK'
UNITY_NINTENDOSDK_CLI_TOOLS: '${NINTENDO_SDK_ROOT}\Tools\CommandLineTools'
artifacts:
players:
paths:
- "build/players/**/*"
logs:
paths:
- "artifacts/**/*"
{% endfor -%}
{% endfor -%}
{% endfor -%}
# RUN PHASE CONFIGURATION------------------------------------------------------------------------------------
{% for project in projects.default -%}
{% for platform in test_platforms.console_test -%}
{% for editor in validation_editors.all -%}
console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
name: Run {{ project.name }} Tests - [{{ platform.name }}, {{ editor }}, il2cpp]
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor }}
{% if platform.model %}
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
{% endif %}
commands:
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
- UnifiedTestRunner --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --timeout={{ test_timeout }}
variables:
# PS4 related
SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00'
# PS5 related --> THIS WAS DISABLED IN PROJECT.METAFILE. SEE MTT-12118
SCE_PROSPERO_SDK_DIR: 'C:\Program Files (x86)\SCE\Prospero SDKs\9.000'
SHADER_COMPILER_PATH: '${SCE_PROSPERO_SDK_DIR}\target\bins'
SCE_ROOT_DIR: 'C:\Program Files (x86)\SCE'
# Switch related
NINTENDO_SDK_ROOT: 'C:\Nintendo\nx_sdk-18_3_0\NintendoSDK'
UNITY_NINTENDOSDK_CLI_TOOLS: '${NINTENDO_SDK_ROOT}\Tools\CommandLineTools'
artifacts:
logs:
paths:
- "test-results/**/*"
dependencies:
- .yamato/console-standalone-test.yml#console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}
{% endfor -%}
{% endfor -%}
{% endfor -%}