10
10
type : {{ platform.type }}
11
11
image : {{ platform.image }}
12
12
flavor : {{ platform.flavor }}
13
- commands :
13
+ variables :
14
+ EDITOR_VERSION : {{ editor.version }}
15
+ commands :
14
16
- {{ utr_install_win }}
15
17
- {{ upm_ci_install }}
16
18
# Get version 2.3.0-preview of doctools package (it currently fails for 3.0.0-preview).
23
25
- move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
24
26
- upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
25
27
# Run upm-ci verification tests as well as tests contained in the package.
26
- - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
28
+ - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u %EDITOR_VERSION%
29
+ {% if platform.name == "win" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages"
30
+ --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package" {% endif %}
27
31
{% if platform.installscript %}
28
32
- {{ unity_downloader_install }}
29
- - {{ platform.installscript }} {{ editor.version }}
33
+ - {{ platform.installscript }} %EDITOR_VERSION%
30
34
{% endif %}
31
35
# ADBv2 on 2019.4 causes the test runner to not start on initial import when the
32
36
# samples are in the package. Move the samples back into the project.
33
37
- move /Y .\Packages\com.unity.inputsystem\Samples .\Assets
34
38
- move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
35
39
# Now run our full test suite that sits in Assets/Tests by running UTR on our project.
36
- - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "win" %} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
40
+ - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "win" %} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem {% if platform.name == "win" %}--enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project {% endif %}
41
+ # Merge all the code coverage results into one report.
42
+ {% if platform.name == "win" %}
43
+ - ' {{ yamato_source_dir_win }}/.Editor/Unity.exe -projectPath {{ yamato_source_dir_win }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_win }}/Packages/com.unity.inputsystem/" -quit'
44
+ # delete the reports from the two runs and only keep the final merged one
45
+ - rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package"
46
+ - rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project"
47
+ {% endif %}
48
+ after :
49
+ - {{ instabilities_install_win }}
50
+ - {{ instabilities_run_win }}
37
51
artifacts :
38
52
UTR_Output.zip :
39
53
paths :
49
63
type : {{ platform.type }}
50
64
image : {{ platform.image }}
51
65
flavor : {{ platform.flavor }}
66
+ variables :
67
+ EDITOR_VERSION : {{ editor.version }}
52
68
commands :
53
69
- {{ utr_install_nix }}
54
70
- {{ upm_ci_install }}
61
77
- mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem
62
78
- upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
63
79
# Run upm-ci verification tests as well as tests contained in the package.
64
- - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version } }
80
+ - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u $EDITOR_VERSION {% if platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages" --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package" {% endif % }
65
81
{% if platform.installscript %}
66
82
- {{ unity_downloader_install }}
67
- - {{ platform.installscript }} {{ editor.version }}
83
+ - {{ platform.installscript }} $EDITOR_VERSION
68
84
{% endif %}
69
85
# ADBv2 on 2019.4 causes the test runner to not start on initial import when the
70
86
# samples are in the package. Move the samples back into the project.
71
87
- mv ./Packages/com.unity.inputsystem/Samples ./Assets
72
88
- mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
73
89
# Now run our full test suite that sits in Assets/Tests by running UTR on our project.
74
- - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" %} --suite=editor {% endif %} {% if platform.name == "linux" %} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
90
+ - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" or platform.name == "linux"%} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem {% if platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project {% endif %}
91
+ # Merge all the code coverage results into one report.
92
+ {% if platform.name == "mac" %}
93
+ - ' {{ yamato_source_dir_nix }}/.Editor/Unity.app/Contents/MacOS/Unity -projectPath {{ yamato_source_dir_nix }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_nix }}/Packages/com.unity.inputsystem/" -quit'
94
+ {% endif %}
95
+ {% if platform.name == "linux" %}
96
+ - ' {{ yamato_source_dir_nix }}/.Editor/Unity -projectPath {{ yamato_source_dir_nix }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_nix }}/Packages/com.unity.inputsystem/" -quit'
97
+ {% endif %}
98
+ - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package
99
+ - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project
100
+ after :
101
+ - {{ instabilities_install_nix }}
102
+ - {{ platform.instabilities_run }}
75
103
artifacts :
76
104
UTR_Output.zip :
77
105
paths :
@@ -88,11 +116,16 @@ build_ios_{{ editor.version }}_{{ category.name }}:
88
116
type : Unity::VM::osx
89
117
image : {{ ios_and_tvos_macos_bokken_image }}
90
118
flavor : b1.large
119
+ variables :
120
+ EDITOR_VERSION : {{ editor.version }}
91
121
commands :
92
122
- {{ utr_install_nix }}
93
123
- {{ unity_downloader_install }}
94
- - unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast --wait
124
+ - unity-downloader-cli -c Editor -c iOS -u $EDITOR_VERSION --fast --wait
95
125
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% endif %} --platform=iOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
126
+ after :
127
+ - {{ instabilities_install_nix }}
128
+ - {{ instabilities_run_mac }}
96
129
artifacts :
97
130
players :
98
131
paths :
@@ -108,12 +141,17 @@ run_ios_{{ editor.version }}_{{ category.name }}:
108
141
image : {{ ios_and_tvos_macos_bokken_image }}
109
142
model : SE
110
143
flavor : b1.medium
144
+ variables :
145
+ EDITOR_VERSION : {{ editor.version }}
111
146
skip_checkout : true
112
147
dependencies :
113
148
- .yamato/upm-ci.yml#build_ios_{{ editor.version }}_{{ category.name }}
114
149
commands :
115
150
- {{ utr_install_nix }}
116
- - ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% endif %} --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
151
+ - ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% endif %} --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
152
+ after :
153
+ - {{ instabilities_install_nix }}
154
+ - {{ instabilities_run_mac }}
117
155
artifacts :
118
156
logs :
119
157
paths :
@@ -126,11 +164,16 @@ build_tvos_{{ editor.version }}:
126
164
type : Unity::VM::osx
127
165
image : {{ ios_and_tvos_macos_bokken_image }}
128
166
flavor : b1.large
167
+ variables :
168
+ EDITOR_VERSION : {{ editor.version }}
129
169
commands :
130
170
- {{ utr_install_nix }}
131
171
- {{ unity_downloader_install }}
132
- - unity-downloader-cli -c Editor -c AppleTV -u {{ editor.version }} --fast --wait
172
+ - unity-downloader-cli -c Editor -c AppleTV -u $EDITOR_VERSION --fast --wait
133
173
- ./utr --suite=playmode --platform=tvOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
174
+ after :
175
+ - {{ instabilities_install_nix }}
176
+ - {{ instabilities_run_mac }}
134
177
artifacts :
135
178
players :
136
179
paths :
@@ -145,12 +188,17 @@ run_tvos_{{ editor.version }}:
145
188
type : Unity::mobile::appletv
146
189
image : {{ ios_and_tvos_macos_bokken_image }}
147
190
flavor : b1.medium
191
+ variables :
192
+ EDITOR_VERSION : {{ editor.version }}
148
193
skip_checkout : true
149
194
dependencies :
150
195
- .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
151
196
commands :
152
197
- {{ utr_install_nix }}
153
198
- ./utr --suite=playmode --platform=tvOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
199
+ after :
200
+ - {{ instabilities_install_nix }}
201
+ - {{ instabilities_run_mac }}
154
202
artifacts :
155
203
logs :
156
204
paths :
@@ -164,11 +212,16 @@ build_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
164
212
type : Unity::VM
165
213
image : package-ci/win10:default
166
214
flavor : b1.xlarge
215
+ variables :
216
+ EDITOR_VERSION : {{ editor.version }}
167
217
commands :
168
218
- {{ utr_install_win }}
169
219
- {{ unity_downloader_install }}
170
- - unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast --wait
220
+ - unity-downloader-cli -c Editor -c Android -u %EDITOR_VERSION% --fast --wait
171
221
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% endif %} --platform=Android --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend.name }} --build-only --repository --performance-project-id=InputSystem
222
+ after :
223
+ - {{ instabilities_install_win }}
224
+ - {{ instabilities_run_win }}
172
225
artifacts :
173
226
players :
174
227
paths :
@@ -183,6 +236,8 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
183
236
type : Unity::mobile::shield
184
237
image : package-ci/win10:default
185
238
flavor : b1.medium
239
+ variables :
240
+ EDITOR_VERSION : {{ editor.version }}
186
241
# Skip repository cloning
187
242
skip_checkout : true
188
243
# Set a dependency on the build job
@@ -201,7 +256,9 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
201
256
after :
202
257
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
203
258
- if not exist build\test-results mkdir build\test-results
204
- - powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe logcat -d > build/test-results/device_log.txt
259
+ - powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe logcat -d > build/test-results/device_log.txt
260
+ - {{ instabilities_install_win }}
261
+ - {{ instabilities_run_win }}
205
262
# Set uploadable artifact paths
206
263
artifacts :
207
264
logs :
@@ -212,7 +269,7 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
212
269
{% endfor %} # editors
213
270
214
271
all_tests :
215
- name : All Tests
272
+ name : All Tests
216
273
dependencies :
217
274
{% for editor in editors %}
218
275
{% for platform in platforms_win %}
0 commit comments