Skip to content

Commit 9788a19

Browse files
committed
Separation of desktop standalone tests into build and test phases
1 parent 37221d7 commit 9788a19

File tree

1 file changed

+62
-24
lines changed

1 file changed

+62
-24
lines changed

.yamato/desktop-standalone-tests.yml

Lines changed: 62 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,96 @@
77
# Builds are made on each supported editor as in project.metafile declaration
88
# Builds are made with different scripting backends as in project.metafile declaration
99
# ARM64 architectures are for now not considered since Windows_arm64 is recommended to use only after builds (would require separation here) and when it comes to macOS_arm64 there is problem with OpenCL not being available
10+
11+
# Build phase
1012
{% for project in projects.default -%}
1113
{% for platform in test_platforms.desktop -%}
1214
{% for editor in validation_editors.all -%}
1315
{% for backend in scripting_backends -%}
14-
desktop_standalone_tests_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}:
15-
name : Standalone Tests - NGO {{ project.name }} - [{{ platform.name }}, {{ editor }}, {{ backend }}]
16+
desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}:
17+
name : Standalone Build - NGO {{ project.name }} - [{{ platform.name }}, {{ editor }}, {{ backend }}]
1618
agent:
1719
type: {% if platform.name == "mac" %} {{ platform.type }} {% else %} {{ platform.type }}::GPU {% endif %}
1820
image: {{ platform.image }}
1921
flavor: {{ platform.flavor }}
2022
commands:
21-
# Installing tools
23+
# Installing tools
2224
{% if platform.name == "ubuntu" %}
2325
- sudo apt-get update -q
2426
- sudo apt install -qy imagemagick
2527
{% endif %}
2628
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
2729

28-
# Platform specific UTR setup
30+
# Platform specific UTR setup
2931
- |
3032
{% if platform.name == "win" %}
3133
curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
3234
{% else %}
3335
curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr
3436
{% endif %}
35-
36-
# Installing editor
37+
38+
# Installing editor
3739
- unity-downloader-cli -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} --fast --wait
38-
39-
# Build Player
40+
41+
# Build Player
4042
- |
41-
{% if platform.name == "win" %}
42-
utr.bat --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --player-save-path=build/players --artifacts_path=build/logs --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun
43-
{% else %}
44-
./utr --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --player-save-path=build/players --artifacts_path=build/logs --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun
45-
{% endif %}
43+
{% if platform.name == "win" %}
44+
utr.bat --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --player-save-path=build/players --artifacts_path=build/logs --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only
45+
{% else %}
46+
./utr --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --player-save-path=build/players --artifacts_path=build/logs --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only
47+
{% endif %}
4648

47-
# Run Standalone tests
49+
artifacts:
50+
players:
51+
paths:
52+
- build/players/**/*
53+
logs:
54+
paths:
55+
- build/logs/**/*
56+
dependencies:
57+
- .yamato/project-pack.yml#project_pack_-_{{ project.name }}
58+
{% endfor -%}
59+
{% endfor -%}
60+
{% endfor -%}
61+
{% endfor -%}
62+
63+
64+
65+
66+
# Run phase
67+
{% for project in projects.default -%}
68+
{% for platform in test_platforms.desktop -%}
69+
{% for editor in validation_editors.all -%}
70+
{% for backend in scripting_backends -%}
71+
desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}:
72+
name : Standalone Test - NGO {{ project.name }} - [{{ platform.name }}, {{ editor }}, {{ backend }}]
73+
agent:
74+
type: {% if platform.name == "mac" %} {{ platform.type }} {% else %} {{ platform.type }}::GPU {% endif %}
75+
image: {{ platform.image }}
76+
flavor: {{ platform.flavor }}
77+
commands:
78+
# Platform specific UTR setup
79+
- |
80+
{% if platform.name == "win" %}
81+
curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
82+
{% else %}
83+
curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr
84+
{% endif %}
85+
86+
# Run Standalone tests
4887
- |
49-
{% if platform.name == "win" %}
88+
{% if platform.name == "win" %}
5089
utr.bat --suite=playmode --player-load-path=build/players --artifacts_path=build/test-results --testfilter=Unity.Netcode.RuntimeTests --playergraphicsapi=Null --reruncount=1 --clean-library-on-rerun
51-
{% else %}
90+
{% else %}
5291
./utr --suite=playmode --player-load-path=build/players --artifacts_path=build/test-results --testfilter=Unity.Netcode.RuntimeTests --playergraphicsapi=Null --reruncount=1 --clean-library-on-rerun
53-
{% endif %}
92+
{% endif %}
5493

55-
artifacts:
56-
logs:
57-
paths:
58-
- artifacts/**/*
59-
- build/test-results/**
60-
dependencies:
61-
- .yamato/project-pack.yml#project_pack_-_{{ project.name }}
94+
artifacts:
95+
logs:
96+
paths:
97+
- build/test-results/**
98+
dependencies:
99+
- .yamato/desktop-standalone-tests.yml#desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{ editor }}
62100
{% endfor -%}
63101
{% endfor -%}
64102
{% endfor -%}

0 commit comments

Comments
 (0)