upm-ci-webrtc-packages.yml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805
  1. {% metadata_file .yamato/package.metafile %}
  2. editor_version_for_validate: 2019.4
  3. editor_version_for_trigger: 2021.3
  4. platforms:
  5. - name: win
  6. type: Unity::VM
  7. gpu_type: Unity::VM::GPU
  8. image: renderstreaming/win10:v0.3.13-1084239
  9. gpu_image: renderstreaming/win10:v0.3.13-1084240
  10. flavor: b1.large
  11. model: rtx2080
  12. build_command: BuildScripts~/build_plugin_win.cmd
  13. test_command: BuildScripts~/test_plugin_win.cmd
  14. plugin_path: Runtime/Plugins/x86_64/webrtc.dll
  15. - name: linux
  16. type: Unity::VM
  17. gpu_type: Unity::VM::GPU
  18. image: renderstreaming/ubuntu:v0.2.7-1238331
  19. gpu_image: renderstreaming/ubuntu:v0.2.7-1238332
  20. flavor: b1.large
  21. model: rtx2080
  22. build_command: BuildScripts~/build_plugin_linux.sh
  23. test_command: BuildScripts~/test_plugin_linux.sh
  24. plugin_path: Runtime/Plugins/x86_64/libwebrtc.so
  25. - name: macos
  26. type: Unity::metal::macmini
  27. gpu_type: Unity::metal::macmini
  28. image: package-ci/mac:v1.21.1-1092905
  29. gpu_image: package-ci/mac:v1.21.1-1092905
  30. flavor: m1.mac
  31. build_command: BuildScripts~/build_plugin_mac.sh
  32. test_command: BuildScripts~/test_plugin_mac.sh
  33. plugin_path: Runtime/Plugins/macOS/libwebrtc.dylib
  34. - name: ios
  35. type: Unity::metal::macmini
  36. gpu_type: Unity::metal::macmini
  37. image: package-ci/mac:v1.21.1-1092905
  38. gpu_image: package-ci/mac:v1.21.1-1092905
  39. flavor: m1.mac
  40. build_command: BuildScripts~/build_plugin_ios.sh
  41. test_command: BuildScripts~/test_plugin_ios.sh
  42. plugin_path: Runtime/Plugins/iOS/webrtc.framework/**
  43. - name: android
  44. type: Unity::VM
  45. gpu_type: Unity::VM
  46. image: renderstreaming/android-linux-build:v0.1.8-1084252
  47. gpu_image: renderstreaming/android-linux-build:v0.1.8-1084252
  48. flavor: b1.large
  49. build_command: BuildScripts~/build_plugin_android.sh
  50. test_command: BuildScripts~/test_plugin_android.sh
  51. plugin_path: Runtime/Plugins/Android/libwebrtc.aar
  52. test_targets:
  53. - name: win
  54. type: Unity::VM
  55. image: package-ci/win10:v1.21.0-1103459
  56. flavor: b1.large
  57. is_gpu: false
  58. gfx_types:
  59. - name: d3d11
  60. extra-editor-arg: force-d3d11
  61. - name: d3d12
  62. extra-editor-arg: force-d3d12
  63. - name: vulkan
  64. extra-editor-arg: force-vulkan
  65. test_params:
  66. - backend: mono
  67. platform: editmode
  68. - backend: mono
  69. platform: playmode
  70. - backend: mono
  71. platform: standalone
  72. - backend: il2cpp
  73. platform: standalone
  74. - name: linux
  75. type: Unity::VM
  76. image: renderstreaming/ubuntu:v0.2.7-1238331
  77. flavor: b1.large
  78. is_gpu: false
  79. gfx_types:
  80. - name: glcore
  81. extra-editor-arg: force-glcore
  82. - name: vulkan
  83. extra-editor-arg: force-vulkan
  84. test_params:
  85. - backend: mono
  86. platform: editmode
  87. - backend: mono
  88. platform: playmode
  89. - backend: mono
  90. platform: standalone
  91. - backend: il2cpp
  92. platform: standalone
  93. - name: win-gpu
  94. type: Unity::VM::GPU
  95. image: package-ci/win10:v4.0.0-1214578
  96. flavor: b1.large
  97. model: rtx2080
  98. is_gpu: true
  99. gfx_types:
  100. - name: d3d11
  101. extra-editor-arg: force-d3d11
  102. - name: d3d12
  103. extra-editor-arg: force-d3d12
  104. - name: vulkan
  105. extra-editor-arg: force-vulkan
  106. test_params:
  107. - backend: mono
  108. platform: editmode
  109. - backend: mono
  110. platform: playmode
  111. - backend: mono
  112. platform: standalone
  113. - backend: il2cpp
  114. platform: standalone
  115. - name: linux-gpu
  116. type: Unity::VM::GPU
  117. image: renderstreaming/ubuntu:v0.2.7-1238332
  118. flavor: b1.large
  119. model: rtx2080
  120. is_gpu: true
  121. gfx_types:
  122. - name: glcore
  123. extra-editor-arg: force-glcore
  124. - name: vulkan
  125. extra-editor-arg: force-vulkan
  126. test_params:
  127. - backend: mono
  128. platform: editmode
  129. - backend: mono
  130. platform: playmode
  131. - backend: mono
  132. platform: standalone
  133. - backend: il2cpp
  134. platform: standalone
  135. - name: macos
  136. type: Unity::metal::macmini
  137. image: package-ci/mac:v1.21.1-1092905
  138. flavor: m1.mac
  139. architecture: x64
  140. gfx_types:
  141. - name: metal
  142. extra-editor-arg: force-metal
  143. test_params:
  144. - backend: mono
  145. utr-backend: Mono2X
  146. additional_component_arg: StandaloneSupport-Mono
  147. platform: editmode
  148. - backend: mono
  149. utr-backend: Mono2X
  150. additional_component_arg: StandaloneSupport-Mono
  151. platform: playmode
  152. - backend: mono
  153. utr-backend: Mono2X
  154. additional_component_arg: StandaloneSupport-Mono
  155. platform: standalone
  156. - backend: il2cpp
  157. utr-backend: Il2Cpp
  158. additional_component_arg: StandaloneSupport-IL2CPP
  159. platform: standalone
  160. - name: macos-m1
  161. type: Unity::metal::devkit
  162. image: package-ci/mac:v1.21.1-1092905
  163. flavor: m1.mac
  164. architecture: arm64
  165. gfx_types:
  166. - name: metal
  167. extra-editor-arg: force-metal
  168. test_params:
  169. - backend: mono
  170. utr-backend: Mono2X
  171. additional_component_arg: StandaloneSupport-Mono
  172. platform: editmode
  173. - backend: mono
  174. utr-backend: Mono2X
  175. additional_component_arg: StandaloneSupport-Mono
  176. platform: playmode
  177. - backend: mono
  178. utr-backend: Mono2X
  179. additional_component_arg: StandaloneSupport-Mono
  180. platform: standalone
  181. - backend: il2cpp
  182. utr-backend: Il2Cpp
  183. additional_component_arg: StandaloneSupport-IL2CPP
  184. platform: standalone
  185. test_targets_android:
  186. - name: vulkan
  187. playergraphicsapi: Vulkan
  188. extra-editor-arg: vulkan
  189. - name: opengles3
  190. playergraphicsapi: OpenGLES3
  191. extra-editor-arg: gles3
  192. test_architectures_macos:
  193. - name: x64
  194. target_name: macos
  195. editor_version: 2019.4
  196. architecture: x64
  197. - name: x64 (Rosetta 2)
  198. target_name: macos-m1
  199. editor_version: 2019.4
  200. architecture: x64
  201. - name: x64
  202. target_name: macos
  203. editor_version: 2020.3
  204. architecture: x64
  205. - name: x64 (Rosetta 2)
  206. target_name: macos-m1
  207. editor_version: 2020.3
  208. architecture: x64
  209. - name: x64
  210. target_name: macos
  211. editor_version: 2021.3
  212. architecture: x64
  213. - name: x64 (Rosetta 2)
  214. target_name: macos-m1
  215. editor_version: 2021.3
  216. architecture: x64
  217. - name: arm64 (Apple Silicon)
  218. target_name: macos-m1
  219. editor_version: 2021.3
  220. architecture: arm64
  221. - name: x64
  222. target_name: macos
  223. editor_version: 2022.1
  224. architecture: x64
  225. - name: x64 (Rosetta 2)
  226. target_name: macos-m1
  227. editor_version: 2022.1
  228. architecture: x64
  229. - name: arm64 (Apple Silicon)
  230. target_name: macos-m1
  231. editor_version: 2022.1
  232. architecture: arm64
  233. - name: x64
  234. target_name: macos
  235. editor_version: trunk
  236. architecture: x64
  237. - name: x64 (Rosetta 2)
  238. target_name: macos-m1
  239. editor_version: trunk
  240. architecture: x64
  241. - name: arm64 (Apple Silicon)
  242. target_name: macos-m1
  243. editor_version: trunk
  244. architecture: arm64
  245. package:
  246. name: webrtc
  247. packagename: com.unity.webrtc
  248. ---
  249. {% for platform in platforms %}
  250. build_webrtc_plugin_{{ platform.name }}:
  251. name: Build webrtc plugin {{ platform.name }}
  252. agent:
  253. type: {{ platform.type }}
  254. image: {{ platform.image }}
  255. flavor: {{ platform.flavor }}
  256. commands:
  257. - {{ platform.build_command }}
  258. artifacts:
  259. {{ platform.name }}_plugin:
  260. paths:
  261. - {{ platform.plugin_path }}
  262. {% endfor %}
  263. {% for platform in platforms %}
  264. {% if platform.name != "android" and platform.name != "ios" %}
  265. test_webrtc_plugin_{{ platform.name }}:
  266. name: Test webrtc plugin {{ platform.name }}
  267. agent:
  268. type: {{ platform.type }}
  269. image: {{ platform.image }}
  270. flavor: {{ platform.flavor }}
  271. commands:
  272. - {{ platform.test_command }}
  273. {% endif %}
  274. {% endfor %}
  275. {% for platform in platforms %}
  276. {% if platform.name == "win" or platform.name == "linux" %}
  277. test_webrtc_plugin_{{ platform.name }}_gpu:
  278. name: Test webrtc plugin {{ platform.name }} with GPU
  279. agent:
  280. type: {{ platform.gpu_type }}
  281. image: {{ platform.gpu_image }}
  282. flavor: {{ platform.flavor }}
  283. {% if platform.model %}
  284. model: {{ platform.model }}
  285. {% endif %}
  286. commands:
  287. - {{ platform.test_command }}
  288. {% endif %}
  289. {% endfor %}
  290. #todo(kazuki): test it on Android mobile device
  291. test_webrtc_plugin_android:
  292. name: Test webrtc plugin Android
  293. agent:
  294. type: Unity::mobile::shield
  295. image: mobile/android-package-ci-win:v0.1.4-1212670
  296. flavor: b1.medium
  297. skip_checkout: true
  298. dependencies:
  299. - .yamato/upm-ci-{{ package.name }}-packages.yml#build_webrtc_plugin_test_android
  300. commands:
  301. - wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey.pub -O %USERPROFILE%/.android/adbkey.pub
  302. - wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey -O %USERPROFILE%/.android/adbkey
  303. - |
  304. # Set the IP of the device. In case device gets lost, UTR will try to recconect to ANDROID_DEVICE_CONNECTION
  305. set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
  306. # Establish an ADB connection with the device
  307. start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
  308. # List the connected devices
  309. start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
  310. NetSh Advfirewall set allprofiles state off
  311. start %ANDROID_SDK_ROOT%\platform-tools\adb.exe push build/WebRTCLibTest /data/local/tmp
  312. start %ANDROID_SDK_ROOT%\platform-tools\adb.exe shell /data/local/tmp/WebRTCLibTest
  313. build_webrtc_plugin_test_android:
  314. name: Build webrtc plugin test runtime Android
  315. agent:
  316. type: Unity::VM
  317. image: renderstreaming/android-linux-build:v0.1.8-1084252
  318. flavor: b1.large
  319. commands:
  320. - BuildScripts~/build_test_runtime_android.sh
  321. artifacts:
  322. runtime:
  323. paths:
  324. - "build/WebRTCLibTest"
  325. test_webrtc_plugin_all_platform:
  326. name: Trigger test for webrtc plugin for all platforms
  327. dependencies:
  328. {% for platform in platforms %}
  329. # todo(kazuki) native plugin test is not supported on iOS
  330. {% if platform.name != "ios" %}
  331. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_webrtc_plugin_{{ platform.name }}
  332. {% endif %}
  333. {% if platform.name == "win" or platform.name == "linux" %}
  334. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_webrtc_plugin_{{ platform.name }}_gpu
  335. {% endif %}
  336. {% endfor %}
  337. pack_{{ package.name }}:
  338. name: Pack {{ package.packagename }}
  339. agent:
  340. type: Unity::VM
  341. image: renderstreaming/ubuntu:v0.2.7-1238331
  342. flavor: b1.large
  343. commands:
  344. - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
  345. - upm-ci package pack
  346. artifacts:
  347. {{ package.name }}_package:
  348. paths:
  349. - "upm-ci~/packages/**/*"
  350. dependencies:
  351. {% for platform in platforms %}
  352. - .yamato/upm-ci-{{ package.name }}-packages.yml#build_webrtc_plugin_{{ platform.name }}
  353. {% endfor %}
  354. {% for editor in editors %}
  355. build_{{ package.name }}_{{ editor.version }}_ios:
  356. name : Build {{ package.packagename }} with {{ editor.version }} for ios device
  357. agent:
  358. type: Unity::VM::osx
  359. image: package-ci/mac:v1.21.1-1092905
  360. flavor: b1.large
  361. commands:
  362. - |
  363. find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
  364. cp -rf upm-ci~/package/Runtime/Plugins Runtime/
  365. - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
  366. - unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast -w
  367. - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr --output utr
  368. - chmod +x ./utr
  369. - ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject=WebRTC~ --player-save-path=build/players --architecture=arm64 --artifacts_path=build/logs --build-only
  370. artifacts:
  371. players:
  372. paths:
  373. - "build/players/**"
  374. logs:
  375. paths:
  376. - "build/logs/**"
  377. dependencies:
  378. - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
  379. test_{{ package.name }}_{{ editor.version }}_ios:
  380. name: Test {{ package.packagename }} with {{ editor.version }} on ios device
  381. agent:
  382. type: Unity::mobile::iPhone
  383. image: mobile/ios-macos-11:v0.1.2-1078219
  384. flavor: b1.medium
  385. skip_checkout: true
  386. dependencies:
  387. - .yamato/upm-ci-{{ package.name }}-packages.yml#build_{{ package.name }}_{{ editor.version }}_ios
  388. commands:
  389. # Download standalone UnityTestRunner
  390. - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
  391. # Give UTR execution permissions
  392. - chmod +x ./utr
  393. # Run the test build on the device
  394. - ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results
  395. artifacts:
  396. logs:
  397. paths:
  398. - "build/test-results/**"
  399. {% for target in test_targets_android %}
  400. build_{{ package.name }}_{{ editor.version }}_android_{{ target.name }}:
  401. name : Build {{ package.packagename }} with {{ editor.version }} for android device {{ target.name }}
  402. agent:
  403. type: Unity::VM::osx
  404. image: package-ci/mac:v1.21.1-1092905
  405. flavor: b1.xlarge
  406. commands:
  407. - |
  408. find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
  409. cp -rf upm-ci~/package/Runtime/Plugins Runtime/
  410. {% if target.name == "vulkan" -%}
  411. cp -f WebRTC~/ProjectSettings/ProjectSettings-android-vulkan.asset WebRTC~/ProjectSettings/ProjectSettings.asset
  412. {% endif %}
  413. - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
  414. - unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast -w
  415. - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr --output utr
  416. - chmod +x ./utr
  417. - ./utr --suite=playmode --platform=Android --editor-location=.Editor --testproject=WebRTC~ --player-save-path=build/players --architecture=arm64 --artifacts_path=build/logs --scripting-backend=il2cpp --build-only
  418. artifacts:
  419. players:
  420. paths:
  421. - "build/players/**"
  422. logs:
  423. paths:
  424. - "build/logs/**"
  425. dependencies:
  426. - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
  427. test_{{ package.name }}_{{ editor.version }}_android_{{ target.name }}:
  428. name: Test {{ package.packagename }} with {{ editor.version }} on android device {{ target.name }}
  429. agent:
  430. type: Unity::mobile::shield
  431. image: mobile/android-package-ci-win:v0.1.4-1212670
  432. flavor: b1.medium
  433. skip_checkout: true
  434. dependencies:
  435. - .yamato/upm-ci-{{ package.name }}-packages.yml#build_{{ package.name }}_{{ editor.version }}_android_{{ target.name }}
  436. commands:
  437. - wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey.pub -O %USERPROFILE%/.android/adbkey.pub
  438. - wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey -O %USERPROFILE%/.android/adbkey
  439. - |
  440. # Download standalone UnityTestRunner
  441. curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr.bat --output utr.bat
  442. # Set the IP of the device. In case device gets lost, UTR will try to recconect to ANDROID_DEVICE_CONNECTION
  443. set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
  444. # Establish an ADB connection with the device
  445. start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
  446. # List the connected devices
  447. start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
  448. NetSh Advfirewall set allprofiles state off
  449. ./utr --suite=playmode --platform=android --player-load-path=build/players --artifacts_path=build/test-results
  450. artifacts:
  451. logs:
  452. paths:
  453. - "build/test-results/**"
  454. {% endfor %}
  455. {% endfor %}
  456. {% for target in test_targets %}
  457. {% for editor in editors %}
  458. {% for param in target.test_params %}
  459. {% for gfx_type in target.gfx_types %}
  460. {% if target.name != "macos" and target.name != "macos-m1" %}
  461. test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ gfx_type.name }}:
  462. name : Test {{ package.packagename }} with {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ target.name }} {{ gfx_type.name }}
  463. agent:
  464. type: {{ target.type }}
  465. image: {{ target.image }}
  466. flavor: {{ target.flavor }}
  467. {% if target.is_gpu == "true" and target.model %}
  468. model: {{ target.model }}
  469. {% endif %}
  470. commands:
  471. - pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
  472. - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
  473. - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
  474. - upm-ci package test -u {{ editor.version }} --platform {{ param.platform }} --backend {{ param.backend }} --extra-editor-arg {{ gfx_type.extra-editor-arg }} --enable-load-and-test-isolation
  475. artifacts:
  476. {{ package.name }}_{{ param.backend }}_{{ editor.version }}_{{ target.name }}_test_results:
  477. paths:
  478. - "upm-ci~/test-results/**/*"
  479. dependencies:
  480. - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
  481. {% elsif param.platform == "standalone" %}
  482. # build standalone runtime for testing on macOS(Intel/Silicon)
  483. build_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ gfx_type.name }}:
  484. name : Build {{ package.packagename }} with {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ target.name }} {{ gfx_type.name }}
  485. agent:
  486. type: Unity::VM::osx
  487. image: package-ci/mac:v1.21.1-1092905
  488. flavor: m1.mac
  489. commands:
  490. - |
  491. find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
  492. cp -rf upm-ci~/package/Runtime/Plugins Runtime/
  493. - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
  494. - unity-downloader-cli -c Editor -c {{ param.additional_component_arg }} -u {{ editor.version }} --fast -w
  495. - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr --output utr
  496. - chmod +x ./utr
  497. - ./utr --suite=playmode --platform=StandaloneOSX --editor-location=.Editor --testproject=WebRTC~ --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ param.utr-backend }} --extra-editor-arg="-nographics" --build-only
  498. artifacts:
  499. players:
  500. paths:
  501. - "build/players/**"
  502. logs:
  503. paths:
  504. - "build/logs/**"
  505. dependencies:
  506. - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
  507. # standalone test on macOS(Intel/Silicon)
  508. {% assign architectures = test_architectures_macos | where: "editor_version", editor.version | where: "target_name", target.name %}
  509. {% for architecture in architectures %}
  510. test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ architecture.architecture }}_{{ gfx_type.name }}:
  511. name : Test {{ package.packagename }} with {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ target.name }} {{ architecture.name }} {{ gfx_type.name }}
  512. agent:
  513. type: {{ target.type }}
  514. image: {{ target.image }}
  515. flavor: {{ target.flavor }}
  516. variables:
  517. TEMPLATE_FILE: BuildScripts~/template/remote.sh.template
  518. PACKAGE_DIR: com.unity.webrtc
  519. PLAYER_LOAD_PATH: build/players
  520. TEST_RESULT_DIR: upm-ci~/test-results/
  521. TEST_TARGET: macos
  522. TEST_PLATFORM: {{ param.platform }}
  523. TEST_ARCHITECTURE : {{ target.architecture }}
  524. SCRIPTING_BACKEND: {{ param.backend }}
  525. EDITOR_VERSION: {{ editor.version }}
  526. EXTRA_EDITOR_ARG: {{ gfx_type.extra-editor-arg }}
  527. commands:
  528. - BuildScripts~/test_package_mac.sh
  529. artifacts:
  530. {{ package.name }}_{{ param.backend }}_{{ editor.version }}_{{ target.name }}_test_results:
  531. paths:
  532. - "upm-ci~/test-results/**"
  533. dependencies:
  534. - .yamato/upm-ci-{{ package.name }}-packages.yml#build_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ gfx_type.name }}
  535. # end standalone test on macOS(Intel/Silicon)
  536. {% endfor %}
  537. {% else %}
  538. # editmode/playmode test on macOS(Intel/Silicon)
  539. {% assign architectures = test_architectures_macos | where: "editor_version", editor.version | where: "target_name", target.name %}
  540. {% for architecture in architectures %}
  541. test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ architecture.architecture }}_{{ gfx_type.name }}:
  542. name : Test {{ package.packagename }} with {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ target.name }} {{ architecture.name }} {{ gfx_type.name }}
  543. agent:
  544. type: {{ target.type }}
  545. image: {{ target.image }}
  546. flavor: {{ target.flavor }}
  547. variables:
  548. TEMPLATE_FILE: BuildScripts~/template/remote.sh.template
  549. PACKAGE_DIR: com.unity.webrtc
  550. TEST_PROJECT_DIR: com.unity.webrtc/WebRTC~
  551. TEST_RESULT_DIR: upm-ci~/test-results/
  552. TEST_TARGET: macos
  553. TEST_PLATFORM: {{ param.platform }}
  554. TEST_ARCHITECTURE : {{ architecture.architecture }}
  555. SCRIPTING_BACKEND: {{ param.backend }}
  556. EDITOR_VERSION: {{ editor.version }}
  557. EXTRA_EDITOR_ARG: {{ gfx_type.extra-editor-arg }}
  558. commands:
  559. - |
  560. find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
  561. cp -rf upm-ci~/package/Runtime/Plugins Runtime/
  562. - BuildScripts~/test_package_mac.sh
  563. artifacts:
  564. {{ package.name }}_{{ param.backend }}_{{ editor.version }}_{{ target.name }}_test_results:
  565. paths:
  566. - "upm-ci~/test-results/**"
  567. dependencies:
  568. - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
  569. # end editmode/playmode test on macOS(Intel/Silicon)
  570. {% endfor %}
  571. {% endif %}
  572. {% endfor %}
  573. {% endfor %}
  574. {% endfor %}
  575. {% endfor %}
  576. trigger_pullrequest:
  577. name : Trigger by the Pull requests which directs to main branch or feature branch
  578. dependencies:
  579. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor_version_for_trigger }}_gpu
  580. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_webrtc_plugin_all_platform
  581. triggers:
  582. expression: pull_request.target eq "main" OR pull_request.target match "feat/.*"
  583. trigger_package_validate:
  584. name : Trigger test for package validation
  585. dependencies:
  586. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_editmode_mono_win_{{ editor_version_for_validate }}_d3d11
  587. {% for editor in editors %}
  588. trigger_test_{{ package.name }}_{{ editor.version }}_gpu:
  589. name : Trigger test {{ package.packagename }} {{ editor.version }} all platforms with GPU
  590. dependencies:
  591. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor.version }}_gpu
  592. test_{{ package.name }}_{{ editor.version }}_nogpu:
  593. name : Test {{ package.packagename }} {{ editor.version }} all platforms without GPU
  594. dependencies:
  595. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor.version }}_ios
  596. {% for target in test_targets_android %}
  597. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor.version }}_android_{{ target.name }}
  598. {% endfor %}
  599. {% for target in test_targets %}
  600. {% for param in target.test_params %}
  601. {% for gfx_type in target.gfx_types %}
  602. # vulkan and d3d12 gfx device is not supported on VMs without GPU
  603. {% if target.is_gpu == "false" and gfx_type.name != "vulkan" and gfx_type.name != "d3d12" %}
  604. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ gfx_type.name }}
  605. {% endif %}
  606. {% endfor %}
  607. {% endfor %}
  608. {% endfor %}
  609. test_{{ package.name }}_{{ editor.version }}_gpu:
  610. name : Test {{ package.packagename }} {{ editor.version }} all platforms with GPU
  611. dependencies:
  612. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor.version }}_ios
  613. {% for target in test_targets_android %}
  614. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor.version }}_android_{{ target.name }}
  615. {% endfor %}
  616. {% for target in test_targets %}
  617. {% for param in target.test_params %}
  618. {% for gfx_type in target.gfx_types %}
  619. {% if target.name == "macos" or target.name == "macos-m1" %}
  620. {% assign architectures = test_architectures_macos | where: "editor_version", editor.version | where: "target_name", target.name %}
  621. {% for architecture in architectures %}
  622. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ architecture.architecture }}_{{ gfx_type.name }}
  623. {% endfor %}
  624. {% elsif target.is_gpu == "true" %}
  625. # workaround: avoid playmode linux glcore
  626. {% if target.name == "linux-gpu" and gfx_type.name == "glcore" and param.platform == "playmode" %}
  627. {% else %}
  628. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ gfx_type.name }}
  629. {% endif %}
  630. {% endif %}
  631. {% endfor %}
  632. {% endfor %}
  633. {% endfor %}
  634. {% endfor %}
  635. {% for platform in platforms %}
  636. {% if platform.name != "macos" %}
  637. {% for editor in editors %}
  638. codecoverage_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
  639. name: Codecoverage {{ package.packagename }} {{ platform.name }} {{ editor.version }}
  640. agent:
  641. type: {{ platform.type }}
  642. image: {{ platform.image }}
  643. flavor: {{ platform.flavor }}
  644. commands:
  645. - pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
  646. - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
  647. - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
  648. - upm-ci package test -u {{ editor.version }} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:-UnityEngine.*,+Unity.WebRTC"
  649. artifacts:
  650. {{ package.name }}_{{ editor.version }}_{{ platform.name }}_coverage_results:
  651. paths:
  652. - "upm-ci~/test-results/**"
  653. dependencies:
  654. - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
  655. {% endfor %}
  656. {% else -%}
  657. {% for editor in editors %}
  658. codecoverage_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
  659. name: Codecoverage {{ package.packagename }} {{ platform.name }} {{ editor.version }}
  660. agent:
  661. type: {{ platform.type }}
  662. image: {{ platform.image }}
  663. flavor: {{ platform.flavor }}
  664. commands:
  665. - |
  666. cd ../
  667. ls com.unity.webrtc/upm-ci~/packages/com.unity.webrtc-*.tgz | xargs tar xzvf
  668. cp -rf package/ com.unity.webrtc
  669. cd com.unity.webrtc
  670. - brew install node
  671. - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
  672. - git clone git@github.cds.internal.unity3d.com:unity/utr.git
  673. - rm -Rf ./utr/.git
  674. - ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP "bash -lc 'pip3 install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade --user'"
  675. - scp -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" -r ../com.unity.webrtc/ bokken@$BOKKEN_DEVICE_IP:~/com.unity.webrtc
  676. - scp -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" -pr ./utr/ bokken@$BOKKEN_DEVICE_IP:~/com.unity.webrtc/
  677. - ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP '$(/usr/local/bin/python3 -m site --user-base)/bin/unity-downloader-cli -u {{ editor.version }} -c editor --wait --published'
  678. - |
  679. ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP 'cd ~/com.unity.webrtc/WebRTC~ && ~/com.unity.webrtc/utr/utr --suite=editor --suite=playmode --testproject=/Users/bokken/com.unity.webrtc/WebRTC~ --editor-location=/Users/bokken/.Editor --artifacts_path=/Users/bokken/com.unity.webrtc/WebRTC~/test-results --extra-editor-arg="-enablePackageManagerTraces" --enable-code-coverage --coverage-results-path=/Users/bokken/com.unity.webrtc/WebRTC~/test-results --coverage-options="generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:-UnityEngine.*,+Unity.WebRTC"'
  680. UTR_RESULT=$?
  681. mkdir -p upm-ci~/test-results/
  682. scp -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" -r bokken@$BOKKEN_DEVICE_IP:/Users/bokken/com.unity.webrtc/WebRTC~/test-results/ upm-ci~/test-results/
  683. exit $UTR_RESULT
  684. artifacts:
  685. {{ package.name }}_{{ editor.version }}_{{ platform.name }}_coverage_results:
  686. paths:
  687. - "upm-ci~/test-results/**"
  688. dependencies:
  689. - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
  690. {% endfor %}
  691. {% endif %}
  692. {% endfor %}
  693. push_plugin:
  694. name: Push to Github webrtc native plugin
  695. agent:
  696. type: Unity::VM
  697. image: package-ci/ubuntu:v2.0.0-947481
  698. flavor: b1.large
  699. commands:
  700. - git config --global user.email "kazuki@unity3d.com"
  701. - git config --global user.name "Kazuki Matsumoto"
  702. {% for platform in platforms %}
  703. - git add {{ platform.plugin_path }}
  704. {% endfor %}
  705. - git commit -m "[skip ci] Update plugins"
  706. - git push origin HEAD:$GIT_BRANCH
  707. dependencies:
  708. {% for platform in platforms %}
  709. - .yamato/upm-ci-{{ package.name }}-packages.yml#build_webrtc_plugin_{{ platform.name }}
  710. {% endfor %}
  711. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_webrtc_plugin_all_platform
  712. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor_version_for_trigger }}_gpu
  713. # - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor_version_for_trigger }}_nogpu
  714. publish_{{ package.name }}:
  715. name: Publish {{ package.packagename }}
  716. agent:
  717. type: Unity::VM
  718. image: package-ci/win10:v1.20.1-1032259
  719. flavor: b1.large
  720. variables:
  721. UPMCI_ENABLE_PACKAGE_SIGNING: 1
  722. commands:
  723. - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
  724. - upm-ci package publish
  725. artifacts:
  726. {{ package.name }}_artifacts.zip:
  727. paths:
  728. - "upm-ci~/packages/*.tgz"
  729. dependencies:
  730. - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
  731. {% for editor in editors %}
  732. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_editmode_mono_linux_{{ editor.version }}_glcore
  733. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_editmode_mono_win_{{ editor.version }}_d3d11
  734. {% endfor %}
  735. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_webrtc_plugin_all_platform
  736. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor_version_for_trigger }}_gpu
  737. # - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor_version_for_trigger }}_nogpu
  738. publish_dry_run_{{ package.name }}:
  739. name: Publish Dry Run {{ package.packagename }}
  740. agent:
  741. type: Unity::VM
  742. image: package-ci/win10:v1.20.1-1032259
  743. flavor: b1.large
  744. variables:
  745. UPMCI_ENABLE_PACKAGE_SIGNING: 1
  746. commands:
  747. - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
  748. - upm-ci package publish --dry-run
  749. triggers:
  750. tags:
  751. only:
  752. - /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
  753. artifacts:
  754. {{ package.name }}_artifacts.zip:
  755. paths:
  756. - "upm-ci~/packages/*.tgz"
  757. dependencies:
  758. - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
  759. {% for editor in editors %}
  760. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_editmode_mono_linux_{{ editor.version }}_glcore
  761. - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_editmode_mono_win_{{ editor.version }}_d3d11
  762. {% endfor %}