Skip to content

Commit d1bf057

Browse files
committed
Merge branch 'develop' into release/1.X
2 parents c851869 + 8b51f90 commit d1bf057

File tree

147 files changed

+18472
-1738
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+18472
-1738
lines changed

.github/pull_request_template.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
### Description
22

3-
_Please fill this section with a description what the pull request is trying to address._
3+
_Please fill this section with a description what the pull request is trying to address and what changes were made._
44

5-
### Changes made
65

7-
_Please write down a short description of what changes were made._
8-
9-
### Testing
6+
### Testing status & QA
107

118
_Please describe the testing already done by you and what testing you request/recommend QA to execute. If you used or created any testing project please link them here too for QA._
129

13-
### Risk
10+
### Overall Product Risks
11+
12+
_Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any._
13+
14+
- Complexity:
15+
- Halo Effect:
16+
17+
### Comments to reviewers
1418

15-
_Please describe the potential risks of your changes for the reviewers._
19+
_Please describe any additional information such as what to focus on, or historical info for the reviewers._
1620

1721
### Checklist
1822

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ Packages/com.unity.inputsystem/**/*.api.meta
4343
Packages/com.unity.package-manager-ui/
4444
Packages/com.unity.package-manager-doctools/
4545

46+
Tools/CI/[Bb]in
47+
Tools/CI/[Oo]bj
48+
4649
.Editor
4750
.bin
4851
.download
52+
53+
!Tools/CI/InputSystem.Cookbook.csproj
54+
!Tools/CI/InputSystem-recipes.sln

.yamato/config.metadata

+23-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
editors:
2-
- version: 2021.3
2+
- version: 2021.3.45f
33
- version: 2022.3
44
disable_tvos_run: true
55
- version: 6000.0
@@ -17,50 +17,56 @@ upm_ci_install: npm install -g upm-ci-utils@stable --registry https://artifactor
1717
platforms_win:
1818
- name: win
1919
type: Unity::VM
20-
image: package-ci/win10:default
20+
image: package-ci/win10:v4
2121
flavor: b1.large
2222
- name: win_standalone
2323
type: Unity::VM
24-
image: package-ci/win10:default
24+
image: package-ci/win10:v4
2525
flavor: b1.large
2626
runtime: StandaloneWindows64
2727
- name: win_standalone_il2cpp
2828
type: Unity::VM
29-
image: package-ci/win10:default
29+
image: package-ci/win10:v4
3030
flavor: b1.large
3131
runtime: StandaloneWindows64
3232
scripting-backend: Il2Cpp
3333
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
3434
platforms_nix:
3535
- name: mac
3636
type: Unity::VM::osx
37-
image: package-ci/macos-13:default
37+
image: package-ci/macos-13:v4
3838
flavor: m1.mac
39+
instabilities_run: sh ./run_standalone_instability_detection-latest.sh macos 0.5.1 || exit 0
3940
- name: mac_standalone
4041
type: Unity::VM::osx
41-
image: package-ci/macos-13:default
42+
image: package-ci/macos-13:v4
4243
flavor: m1.mac
44+
instabilities_run: sh ./run_standalone_instability_detection-latest.sh macos 0.5.1 || exit 0
4345
runtime: StandaloneOSX
4446
- name: mac_standalone_il2cpp
4547
type: Unity::VM::osx
46-
image: package-ci/macos-13:default
48+
image: package-ci/macos-13:v4
4749
flavor: m1.mac
50+
instabilities_run: sh ./run_standalone_instability_detection-latest.sh macos 0.5.1 || exit 0
4851
runtime: StandaloneOSX
4952
scripting-backend: Il2Cpp
5053
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
5154
- name: linux
5255
type: Unity::VM
5356
image: package-ci/ubuntu-20.04:v4.50.0
5457
flavor: b1.large
58+
instabilities_run: sh ./run_standalone_instability_detection-latest.sh ubuntu 0.5.1 || exit 0
5559
- name: linux_standalone
5660
type: Unity::VM
5761
image: package-ci/ubuntu-20.04:v4.50.0
5862
flavor: b1.large
63+
instabilities_run: sh ./run_standalone_instability_detection-latest.sh ubuntu 0.5.1 || exit 0
5964
runtime: StandaloneLinux64
6065
- name: linux_standalone_il2cpp
6166
type: Unity::VM
6267
image: package-ci/ubuntu-20.04:v4.50.0
6368
flavor: b1.large
69+
instabilities_run: sh ./run_standalone_instability_detection-latest.sh ubuntu 0.5.1 || exit 0
6470
runtime: StandaloneLinux64
6571
scripting-backend: Il2Cpp
6672
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
@@ -72,4 +78,13 @@ ios_and_tvos_macos_bokken_image: package-ci/macos-13:v4.50.0
7278

7379
test_category:
7480
- name: performance
75-
- name: all
81+
- name: all
82+
83+
instabilities_install_win: curl -s https://artifactory.prd.it.unity3d.com/artifactory/automation-and-tooling/infrastructure-instability-detection/standalone/setup/run_standalone_instability_detection-latest.bat --output run_standalone_instability_detection-latest.bat --retry 5 || exit 0
84+
instabilities_run_win: run_standalone_instability_detection-latest.bat 0.5.1 || exit 0
85+
86+
instabilities_install_nix: curl -s https://artifactory.prd.it.unity3d.com/artifactory/automation-and-tooling/infrastructure-instability-detection/standalone/setup/run_standalone_instability_detection-latest.sh --output run_standalone_instability_detection-latest.sh --retry 5 || exit 0
87+
instabilities_run_mac: sh ./run_standalone_instability_detection-latest.sh macos 0.5.1 || exit 0
88+
89+
yamato_source_dir_win: "%YAMATO_SOURCE_DIR%"
90+
yamato_source_dir_nix: ${YAMATO_SOURCE_DIR}

