Skip to content

Commit ecd8d50

Browse files
committed
Naming correction, mobile builds and ubuntu test correction
1 parent a5e1de8 commit ecd8d50

File tree

7 files changed

+163
-168
lines changed

7 files changed

+163
-168
lines changed

.yamato/code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ code_coverage_{{ platform.name }}_{{ editor }}:
1313
flavor: {{ platform.flavor }}
1414
commands:
1515
- npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
16-
- {% if platform.name == "ubuntu" %}DISPLAY=:0 {% endif %} upm-ci package test -u {{ editor }} --package-path com.unity.netcode.gameobjects --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime' --extra-utr-arg="--extra-editor-arg=--burst-disable-compilation --extra-editor-arg=-testCategory --extra-editor-arg=!Performance --timeout=1800 --reruncount=1 --clean-library-on-rerun"
16+
- {% if platform.name == "Ubuntu" %}DISPLAY=:0 {% endif %} upm-ci package test -u {{ editor }} --package-path com.unity.netcode.gameobjects --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime' --extra-utr-arg="--extra-editor-arg=--burst-disable-compilation --extra-editor-arg=-testCategory --extra-editor-arg=!Performance --timeout=1800 --reruncount=1 --clean-library-on-rerun"
1717
artifacts:
1818
logs:
1919
paths:

.yamato/desktop-standalone-tests.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ desktop_standalone_tests_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{
1515
flavor: {{ platform.flavor }}
1616
commands:
1717
# Installing tools
18+
{% if platform.name == "Ubuntu" %}
19+
- sudo apt-get update -q
20+
- sudo apt install -qy imagemagick
21+
{% endif %}
1822
- npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
1923
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
2024

2125
# Platform specific UTR setup
2226
- |
23-
{% if platform.name == "win" %}
27+
{% if platform.name == "Win" %}
2428
curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
2529
{% else %}
2630
curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr
@@ -31,15 +35,15 @@ desktop_standalone_tests_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{
3135

3236
# Build Player
3337
- |
34-
{% if platform.name == "win" %}
38+
{% if platform.name == "Win" %}
3539
utr.bat --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend }} --build-only --testfilter=Unity.Netcode.RuntimeTests --extra-editor-arg=-batchmode --extra-editor-arg=-nographics
3640
{% else %}
3741
./utr --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend }} --build-only --testfilter=Unity.Netcode.RuntimeTests --extra-editor-arg=-batchmode --extra-editor-arg=-nographics
3842
{% endif %}
3943

4044
# Run Standalone tests
4145
- |
42-
{% if platform.name == "win" %}
46+
{% if platform.name == "Win" %}
4347
utr.bat --suite=playmode --platform={{ platform.standalone }} --player-load-path=build/players --artifacts_path=build/test-results --scripting-backend={{ backend }} --testfilter=Unity.Netcode.RuntimeTests --playergraphicsapi=Null
4448
{% else %}
4549
./utr --suite=playmode --platform={{ platform.standalone }} --player-load-path=build/players --artifacts_path=build/test-results --scripting-backend={{ backend }} --testfilter=Unity.Netcode.RuntimeTests --playergraphicsapi=Null

.yamato/mobile-build-and-test.yml

Lines changed: 0 additions & 145 deletions
This file was deleted.

