413 lines
18 KiB
YAML
413 lines
18 KiB
YAML
{% metadata_file .yamato/package.metafile %}
|
|
|
|
---
|
|
|
|
pack:
|
|
name: Pack {{ package_displayname }}
|
|
agent:
|
|
type: Unity::VM
|
|
image: package-ci/ubuntu-20:v1.4.0-1081009
|
|
flavor: b1.large
|
|
commands:
|
|
- npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
|
|
- find ./{{ project.packagename }} -type l -exec bash -c 'sh BuildScripts~/convert_symlinks.sh "$0"' {} \;
|
|
- upm-ci package pack --package-path {{ packagename }}
|
|
artifacts:
|
|
{{ packagename }}_package:
|
|
paths:
|
|
- "upm-ci~/packages/**/*"
|
|
|
|
{% for editor in editors %}
|
|
build_{{ editor.version }}_ios:
|
|
name : Build {{ package_displayname }} with {{ editor.version }} for ios device
|
|
agent:
|
|
type: Unity::VM::osx
|
|
image: package-ci/mac:v1.20.0-1079282
|
|
flavor: b1.large
|
|
commands:
|
|
- find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
|
|
- 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=TestProjects/Empty --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-renderstreaming-packages.yml#pack
|
|
|
|
test_{{ packagename }}_{{ editor.version }}_ios:
|
|
name: Test {{ package_displayname }} with {{ editor.version }} on ios device
|
|
agent:
|
|
type: Unity::mobile::iPhone
|
|
image: mobile/macos-10.15-testing:v0.0.7-909915
|
|
flavor: b1.medium
|
|
skip_checkout: true
|
|
commands:
|
|
# Download standalone UnityTestRunner
|
|
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/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/**"
|
|
dependencies:
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#build_{{ editor.version }}_ios
|
|
|
|
{% for target in test_targets_android %}
|
|
build_{{ editor.version }}_android_{{ target.name }}:
|
|
name : Build {{ package_displayname }} with {{ editor.version }} for android device {{ target.name }}
|
|
agent:
|
|
type: Unity::VM::osx
|
|
image: package-ci/mac:v1.20.0-1079282
|
|
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 TestProjects/Empty/ProjectSettings/ProjectSettings-android-vulkan.asset TestProjects/Empty/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=TestProjects/Empty --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-renderstreaming-packages.yml#pack
|
|
|
|
test_{{ packagename }}_{{ editor.version }}_android_{{ target.name }}:
|
|
name: Test {{ package_displayname }} 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-renderstreaming-packages.yml#build_{{ 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 %}
|
|
|
|
{% for platform in platforms %}
|
|
{% if platform.name != "macos" and platform.name != "macos-m1" %}
|
|
{% for param in platform.test_params %}
|
|
test_{{ packagename }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}:
|
|
name : Test {{ package_displayname }} {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ platform.name }}
|
|
agent:
|
|
type: {{ platform.type }}
|
|
image: {{ platform.image }}
|
|
flavor: {{ platform.flavor }}
|
|
{% if platform.model %}
|
|
model: {{ platform.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 }}
|
|
{% if platform.name == "win" or platform.name == "win-gpu" %}
|
|
- |
|
|
set WEBAPP_PATH=%cd%\Webapp\bin~\{{ platform.packed_webapp_name }}
|
|
upm-ci package test -u {{ editor.version }} --package-path {{ packagename }} --platform {{ param.platform }} --backend {{ param.backend }} --enable-load-and-test-isolation
|
|
{% else %}
|
|
- |
|
|
export WEBAPP_PATH=$(pwd)/WebApp/bin~/{{ platform.packed_webapp_name }}
|
|
upm-ci package test -u {{ editor.version }} --package-path {{ packagename }} --platform {{ param.platform }} --backend {{ param.backend }} --extra-utr-arg="--testfilter=!HttpSignaling" --enable-load-and-test-isolation
|
|
{% endif %}
|
|
artifacts:
|
|
{{ packagename }}_{{ editor.version }}_{{ platform.name }}_test_results:
|
|
paths:
|
|
- "upm-ci~/test-results/**/*"
|
|
dependencies:
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#pack
|
|
- .yamato/upm-ci-webapp.yml#pack_{{ platform.packed_webapp_platform }}
|
|
|
|
{% for project in test_projects %}
|
|
test_{{ project.name }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}:
|
|
name : Test {{ project.name }} {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ platform.name }}
|
|
agent:
|
|
type: {{ platform.type }}
|
|
image: {{ platform.image }}
|
|
flavor: {{ platform.flavor }}
|
|
{% if platform.model %}
|
|
model: {{ platform.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 }}
|
|
{% if platform.name != "win" and platform.name != "win-gpu" %}
|
|
- find ./{{ packagename }} -type l -exec bash -c 'sh BuildScripts~/convert_symlinks.sh "$0"' {} \;
|
|
{% endif %}
|
|
- upm-ci project pack --project-path {{ project.path }}
|
|
{% if platform.name == "win" or platform.name == "win-gpu" %}
|
|
- |
|
|
set WEBAPP_PATH=%cd%\Webapp\bin~\{{ platform.packed_webapp_name }}
|
|
upm-ci project test -u {{ editor.version }} --project-path {{ project.path }} --platform {{ param.platform }} --backend {{ param.backend }}
|
|
{% else %}
|
|
- |
|
|
export WEBAPP_PATH=$(pwd)/WebApp/bin~/{{ platform.packed_webapp_name }}
|
|
upm-ci project test -u {{ editor.version }} --project-path {{ project.path }} --platform {{ param.platform }} --backend {{ param.backend }} --extra-utr-arg="--testfilter=!HttpSignaling"
|
|
{% endif %}
|
|
artifacts:
|
|
{{ packagename }}_{{ editor.version }}_{{ platform.name }}_test_results:
|
|
paths:
|
|
- "upm-ci~/test-results/**/*"
|
|
dependencies:
|
|
- .yamato/upm-ci-webapp.yml#pack_{{ platform.packed_webapp_platform }}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
{% for param in platform.test_params %}
|
|
|
|
{% if param.platform == "standalone" %} # platform.name == "macos" or platform.name == "macos-m1" and param.platform == "standalone"
|
|
|
|
build_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}:
|
|
name : Build {{ package_displayname }} with {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ platform.name }}
|
|
agent:
|
|
type: Unity::VM::osx
|
|
image: package-ci/mac:v1.20.0-1079282
|
|
flavor: m1.mac
|
|
commands:
|
|
- |
|
|
find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
|
|
- 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=TestProjects/Empty --player-save-path=build/players --architecture=x64 --artifacts_path=build/logs --scripting-backend={{ param.backend }} --build-only --testfilter=!HttpSignaling
|
|
artifacts:
|
|
players:
|
|
paths:
|
|
- "build/players/**"
|
|
logs:
|
|
paths:
|
|
- "build/logs/**"
|
|
dependencies:
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#pack
|
|
|
|
test_{{ packagename }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}:
|
|
name : Test {{ package_displayname }} {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ platform.name }}
|
|
agent:
|
|
type: {{ platform.type }}
|
|
image: {{ platform.image }}
|
|
flavor: {{ platform.flavor }}
|
|
variables:
|
|
TEMPLATE_FILE: BuildScripts~/template/remote.sh.template
|
|
PACKAGE_DIR: UnityRenderStreaming
|
|
PLAYER_LOAD_PATH: build/players
|
|
TEST_RESULT_DIR: upm-ci~/test-results/
|
|
WEBAPP_DIR: UnityRenderStreaming/WebApp/bin~
|
|
WEBAPP_NAME: {{ platform.packed_webapp_name }}
|
|
TEST_TARGET: macos
|
|
TEST_PLATFORM: {{ param.platform }}
|
|
TEST_ARCHITECTURE: {{ platform.architecture }}
|
|
SCRIPTING_BACKEND: {{ param.backend }}
|
|
EDITOR_VERSION: {{ editor.version }}
|
|
commands:
|
|
- BuildScripts~/test_package_mac.sh
|
|
artifacts:
|
|
{{ packagename }}_{{ param.backend }}_{{ editor.version }}_{{ platform.name }}_test_results:
|
|
paths:
|
|
- "upm-ci~/test-results/**"
|
|
dependencies:
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#build_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}
|
|
- .yamato/upm-ci-webapp.yml#pack_{{ platform.packed_webapp_platform }}
|
|
|
|
{% else %} # platform.name == "macos" or platform.name == "macos-m1" and param.platform != "standalone"
|
|
|
|
test_{{ packagename }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}:
|
|
name : Test {{ package_displayname }} {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ platform.name }}
|
|
agent:
|
|
type: {{ platform.type }}
|
|
image: {{ platform.image }}
|
|
flavor: {{ platform.flavor }}
|
|
variables:
|
|
TEMPLATE_FILE: BuildScripts~/template/remote.sh.template
|
|
PACKAGE_DIR: UnityRenderStreaming
|
|
TEST_PROJECT_DIR: UnityRenderStreaming/TestProjects/Empty
|
|
TEST_RESULT_DIR: upm-ci~/test-results/
|
|
WEBAPP_DIR: UnityRenderStreaming/WebApp/bin~
|
|
WEBAPP_NAME: {{ platform.packed_webapp_name }}
|
|
TEST_TARGET: macos
|
|
TEST_PLATFORM: {{ param.platform }}
|
|
TEST_ARCHITECTURE: {{ platform.architecture }}
|
|
SCRIPTING_BACKEND: {{ param.backend }}
|
|
EDITOR_VERSION: {{ editor.version }}
|
|
EXTRA_UTR_ARG: --testfilter=!HttpSignaling
|
|
commands:
|
|
- find upm-ci~/packages/ -name "*.tgz" | xargs -I file tar xvf file -C upm-ci~
|
|
- BuildScripts~/test_package_mac.sh
|
|
artifacts:
|
|
{{ packagename }}_{{ param.backend }}_{{ editor.version }}_{{ platform.name }}_test_results:
|
|
paths:
|
|
- "upm-ci~/test-results/**"
|
|
dependencies:
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#pack
|
|
- .yamato/upm-ci-webapp.yml#pack_{{ platform.packed_webapp_platform }}
|
|
|
|
{% endif %}
|
|
|
|
{% for project in test_projects %}
|
|
test_{{ project.name }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}:
|
|
name : Test {{ project.name }} {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ platform.name }}
|
|
agent:
|
|
type: {{ platform.type }}
|
|
image: {{ platform.image }}
|
|
flavor: {{ platform.flavor}}
|
|
variables:
|
|
TEMPLATE_FILE: BuildScripts~/template/remote.sh.template
|
|
PACKAGE_DIR: UnityRenderStreaming
|
|
TEST_PROJECT_DIR: UnityRenderStreaming/{{ project.path }}
|
|
TEST_RESULT_DIR: upm-ci~/test-results/
|
|
WEBAPP_DIR: UnityRenderStreaming/WebApp/bin~
|
|
WEBAPP_NAME: {{ platform.packed_webapp_name }}
|
|
TEST_TARGET: {{ platform.name }}
|
|
TEST_PLATFORM: {{ param.platform }}
|
|
SCRIPTING_BACKEND: {{ param.backend }}
|
|
EDITOR_VERSION: {{ editor.version }}
|
|
EXTRA_UTR_ARG: --testfilter=!HttpSignaling
|
|
commands:
|
|
- find ./{{ packagename }} -type l -exec bash -c 'sh BuildScripts~/convert_symlinks.sh "$0"' {} \;
|
|
- BuildScripts~/test_package_mac.sh
|
|
artifacts:
|
|
{{ packagename }}_{{ editor.version }}_{{ platform.name }}_test_results:
|
|
paths:
|
|
- "upm-ci~/test-results/**"
|
|
dependencies:
|
|
- .yamato/upm-ci-webapp.yml#pack_{{ platform.packed_webapp_platform }}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
trigger_test_{{ packagename }}_{{ editor.version }}:
|
|
name : Trigger test {{ package_displayname }} {{ editor.version }} all platforms
|
|
dependencies:
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#test_{{ packagename }}_{{ editor.version }}
|
|
{% if editor.version == "2020.3" -%}
|
|
triggers:
|
|
expression: pull_request.target eq "main"
|
|
{% endif %}
|
|
|
|
test_{{ packagename }}_{{ editor.version }}:
|
|
name : Test {{ package_displayname }} {{ editor.version }} all platforms
|
|
dependencies:
|
|
{% for platform in platforms %}
|
|
{% for param in platform.test_params %}
|
|
# todo(kazuki) :
|
|
# editor/playmode test are not conducted on m1 mac
|
|
# XCode command line tools has not installed on m1 mac device (Standalone test don't need to install them)
|
|
{% if platform.name == "macos-m1" %}
|
|
{% if param.platform == "standalone" %}
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#test_{{ packagename }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}
|
|
{% endif %}
|
|
{% else %}
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#test_{{ packagename }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#test_{{ packagename }}_{{ editor.version }}_ios
|
|
{% for target in test_targets_android %}
|
|
# todo: Exclude tests for Unity 2022.1 on Android platform because it is instable.
|
|
{% if editor.version != "2022.1" %}
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#test_{{ packagename }}_{{ editor.version }}_android_{{ target.name }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
test_renderpipeline_{{ packagename }}_{{ editor.version }}:
|
|
name : Test {{ package_displayname }} {{ editor.version }} all RenderPipeline
|
|
dependencies:
|
|
{% for platform in platforms %}
|
|
{% for param in platform.test_params %}
|
|
{% for project in test_projects %}
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#test_{{ project.name }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
publish_dry_run_{{ packagename }}:
|
|
name: Publish Dry Run {{ package_displayname }}
|
|
agent:
|
|
type: Unity::VM
|
|
image: package-ci/win10:v1.21.0-1103459
|
|
flavor: b1.large
|
|
commands:
|
|
- npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
|
|
- upm-ci package publish --dry-run --package-path {{ packagename }}
|
|
triggers:
|
|
tags:
|
|
only:
|
|
- /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
|
|
artifacts:
|
|
{{ packagename }}_artifacts.zip:
|
|
paths:
|
|
- "upm-ci~/packages/*.tgz"
|
|
dependencies:
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#pack
|
|
{% for editor in editors %}
|
|
{% if editor.version != "trunk" -%} # exclude trunk to test
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#test_{{ packagename }}_editmode_mono_win-gpu_{{ editor.version }}
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#test_{{ packagename }}_editmode_mono_macos_{{ editor.version }}
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#test_{{ packagename }}_editmode_mono_linux-gpu_{{ editor.version }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
publish_{{ packagename }}:
|
|
name: Publish {{ package_displayname }}
|
|
agent:
|
|
type: Unity::VM
|
|
image: package-ci/win10:v1.21.0-1103459
|
|
flavor: b1.large
|
|
commands:
|
|
- npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
|
|
- upm-ci package publish --package-path {{ packagename }}
|
|
triggers:
|
|
tags:
|
|
only:
|
|
- /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
|
|
artifacts:
|
|
{{ packagename }}_artifacts.zip:
|
|
paths:
|
|
- "upm-ci~/packages/*.tgz"
|
|
dependencies:
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#pack
|
|
{% for editor in editors %}
|
|
{% if editor.version != "trunk" %} # exclude trunk to test
|
|
- .yamato/upm-ci-renderstreaming-packages.yml#trigger_test_{{ packagename }}_{{ editor.version }}
|
|
{% endif %}
|
|
{% endfor %}
|