Skip to content

Commit 3d5266a

Browse files
authored
NEW: Add instability detection automation to test jobs (#2036)
* added instability detection into the "after" section for our jobs * tool version pinned at 0.5.1 for now
1 parent de8d662 commit 3d5266a

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

.yamato/config.metadata

+13-1
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,37 @@ platforms_nix:
3636
type: Unity::VM::osx
3737
image: package-ci/macos-13:default
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
4142
image: package-ci/macos-13:default
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
4648
image: package-ci/macos-13:default
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,10 @@ 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

.yamato/upm-ci.yml

+25-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
- move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
3535
# Now run our full test suite that sits in Assets/Tests by running UTR on our project.
3636
- ./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
37+
after:
38+
- {{ instabilities_install_win }}
39+
- {{ instabilities_run_win }}
3740
artifacts:
3841
UTR_Output.zip:
3942
paths:
@@ -72,6 +75,9 @@
7275
- mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
7376
# Now run our full test suite that sits in Assets/Tests by running UTR on our project.
7477
- ./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
78+
after:
79+
- {{ instabilities_install_nix }}
80+
- {{ platform.instabilities_run }}
7581
artifacts:
7682
UTR_Output.zip:
7783
paths:
@@ -93,6 +99,9 @@ build_ios_{{ editor.version }}_{{ category.name }}:
9399
- {{ unity_downloader_install }}
94100
- unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast --wait
95101
- ./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
102+
after:
103+
- {{ instabilities_install_nix }}
104+
- {{ instabilities_run_mac }}
96105
artifacts:
97106
players:
98107
paths:
@@ -113,7 +122,10 @@ run_ios_{{ editor.version }}_{{ category.name }}:
113122
- .yamato/upm-ci.yml#build_ios_{{ editor.version }}_{{ category.name }}
114123
commands:
115124
- {{ 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
125+
- ./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
126+
after:
127+
- {{ instabilities_install_nix }}
128+
- {{ instabilities_run_mac }}
117129
artifacts:
118130
logs:
119131
paths:
@@ -131,6 +143,9 @@ build_tvos_{{ editor.version }}:
131143
- {{ unity_downloader_install }}
132144
- unity-downloader-cli -c Editor -c AppleTV -u {{ editor.version }} --fast --wait
133145
- ./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
146+
after:
147+
- {{ instabilities_install_nix }}
148+
- {{ instabilities_run_mac }}
134149
artifacts:
135150
players:
136151
paths:
@@ -151,6 +166,9 @@ run_tvos_{{ editor.version }}:
151166
commands:
152167
- {{ utr_install_nix }}
153168
- ./utr --suite=playmode --platform=tvOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
169+
after:
170+
- {{ instabilities_install_nix }}
171+
- {{ instabilities_run_mac }}
154172
artifacts:
155173
logs:
156174
paths:
@@ -169,6 +187,9 @@ build_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
169187
- {{ unity_downloader_install }}
170188
- unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast --wait
171189
- ./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
190+
after:
191+
- {{ instabilities_install_win }}
192+
- {{ instabilities_run_win }}
172193
artifacts:
173194
players:
174195
paths:
@@ -201,7 +222,9 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
201222
after:
202223
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
203224
- 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
225+
- powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe logcat -d > build/test-results/device_log.txt
226+
- {{ instabilities_install_win }}
227+
- {{ instabilities_run_win }}
205228
# Set uploadable artifact paths
206229
artifacts:
207230
logs:

0 commit comments

Comments
 (0)