123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805 |
- {% metadata_file .yamato/package.metafile %}
- editor_version_for_validate: 2019.4
- editor_version_for_trigger: 2021.3
- platforms:
- - name: win
- type: Unity::VM
- gpu_type: Unity::VM::GPU
- image: renderstreaming/win10:v0.3.13-1084239
- gpu_image: renderstreaming/win10:v0.3.13-1084240
- flavor: b1.large
- model: rtx2080
- build_command: BuildScripts~/build_plugin_win.cmd
- test_command: BuildScripts~/test_plugin_win.cmd
- plugin_path: Runtime/Plugins/x86_64/webrtc.dll
- - name: linux
- type: Unity::VM
- gpu_type: Unity::VM::GPU
- image: renderstreaming/ubuntu:v0.2.7-1238331
- gpu_image: renderstreaming/ubuntu:v0.2.7-1238332
- flavor: b1.large
- model: rtx2080
- build_command: BuildScripts~/build_plugin_linux.sh
- test_command: BuildScripts~/test_plugin_linux.sh
- plugin_path: Runtime/Plugins/x86_64/libwebrtc.so
- - name: macos
- type: Unity::metal::macmini
- gpu_type: Unity::metal::macmini
- image: package-ci/mac:v1.21.1-1092905
- gpu_image: package-ci/mac:v1.21.1-1092905
- flavor: m1.mac
- build_command: BuildScripts~/build_plugin_mac.sh
- test_command: BuildScripts~/test_plugin_mac.sh
- plugin_path: Runtime/Plugins/macOS/libwebrtc.dylib
- - name: ios
- type: Unity::metal::macmini
- gpu_type: Unity::metal::macmini
- image: package-ci/mac:v1.21.1-1092905
- gpu_image: package-ci/mac:v1.21.1-1092905
- flavor: m1.mac
- build_command: BuildScripts~/build_plugin_ios.sh
- test_command: BuildScripts~/test_plugin_ios.sh
- plugin_path: Runtime/Plugins/iOS/webrtc.framework/**
- - name: android
- type: Unity::VM
- gpu_type: Unity::VM
- image: renderstreaming/android-linux-build:v0.1.8-1084252
- gpu_image: renderstreaming/android-linux-build:v0.1.8-1084252
- flavor: b1.large
- build_command: BuildScripts~/build_plugin_android.sh
- test_command: BuildScripts~/test_plugin_android.sh
- plugin_path: Runtime/Plugins/Android/libwebrtc.aar
- test_targets:
- - name: win
- type: Unity::VM
- image: package-ci/win10:v1.21.0-1103459
- flavor: b1.large
- is_gpu: false
- gfx_types:
- - name: d3d11
- extra-editor-arg: force-d3d11
- - name: d3d12
- extra-editor-arg: force-d3d12
- - name: vulkan
- extra-editor-arg: force-vulkan
- test_params:
- - backend: mono
- platform: editmode
- - backend: mono
- platform: playmode
- - backend: mono
- platform: standalone
- - backend: il2cpp
- platform: standalone
- - name: linux
- type: Unity::VM
- image: renderstreaming/ubuntu:v0.2.7-1238331
- flavor: b1.large
- is_gpu: false
- gfx_types:
- - name: glcore
- extra-editor-arg: force-glcore
- - name: vulkan
- extra-editor-arg: force-vulkan
- test_params:
- - backend: mono
- platform: editmode
- - backend: mono
- platform: playmode
- - backend: mono
- platform: standalone
- - backend: il2cpp
- platform: standalone
- - name: win-gpu
- type: Unity::VM::GPU
- image: package-ci/win10:v4.0.0-1214578
- flavor: b1.large
- model: rtx2080
- is_gpu: true
- gfx_types:
- - name: d3d11
- extra-editor-arg: force-d3d11
- - name: d3d12
- extra-editor-arg: force-d3d12
- - name: vulkan
- extra-editor-arg: force-vulkan
- test_params:
- - backend: mono
- platform: editmode
- - backend: mono
- platform: playmode
- - backend: mono
- platform: standalone
- - backend: il2cpp
- platform: standalone
- - name: linux-gpu
- type: Unity::VM::GPU
- image: renderstreaming/ubuntu:v0.2.7-1238332
- flavor: b1.large
- model: rtx2080
- is_gpu: true
- gfx_types:
- - name: glcore
- extra-editor-arg: force-glcore
- - name: vulkan
- extra-editor-arg: force-vulkan
- test_params:
- - backend: mono
- platform: editmode
- - backend: mono
- platform: playmode
- - backend: mono
- platform: standalone
- - backend: il2cpp
- platform: standalone
- - name: macos
- type: Unity::metal::macmini
- image: package-ci/mac:v1.21.1-1092905
- flavor: m1.mac
- architecture: x64
- gfx_types:
- - name: metal
- extra-editor-arg: force-metal
- test_params:
- - backend: mono
- utr-backend: Mono2X
- additional_component_arg: StandaloneSupport-Mono
- platform: editmode
- - backend: mono
- utr-backend: Mono2X
- additional_component_arg: StandaloneSupport-Mono
- platform: playmode
- - backend: mono
- utr-backend: Mono2X
- additional_component_arg: StandaloneSupport-Mono
- platform: standalone
- - backend: il2cpp
- utr-backend: Il2Cpp
- additional_component_arg: StandaloneSupport-IL2CPP
- platform: standalone
- - name: macos-m1
- type: Unity::metal::devkit
- image: package-ci/mac:v1.21.1-1092905
- flavor: m1.mac
- architecture: arm64
- gfx_types:
- - name: metal
- extra-editor-arg: force-metal
- test_params:
- - backend: mono
- utr-backend: Mono2X
- additional_component_arg: StandaloneSupport-Mono
- platform: editmode
- - backend: mono
- utr-backend: Mono2X
- additional_component_arg: StandaloneSupport-Mono
- platform: playmode
- - backend: mono
- utr-backend: Mono2X
- additional_component_arg: StandaloneSupport-Mono
- platform: standalone
- - backend: il2cpp
- utr-backend: Il2Cpp
- additional_component_arg: StandaloneSupport-IL2CPP
- platform: standalone
- test_targets_android:
- - name: vulkan
- playergraphicsapi: Vulkan
- extra-editor-arg: vulkan
- - name: opengles3
- playergraphicsapi: OpenGLES3
- extra-editor-arg: gles3
- test_architectures_macos:
- - name: x64
- target_name: macos
- editor_version: 2019.4
- architecture: x64
- - name: x64 (Rosetta 2)
- target_name: macos-m1
- editor_version: 2019.4
- architecture: x64
- - name: x64
- target_name: macos
- editor_version: 2020.3
- architecture: x64
- - name: x64 (Rosetta 2)
- target_name: macos-m1
- editor_version: 2020.3
- architecture: x64
- - name: x64
- target_name: macos
- editor_version: 2021.3
- architecture: x64
- - name: x64 (Rosetta 2)
- target_name: macos-m1
- editor_version: 2021.3
- architecture: x64
- - name: arm64 (Apple Silicon)
- target_name: macos-m1
- editor_version: 2021.3
- architecture: arm64
- - name: x64
- target_name: macos
- editor_version: 2022.1
- architecture: x64
- - name: x64 (Rosetta 2)
- target_name: macos-m1
- editor_version: 2022.1
- architecture: x64
- - name: arm64 (Apple Silicon)
- target_name: macos-m1
- editor_version: 2022.1
- architecture: arm64
- - name: x64
- target_name: macos
- editor_version: trunk
- architecture: x64
- - name: x64 (Rosetta 2)
- target_name: macos-m1
- editor_version: trunk
- architecture: x64
- - name: arm64 (Apple Silicon)
- target_name: macos-m1
- editor_version: trunk
- architecture: arm64
- package:
- name: webrtc
- packagename: com.unity.webrtc
- ---
- {% for platform in platforms %}
- build_webrtc_plugin_{{ platform.name }}:
- name: Build webrtc plugin {{ platform.name }}
- agent:
- type: {{ platform.type }}
- image: {{ platform.image }}
- flavor: {{ platform.flavor }}
- commands:
- - {{ platform.build_command }}
- artifacts:
- {{ platform.name }}_plugin:
- paths:
- - {{ platform.plugin_path }}
- {% endfor %}
- {% for platform in platforms %}
- {% if platform.name != "android" and platform.name != "ios" %}
- test_webrtc_plugin_{{ platform.name }}:
- name: Test webrtc plugin {{ platform.name }}
- agent:
- type: {{ platform.type }}
- image: {{ platform.image }}
- flavor: {{ platform.flavor }}
- commands:
- - {{ platform.test_command }}
- {% endif %}
- {% endfor %}
- {% for platform in platforms %}
- {% if platform.name == "win" or platform.name == "linux" %}
- test_webrtc_plugin_{{ platform.name }}_gpu:
- name: Test webrtc plugin {{ platform.name }} with GPU
- agent:
- type: {{ platform.gpu_type }}
- image: {{ platform.gpu_image }}
- flavor: {{ platform.flavor }}
- {% if platform.model %}
- model: {{ platform.model }}
- {% endif %}
- commands:
- - {{ platform.test_command }}
- {% endif %}
- {% endfor %}
- #todo(kazuki): test it on Android mobile device
- test_webrtc_plugin_android:
- name: Test webrtc plugin Android
- agent:
- type: Unity::mobile::shield
- image: mobile/android-package-ci-win:v0.1.4-1212670
- flavor: b1.medium
- skip_checkout: true
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#build_webrtc_plugin_test_android
- commands:
- - wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey.pub -O %USERPROFILE%/.android/adbkey.pub
- - wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey -O %USERPROFILE%/.android/adbkey
- - |
- # Set the IP of the device. In case device gets lost, UTR will try to recconect to ANDROID_DEVICE_CONNECTION
- set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
- # Establish an ADB connection with the device
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
- # List the connected devices
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
- NetSh Advfirewall set allprofiles state off
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe push build/WebRTCLibTest /data/local/tmp
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe shell /data/local/tmp/WebRTCLibTest
- build_webrtc_plugin_test_android:
- name: Build webrtc plugin test runtime Android
- agent:
- type: Unity::VM
- image: renderstreaming/android-linux-build:v0.1.8-1084252
- flavor: b1.large
- commands:
- - BuildScripts~/build_test_runtime_android.sh
- artifacts:
- runtime:
- paths:
- - "build/WebRTCLibTest"
- test_webrtc_plugin_all_platform:
- name: Trigger test for webrtc plugin for all platforms
- dependencies:
- {% for platform in platforms %}
- # todo(kazuki) native plugin test is not supported on iOS
- {% if platform.name != "ios" %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_webrtc_plugin_{{ platform.name }}
- {% endif %}
- {% if platform.name == "win" or platform.name == "linux" %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_webrtc_plugin_{{ platform.name }}_gpu
- {% endif %}
- {% endfor %}
- pack_{{ package.name }}:
- name: Pack {{ package.packagename }}
- agent:
- type: Unity::VM
- image: renderstreaming/ubuntu:v0.2.7-1238331
- flavor: b1.large
- commands:
- - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
- - upm-ci package pack
- artifacts:
- {{ package.name }}_package:
- paths:
- - "upm-ci~/packages/**/*"
- dependencies:
- {% for platform in platforms %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#build_webrtc_plugin_{{ platform.name }}
- {% endfor %}
- {% for editor in editors %}
- build_{{ package.name }}_{{ editor.version }}_ios:
- name : Build {{ package.packagename }} with {{ editor.version }} for ios device
- agent:
- type: Unity::VM::osx
- image: package-ci/mac:v1.21.1-1092905
- flavor: b1.large
- commands:
- - |
- find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
- cp -rf upm-ci~/package/Runtime/Plugins Runtime/
- - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- - unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast -w
- - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr --output utr
- - chmod +x ./utr
- - ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject=WebRTC~ --player-save-path=build/players --architecture=arm64 --artifacts_path=build/logs --build-only
- artifacts:
- players:
- paths:
- - "build/players/**"
- logs:
- paths:
- - "build/logs/**"
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
- test_{{ package.name }}_{{ editor.version }}_ios:
- name: Test {{ package.packagename }} with {{ editor.version }} on ios device
- agent:
- type: Unity::mobile::iPhone
- image: mobile/ios-macos-11:v0.1.2-1078219
- flavor: b1.medium
- skip_checkout: true
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#build_{{ package.name }}_{{ editor.version }}_ios
- commands:
- # Download standalone UnityTestRunner
- - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
- # Give UTR execution permissions
- - chmod +x ./utr
- # Run the test build on the device
- - ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results
- artifacts:
- logs:
- paths:
- - "build/test-results/**"
- {% for target in test_targets_android %}
- build_{{ package.name }}_{{ editor.version }}_android_{{ target.name }}:
- name : Build {{ package.packagename }} with {{ editor.version }} for android device {{ target.name }}
- agent:
- type: Unity::VM::osx
- image: package-ci/mac:v1.21.1-1092905
- flavor: b1.xlarge
- commands:
- - |
- find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
- cp -rf upm-ci~/package/Runtime/Plugins Runtime/
- {% if target.name == "vulkan" -%}
- cp -f WebRTC~/ProjectSettings/ProjectSettings-android-vulkan.asset WebRTC~/ProjectSettings/ProjectSettings.asset
- {% endif %}
- - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- - unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast -w
- - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr --output utr
- - chmod +x ./utr
- - ./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
- artifacts:
- players:
- paths:
- - "build/players/**"
- logs:
- paths:
- - "build/logs/**"
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
- test_{{ package.name }}_{{ editor.version }}_android_{{ target.name }}:
- name: Test {{ package.packagename }} with {{ editor.version }} on android device {{ target.name }}
- agent:
- type: Unity::mobile::shield
- image: mobile/android-package-ci-win:v0.1.4-1212670
- flavor: b1.medium
- skip_checkout: true
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#build_{{ package.name }}_{{ editor.version }}_android_{{ target.name }}
- commands:
- - wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey.pub -O %USERPROFILE%/.android/adbkey.pub
- - wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey -O %USERPROFILE%/.android/adbkey
- - |
- # Download standalone UnityTestRunner
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr.bat --output utr.bat
- # Set the IP of the device. In case device gets lost, UTR will try to recconect to ANDROID_DEVICE_CONNECTION
- set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
- # Establish an ADB connection with the device
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
- # List the connected devices
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
- NetSh Advfirewall set allprofiles state off
- ./utr --suite=playmode --platform=android --player-load-path=build/players --artifacts_path=build/test-results
- artifacts:
- logs:
- paths:
- - "build/test-results/**"
- {% endfor %}
- {% endfor %}
- {% for target in test_targets %}
- {% for editor in editors %}
- {% for param in target.test_params %}
- {% for gfx_type in target.gfx_types %}
- {% if target.name != "macos" and target.name != "macos-m1" %}
- test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ gfx_type.name }}:
- name : Test {{ package.packagename }} with {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ target.name }} {{ gfx_type.name }}
- agent:
- type: {{ target.type }}
- image: {{ target.image }}
- flavor: {{ target.flavor }}
- {% if target.is_gpu == "true" and target.model %}
- model: {{ target.model }}
- {% endif %}
- commands:
- - pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
- - 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
- artifacts:
- {{ package.name }}_{{ param.backend }}_{{ editor.version }}_{{ target.name }}_test_results:
- paths:
- - "upm-ci~/test-results/**/*"
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
- {% elsif param.platform == "standalone" %}
- # build standalone runtime for testing on macOS(Intel/Silicon)
- build_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ gfx_type.name }}:
- name : Build {{ package.packagename }} with {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ target.name }} {{ gfx_type.name }}
- agent:
- type: Unity::VM::osx
- image: package-ci/mac:v1.21.1-1092905
- flavor: m1.mac
- commands:
- - |
- find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
- cp -rf upm-ci~/package/Runtime/Plugins Runtime/
- - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- - unity-downloader-cli -c Editor -c {{ param.additional_component_arg }} -u {{ editor.version }} --fast -w
- - curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr --output utr
- - chmod +x ./utr
- - ./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
- artifacts:
- players:
- paths:
- - "build/players/**"
- logs:
- paths:
- - "build/logs/**"
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
- # standalone test on macOS(Intel/Silicon)
- {% assign architectures = test_architectures_macos | where: "editor_version", editor.version | where: "target_name", target.name %}
- {% for architecture in architectures %}
- test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ architecture.architecture }}_{{ gfx_type.name }}:
- name : Test {{ package.packagename }} with {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ target.name }} {{ architecture.name }} {{ gfx_type.name }}
- agent:
- type: {{ target.type }}
- image: {{ target.image }}
- flavor: {{ target.flavor }}
- variables:
- TEMPLATE_FILE: BuildScripts~/template/remote.sh.template
- PACKAGE_DIR: com.unity.webrtc
- PLAYER_LOAD_PATH: build/players
- TEST_RESULT_DIR: upm-ci~/test-results/
- TEST_TARGET: macos
- TEST_PLATFORM: {{ param.platform }}
- TEST_ARCHITECTURE : {{ target.architecture }}
- SCRIPTING_BACKEND: {{ param.backend }}
- EDITOR_VERSION: {{ editor.version }}
- EXTRA_EDITOR_ARG: {{ gfx_type.extra-editor-arg }}
- commands:
- - BuildScripts~/test_package_mac.sh
- artifacts:
- {{ package.name }}_{{ param.backend }}_{{ editor.version }}_{{ target.name }}_test_results:
- paths:
- - "upm-ci~/test-results/**"
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#build_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ gfx_type.name }}
- # end standalone test on macOS(Intel/Silicon)
- {% endfor %}
- {% else %}
- # editmode/playmode test on macOS(Intel/Silicon)
- {% assign architectures = test_architectures_macos | where: "editor_version", editor.version | where: "target_name", target.name %}
- {% for architecture in architectures %}
- test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ architecture.architecture }}_{{ gfx_type.name }}:
- name : Test {{ package.packagename }} with {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ target.name }} {{ architecture.name }} {{ gfx_type.name }}
- agent:
- type: {{ target.type }}
- image: {{ target.image }}
- flavor: {{ target.flavor }}
- variables:
- TEMPLATE_FILE: BuildScripts~/template/remote.sh.template
- PACKAGE_DIR: com.unity.webrtc
- TEST_PROJECT_DIR: com.unity.webrtc/WebRTC~
- TEST_RESULT_DIR: upm-ci~/test-results/
- TEST_TARGET: macos
- TEST_PLATFORM: {{ param.platform }}
- TEST_ARCHITECTURE : {{ architecture.architecture }}
- SCRIPTING_BACKEND: {{ param.backend }}
- EDITOR_VERSION: {{ editor.version }}
- EXTRA_EDITOR_ARG: {{ gfx_type.extra-editor-arg }}
- commands:
- - |
- find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
- cp -rf upm-ci~/package/Runtime/Plugins Runtime/
- - BuildScripts~/test_package_mac.sh
- artifacts:
- {{ package.name }}_{{ param.backend }}_{{ editor.version }}_{{ target.name }}_test_results:
- paths:
- - "upm-ci~/test-results/**"
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
- # end editmode/playmode test on macOS(Intel/Silicon)
- {% endfor %}
- {% endif %}
- {% endfor %}
- {% endfor %}
- {% endfor %}
- {% endfor %}
- trigger_pullrequest:
- name : Trigger by the Pull requests which directs to main branch or feature branch
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor_version_for_trigger }}_gpu
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_webrtc_plugin_all_platform
- triggers:
- expression: pull_request.target eq "main" OR pull_request.target match "feat/.*"
- trigger_package_validate:
- name : Trigger test for package validation
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_editmode_mono_win_{{ editor_version_for_validate }}_d3d11
- {% for editor in editors %}
- trigger_test_{{ package.name }}_{{ editor.version }}_gpu:
- name : Trigger test {{ package.packagename }} {{ editor.version }} all platforms with GPU
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor.version }}_gpu
- test_{{ package.name }}_{{ editor.version }}_nogpu:
- name : Test {{ package.packagename }} {{ editor.version }} all platforms without GPU
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor.version }}_ios
- {% for target in test_targets_android %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor.version }}_android_{{ target.name }}
- {% endfor %}
- {% for target in test_targets %}
- {% for param in target.test_params %}
- {% for gfx_type in target.gfx_types %}
- # vulkan and d3d12 gfx device is not supported on VMs without GPU
- {% if target.is_gpu == "false" and gfx_type.name != "vulkan" and gfx_type.name != "d3d12" %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ gfx_type.name }}
- {% endif %}
- {% endfor %}
- {% endfor %}
- {% endfor %}
- test_{{ package.name }}_{{ editor.version }}_gpu:
- name : Test {{ package.packagename }} {{ editor.version }} all platforms with GPU
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor.version }}_ios
- {% for target in test_targets_android %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor.version }}_android_{{ target.name }}
- {% endfor %}
- {% for target in test_targets %}
- {% for param in target.test_params %}
- {% for gfx_type in target.gfx_types %}
- {% if target.name == "macos" or target.name == "macos-m1" %}
- {% assign architectures = test_architectures_macos | where: "editor_version", editor.version | where: "target_name", target.name %}
- {% for architecture in architectures %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ architecture.architecture }}_{{ gfx_type.name }}
- {% endfor %}
- {% elsif target.is_gpu == "true" %}
- # workaround: avoid playmode linux glcore
- {% if target.name == "linux-gpu" and gfx_type.name == "glcore" and param.platform == "playmode" %}
- {% else %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ param.platform }}_{{ param.backend }}_{{ target.name }}_{{ editor.version }}_{{ gfx_type.name }}
- {% endif %}
- {% endif %}
- {% endfor %}
- {% endfor %}
- {% endfor %}
- {% endfor %}
- {% for platform in platforms %}
- {% if platform.name != "macos" %}
- {% for editor in editors %}
- codecoverage_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
- name: Codecoverage {{ package.packagename }} {{ platform.name }} {{ editor.version }}
- agent:
- type: {{ platform.type }}
- image: {{ platform.image }}
- flavor: {{ platform.flavor }}
- commands:
- - pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
- - upm-ci package test -u {{ editor.version }} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:-UnityEngine.*,+Unity.WebRTC"
- artifacts:
- {{ package.name }}_{{ editor.version }}_{{ platform.name }}_coverage_results:
- paths:
- - "upm-ci~/test-results/**"
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
- {% endfor %}
- {% else -%}
- {% for editor in editors %}
- codecoverage_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
- name: Codecoverage {{ package.packagename }} {{ platform.name }} {{ editor.version }}
- agent:
- type: {{ platform.type }}
- image: {{ platform.image }}
- flavor: {{ platform.flavor }}
- commands:
- - |
- cd ../
- ls com.unity.webrtc/upm-ci~/packages/com.unity.webrtc-*.tgz | xargs tar xzvf
- cp -rf package/ com.unity.webrtc
- cd com.unity.webrtc
- - brew install node
- - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
- - git clone git@github.cds.internal.unity3d.com:unity/utr.git
- - rm -Rf ./utr/.git
- - 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'"
- - scp -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" -r ../com.unity.webrtc/ bokken@$BOKKEN_DEVICE_IP:~/com.unity.webrtc
- - scp -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" -pr ./utr/ bokken@$BOKKEN_DEVICE_IP:~/com.unity.webrtc/
- - 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'
- - |
- 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"'
- UTR_RESULT=$?
- mkdir -p upm-ci~/test-results/
- 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/
- exit $UTR_RESULT
- artifacts:
- {{ package.name }}_{{ editor.version }}_{{ platform.name }}_coverage_results:
- paths:
- - "upm-ci~/test-results/**"
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
- {% endfor %}
- {% endif %}
- {% endfor %}
- push_plugin:
- name: Push to Github webrtc native plugin
- agent:
- type: Unity::VM
- image: package-ci/ubuntu:v2.0.0-947481
- flavor: b1.large
- commands:
- - git config --global user.email "kazuki@unity3d.com"
- - git config --global user.name "Kazuki Matsumoto"
- {% for platform in platforms %}
- - git add {{ platform.plugin_path }}
- {% endfor %}
- - git commit -m "[skip ci] Update plugins"
- - git push origin HEAD:$GIT_BRANCH
- dependencies:
- {% for platform in platforms %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#build_webrtc_plugin_{{ platform.name }}
- {% endfor %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_webrtc_plugin_all_platform
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor_version_for_trigger }}_gpu
- # - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor_version_for_trigger }}_nogpu
- publish_{{ package.name }}:
- name: Publish {{ package.packagename }}
- agent:
- type: Unity::VM
- image: package-ci/win10:v1.20.1-1032259
- flavor: b1.large
- variables:
- UPMCI_ENABLE_PACKAGE_SIGNING: 1
- commands:
- - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
- - upm-ci package publish
- artifacts:
- {{ package.name }}_artifacts.zip:
- paths:
- - "upm-ci~/packages/*.tgz"
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
- {% for editor in editors %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_editmode_mono_linux_{{ editor.version }}_glcore
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_editmode_mono_win_{{ editor.version }}_d3d11
- {% endfor %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_webrtc_plugin_all_platform
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor_version_for_trigger }}_gpu
- # - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_{{ editor_version_for_trigger }}_nogpu
- publish_dry_run_{{ package.name }}:
- name: Publish Dry Run {{ package.packagename }}
- agent:
- type: Unity::VM
- image: package-ci/win10:v1.20.1-1032259
- flavor: b1.large
- variables:
- UPMCI_ENABLE_PACKAGE_SIGNING: 1
- commands:
- - npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
- - upm-ci package publish --dry-run
- triggers:
- tags:
- only:
- - /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
- artifacts:
- {{ package.name }}_artifacts.zip:
- paths:
- - "upm-ci~/packages/*.tgz"
- dependencies:
- - .yamato/upm-ci-{{ package.name }}-packages.yml#pack_{{ package.name }}
- {% for editor in editors %}
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_editmode_mono_linux_{{ editor.version }}_glcore
- - .yamato/upm-ci-{{ package.name }}-packages.yml#test_{{ package.name }}_editmode_mono_win_{{ editor.version }}_d3d11
- {% endfor %}
|