Skip to content

Commit 7f25818

Browse files
committed
Added console-standalone comments
1 parent 6344e04 commit 7f25818

File tree

2 files changed

+44
-29
lines changed

2 files changed

+44
-29
lines changed

.yamato/_run-all.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ run_all_project_tests_console_standalone:
216216
{% for project in projects.default -%}
217217
{% for platform in test_platforms.console_test -%}
218218
{% for editor in validation_editors.all -%}
219-
- .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}
219+
- .yamato/console-standalone-test.yml#console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}
220220
{% endfor -%}
221221
{% endfor -%}
222222
{% endfor -%}
@@ -229,7 +229,7 @@ run_all_project_tests_console_standalone_trunk:
229229
{% for project in projects.default -%}
230230
{% for platform in test_platforms.console_test -%}
231231
{% for editor in validation_editors.default -%}
232-
- .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}
232+
- .yamato/console-standalone-test.yml#console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}
233233
{% endfor -%}
234234
{% endfor -%}
235235
{% endfor -%}
@@ -240,6 +240,6 @@ run_all_project_tests_console_standalone_2021:
240240
dependencies:
241241
{% for project in projects.default -%}
242242
{% for platform in test_platforms.console_test -%}
243-
- .yamato/console-standalone-test.yml#run_{{ project.name }}_tests_{{ platform.name }}_2021.3
243+
- .yamato/console-standalone-test.yml#console_standalone_test_{{ project.name }}_{{ platform.name }}_2021.3
244244
{% endfor -%}
245245
{% endfor -%}
Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,54 @@
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-
# Builds a player on console standalone platform and executes RuntimeTests (equivalent to PlayMode tests) of the NGO package in the Standalone build.
5-
# Default project (testptoject) in this case is used as a context.
6-
# Builds/Tests are made on each console platform (PS4, PS5, Switch, XboxOne, XboxSeriesX) as in project.metafile declaration
7-
# Builds/Tests are made on each supported editor as in project.metafile declaration
4+
# DESCRIPTION--------------------------------------------------------------------------
5+
# This job is responsible for Console platform test validation.
6+
# Those tests cover both PlayMode and EditMode tests from package test assemblies.
87

9-
# For SOME of the console devices it's necessary to split build and run phases so it was split for all
10-
# For all consoles we need to use il2cpp scripting backend (so no testing with mono)
11-
# Switch works only with ARM64 and the rest with x64 architectures
12-
# For now all platforms used for building are windows based
8+
# CONFIGURATION STRUCTURE--------------------------------------------------------------
9+
# Jobs are generated using nested loops (separate build phase and run phase). Worth noting that run phase uses the build as dependency:
10+
# 1. For all console platform (Switch, ps4, ps5, xbox360, xboxOne)
11+
# 2. For all supported Unity Editor versions (for NGOv1.X this means 2021.3+ editors)
12+
# 3. For the default project.
1313

14-
# Builds are made with x64 architecture machines since those are compatible to run on ARM64 devices
14+
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
15+
# For console devices a split is required into two phases:
16+
# 1. Build Phase: Creates standalone players for console platforms
17+
# 2. Run Phase: Executes runtime tests on actual console devices
18+
# The Run phase uses build job as dependency
19+
20+
# Note: More of a Unity specific but test assemblies need to be included in the build phase command
21+
# Note: All builds can be made on x64 machines since those are compatible with ARM64 target devices
22+
23+
# PLATFORM SPECIFICS-----------------------------------------------------------------
24+
# Common Requirements:
25+
# All consoles require IL2CPP scripting backend
26+
# Platform-specific SDK environment variables
27+
28+
# Platform-Specific:
29+
# Switch: ARM64 architecture only
30+
# Other Consoles: x64 architecture
31+
# Each console requires specific SDK paths and tools
32+
33+
# QUALITY THOUGHTS--------------------------------------------------------------------
34+
# TODO: consider adding all projects that have tests
35+
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
36+
37+
38+
39+
# BUILD PHASE CONFIGURATION------------------------------------------------------------------------------------
1540
{% for project in projects.default -%}
1641
{% for platform in test_platforms.console_build -%}
1742
{% for editor in validation_editors.all -%}
18-
build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
43+
console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
1944
name: Build {{ project.name }} - [{{ platform.name }}, {{ editor }}, il2cpp{% if platform.name == "switch" %}, arm64{% endif %}]
2045
agent:
2146
type: {{ platform.type }}
2247
image: {{ platform.image }}
2348
flavor: {{ platform.flavor }}
2449
commands:
25-
# Installing tools. unity-downloader-cli and utr should be already preinstalled on the image
26-
- sudo pip install unity-downloader-cli
27-
- unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --fast --wait
28-
29-
# Platform specific Build
50+
- unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
3051
- 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=1800
31-
3252
variables:
3353
# PS4 related
3454
SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00'
@@ -52,11 +72,11 @@ build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
5272

5373

5474

55-
# Executes RuntimeTests of the NGO package in the Standalone build for consoles
75+
# RUN PHASE CONFIGURATION------------------------------------------------------------------------------------
5676
{% for project in projects.default -%}
5777
{% for platform in test_platforms.console_test -%}
5878
{% for editor in validation_editors.all -%}
59-
run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}:
79+
console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
6080
name: Run {{ project.name }} Tests - [{{ platform.name }}, {{ editor }}, il2cpp]
6181
agent:
6282
type: {{ platform.type }}
@@ -66,13 +86,8 @@ run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}:
6686
model: {{ platform.model }}
6787
{% endif %}
6888
commands:
69-
# Installing tools.
70-
- sudo pip install unity-downloader-cli
71-
- unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }} --fast --wait
72-
73-
# Platform specific Execution
89+
- unity-downloader-cli -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
7490
- UnifiedTestRunner --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800
75-
7691
variables:
7792
# PS4 related
7893
SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00'
@@ -88,7 +103,7 @@ run_{{ project.name }}_tests_{{ platform.name }}_{{ editor }}:
88103
paths:
89104
- "test-results/**/*"
90105
dependencies:
91-
- .yamato/console-standalone-test.yml#build_{{ project.name }}_{{ platform.name }}_{{ editor }}
106+
- .yamato/console-standalone-test.yml#console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}
92107
{% endfor -%}
93108
{% endfor -%}
94109
{% endfor -%}

0 commit comments

Comments
 (0)