.yamato/promotion.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ promote:
77
type: Unity::VM
88
image: package-ci/win10:default
99
flavor: b1.large
10+
dependencies:
11+
- .yamato/publish-samples.yml#test_sample_projects
1012
variables:
1113
UPMCI_PROMOTION: 1
1214
commands:

.yamato/upm-ci.yml

+70-13
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
type: {{ platform.type }}
1111
image: {{ platform.image }}
1212
flavor: {{ platform.flavor }}
13-
commands:
13+
variables:
14+
EDITOR_VERSION: {{ editor.version }}
15+
commands:
1416
- {{ utr_install_win }}
1517
- {{ upm_ci_install }}
1618
# Get version 2.3.0-preview of doctools package (it currently fails for 3.0.0-preview).
@@ -23,17 +25,29 @@
2325
- move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
2426
- upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
2527
# 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 %}
2731
{% if platform.installscript %}
2832
- {{ unity_downloader_install }}
29-
- {{ platform.installscript }} {{ editor.version }}
33+
- {{ platform.installscript }} %EDITOR_VERSION%
3034
{% endif %}
3135
# ADBv2 on 2019.4 causes the test runner to not start on initial import when the
3236
# samples are in the package. Move the samples back into the project.
3337
- move /Y .\Packages\com.unity.inputsystem\Samples .\Assets
3438
- move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
3539
# 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 }}
3751
artifacts:
3852
UTR_Output.zip:
3953
paths:
@@ -49,6 +63,8 @@
4963
type: {{ platform.type }}
5064
image: {{ platform.image }}
5165
flavor: {{ platform.flavor }}
66+
variables:
67+
EDITOR_VERSION: {{ editor.version }}
5268
commands:
5369
- {{ utr_install_nix }}
5470
- {{ upm_ci_install }}
@@ -61,17 +77,29 @@
6177
- mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem
6278
- upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
6379
# 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 %}
6581
{% if platform.installscript %}
6682
- {{ unity_downloader_install }}
67-
- {{ platform.installscript }} {{ editor.version }}
83+
- {{ platform.installscript }} $EDITOR_VERSION
6884
{% endif %}
6985
# ADBv2 on 2019.4 causes the test runner to not start on initial import when the
7086
# samples are in the package. Move the samples back into the project.
7187
- mv ./Packages/com.unity.inputsystem/Samples ./Assets
7288
- mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
7389
# 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 }}
75103
artifacts:
76104
UTR_Output.zip:
77105
paths:
@@ -88,11 +116,16 @@ build_ios_{{ editor.version }}_{{ category.name }}:
88116
type: Unity::VM::osx
89117
image: {{ ios_and_tvos_macos_bokken_image }}
90118
flavor: b1.large
119+
variables:
120+
EDITOR_VERSION: {{ editor.version }}
91121
commands:
92122
- {{ utr_install_nix }}
93123
- {{ 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
95125
- ./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 }}
96129
artifacts:
97130
players:
98131
paths:
@@ -108,12 +141,17 @@ run_ios_{{ editor.version }}_{{ category.name }}:
108141
image: {{ ios_and_tvos_macos_bokken_image }}
109142
model: SE
110143
flavor: b1.medium
144+
variables:
145+
EDITOR_VERSION: {{ editor.version }}
111146
skip_checkout: true
112147
dependencies:
113148
- .yamato/upm-ci.yml#build_ios_{{ editor.version }}_{{ category.name }}
114149
commands:
115150
- {{ 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 }}
117155
artifacts:
118156
logs:
119157
paths:
@@ -126,11 +164,16 @@ build_tvos_{{ editor.version }}:
126164
type: Unity::VM::osx
127165
image: {{ ios_and_tvos_macos_bokken_image }}
128166
flavor: b1.large
167+
variables:
168+
EDITOR_VERSION: {{ editor.version }}
129169
commands:
130170
- {{ utr_install_nix }}
131171
- {{ 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
133173
- ./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 }}
134177
artifacts:
135178
players:
136179
paths:
@@ -145,12 +188,17 @@ run_tvos_{{ editor.version }}:
145188
type: Unity::mobile::appletv
146189
image: {{ ios_and_tvos_macos_bokken_image }}
147190
flavor: b1.medium
191+
variables:
192+
EDITOR_VERSION: {{ editor.version }}
148193
skip_checkout: true
149194
dependencies:
150195
- .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
151196
commands:
152197
- {{ utr_install_nix }}
153198
- ./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 }}
154202
artifacts:
155203
logs:
156204
paths:
@@ -164,11 +212,16 @@ build_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
164212
type: Unity::VM
165213
image: package-ci/win10:default
166214
flavor: b1.xlarge
215+
variables:
216+
EDITOR_VERSION: {{ editor.version }}
167217
commands:
168218
- {{ utr_install_win }}
169219
- {{ 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
171221
- ./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 }}
172225
artifacts:
173226
players:
174227
paths:
@@ -183,6 +236,8 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
183236
type: Unity::mobile::shield
184237
image: package-ci/win10:default
185238
flavor: b1.medium
239+
variables:
240+
EDITOR_VERSION: {{ editor.version }}
186241
# Skip repository cloning
187242
skip_checkout: true
188243
# Set a dependency on the build job
@@ -201,7 +256,9 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
201256
after:
202257
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
203258
- 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 }}
205262
# Set uploadable artifact paths
206263
artifacts:
207264
logs:
@@ -212,7 +269,7 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
212269
{% endfor %} # editors
213270

214271
all_tests:
215-
name: All Tests
272+
name: All Tests
216273
dependencies:
217274
{% for editor in editors %}
218275
{% for platform in platforms_win %}

0 commit comments

Comments
 (0)