.yamato/mobile-standalone-test.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
4+
# Builds a player on mobile standalone platform and executes PlayMode tests of the NGO package in the Standalone build
5+
# Only Package tests are being executed in the context of the default project
6+
# For mobile devices it's necessary to split build and run phases
7+
{% for project in projects.default -%}
8+
{% for editor in validation_editors.all -%}
9+
{% for platform in test_platforms.mobile_build -%}
10+
build_{{ project.name }}_{{ editor }}_{{ platform.name }}:
11+
name: Build {{ project.name }} - [{{ editor }}, {{ platform.name }}]
12+
agent:
13+
type: {{ platform.type }}
14+
image: {{ platform.image }}
15+
flavor: {{ platform.flavor }}
16+
commands:
17+
# Installing tools
18+
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
19+
- unity-downloader-cli -u {{ editor }} -c editor -c {{ platform.name }} -w --fast
20+
21+
# Platform specific Build
22+
{% if platform.name == "Android" %}
23+
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
24+
- python .yamato/disable-burst-if-requested.py --project-path {{ project.path }} --platform {{ platform.name }}
25+
- utr.bat --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --scripting-backend=mono --build-only --timeout=1800 --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --testfilter=Unity.Netcode.RuntimeTests
26+
{% else %}
27+
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
28+
- chmod +x ./utr
29+
- ./utr --artifacts_path=artifacts --timeout=1800 --testproject={{ project.path }} --editor-location=.Editor --suite=playmode --platform={{ platform.standalone }} --build-only --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --testfilter=Unity.Netcode.RuntimeTests
30+
{% endif %}
31+
32+
artifacts:
33+
logs:
34+
paths:
35+
- '*.log'
36+
- '*.xml'
37+
- artifacts/**/*
38+
- testproject/Logs/**
39+
- testproject/Library/*.log
40+
- testproject/*.log
41+
- testproject/Builds/*.log
42+
- build/test-results/**
43+
- artifacts/**
44+
- build/players/**
45+
variables:
46+
CI: true
47+
ENABLE_BURST_COMPILATION: False
48+
{% endif -%}
49+
{% endfor -%}
50+
{% endfor -%}
51+
{% endfor -%}
52+
53+
54+
{% for project in projects.default -%}
55+
{% for editor in validation_editors.all -%}
56+
{% for platform in test_platforms.mobile_test -%}
57+
{% if platform.name == "android" -%}
58+
run_{{ project.name }}_tests_{{ editor }}_android:
59+
name: Run {{ project.name }} Tests - [{{ editor }}, Android]
60+
agent:
61+
type: {{ platform.type }}
62+
image: {{ platform.image }}
63+
flavor: {{ platform.flavor }}
64+
# Skip repository cloning
65+
skip_checkout: true
66+
commands:
67+
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
68+
- |
69+
set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
70+
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
71+
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
72+
set UTR_VERSION=1.35.1
73+
./utr --suite=playmode --platform=Android --editor-location=.Editor --testproject={{ project.name }} --player-load-path=build/players --artifacts_path=build/logs --scripting-backend=mono --reruncount=1 --player-connection-ip=%BOKKEN_HOST_IP% --testfilter=Unity.Netcode.RuntimeTests
74+
artifacts:
75+
logs:
76+
paths:
77+
- '*.log'
78+
- '*.xml'
79+
- artifacts/**/*
80+
- testproject/Logs/**
81+
- testproject/Library/*.log
82+
- testproject/*.log
83+
- testproject/Builds/*.log
84+
- build/test-results/**
85+
- build/players/**
86+
dependencies:
87+
- .yamato/mobile-build-and-test.yml#build_{{ project.name }}_{{ editor }}_android
88+
{% endif -%}
89+
{% endfor -%}
90+
{% endfor -%}
91+
{% endfor -%}
92+
93+
94+
95+
96+
97+
98+
99+
{% for project in projects.default -%}
100+
{% for editor in validation_editors.all -%}
101+
{% for platform in test_platforms.mobile_build -%}
102+
{% if platform.name == "ios" -%}
103+
run_{{ project.name }}_tests_{{ editor }}_iOS:
104+
name: Run {{ project.name }} Tests - [{{ editor }}, iOS]
105+
agent:
106+
type: {{ platform.type }}
107+
image: {{ platform.image }}
108+
flavor: {{ platform.flavor }}
109+
commands:
110+
# Download standalone UnityTestRunner
111+
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
112+
# Give UTR execution permissions
113+
- chmod +x ./utr
114+
# Run the test build on the device
115+
- export UTR_VERSION=1.35.1
116+
- ./utr -artifacts_path=artifacts --testproject={{ project.name }} --editor-location=.Editor --reruncount=1 --suite=playmode --platform=iOS --player-load-path=build/players --testfilter=Unity.Netcode.RuntimeTests
117+
artifacts:
118+
logs:
119+
paths:
120+
- '*.log'
121+
- '*.xml'
122+
- artifacts/**/*
123+
- testproject/Logs/**
124+
- testproject/Library/*.log
125+
- testproject/*.log
126+
- testproject/Builds/*.log
127+
- build/test-results/**
128+
- artifacts/**
129+
- build/players/**
130+
# Set a dependency on the build job
131+
dependencies:
132+
- .yamato/mobile-build-and-test.yml#build_{{ project.name }}_{{ editor }}_iOS
133+
{% endif -%}
134+
{% endfor -%}
135+
{% endfor -%}
136+
{% endfor -%}

.yamato/project-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
1414
flavor: {{ platform.flavor }}
1515
commands:
1616
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
17-
- {% if platform.name == "ubuntu" %}DISPLAY=:0 && {% endif %}upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests
17+
- {% if platform.name == "Ubuntu" %}DISPLAY=:0 && {% endif %}upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests
1818
artifacts:
1919
logs:
2020
paths:

0 commit comments

Comments
 (0)