UnityRenderStreaming/.yamato/upm-ci-template.yml

172 lines
6.3 KiB
YAML

{% metadata_file .yamato/package.metafile %}
---
{% for project in template_projects %}
{% for editor in editors %}
{% if editor.version == "2020.3" %}
prepack_{{ project.name }}_{{ editor.version }}:
name: Pre-Pack {{ project.packagename }} {{ editor.version }} - Primed Artifacts
agent:
type: Unity::VM
image: package-ci/win10:v1.21.0-1103459
flavor: b1.large
commands:
- pip install unity-downloader-cli --index-url {{ intra_pypi_url }} --upgrade
- unity-downloader-cli -u {{ editor.version }} -c editor -w --fast
# ToDO: windows vm can not use symbolic link
# - FOR /F "usebackq" %%i IN (`dir /B /S /AL {{ project.packagename }}`) DO (call "BuildScripts~\convert_symlinks.cmd" %%i)
- .Editor\Unity.exe -projectPath {{ project.packagename }} -batchmode -quit
artifacts:
primed:
paths:
- "{{ project.packagename }}/Library/Artifacts/**"
- "{{ project.packagename }}/Library/ArtifactDB"
- "{{ project.packagename }}/Library/SourceAssetDB"
pack_{{ project.name }}_{{ editor.version }}:
name: Pack {{ project.packagename }} {{ editor.version }}
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 template pack --project-path {{ project.packagename }}
dependencies:
- .yamato/upm-ci-template.yml#prepack_{{ project.name }}_{{ editor.version }}
artifacts:
packages:
paths:
- "upm-ci~/**/*"
{% for platform in platforms %}
{% if platform.name == "win" or platform.name == "win-gpu" %}
{% for param in platform.test_params %}
test_{{ project.name }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}:
name : Test {{ project.packagename }} {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ platform.name }}
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor}}
{% if project.name == "renderstreaming-rtx" %}
model: rtx2080
{% endif %}
commands:
- npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
- upm-ci template test -u {{ editor.version }} --project-path {{ project.packagename }} --platform {{ param.platform }} --backend {{ param.backend }} --extra-utr-arg="--timeout=3000 --testfilter=!ValidationSuiteRun"
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/upm-ci-template.yml#pack_{{ project.name }}_{{ editor.version }}
- .yamato/upm-ci-webapp.yml#pack_{{ platform.name }}
{% endfor %}
{% else %}
{% for param in platform.test_params %}
{% if project.name != "renderstreaming-rtx" %}
test_{{ project.name }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}:
name : Test {{ project.packagename }} {{ param.platform }} {{ param.backend }} {{ editor.version }} on {{ platform.name }}
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor}}
commands:
- npm install upm-ci-utils@{{ upm.package_version }} -g --registry {{ upm.registry_url }}
- upm-ci template test -u {{ editor.version }} --project-path {{ project.packagename }} --platform {{ param.platform }} --backend {{ param.backend }} --extra-utr-arg="--timeout=3000"
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/upm-ci-template.yml#pack_{{ project.name }}_{{ editor.version }}
- .yamato/upm-ci-webapp.yml#pack_{{ platform.name }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
trigger_template_test_{{ project.name }}_{{ editor.version }}:
name : Trigger all Template test {{ project.packagename }} {{ editor.version }}
dependencies:
{% for platform in platforms %}
{% if platform.name == "win" or platform.name == "win-gpu" %}
{% for param in platform.test_params %}
- .yamato/upm-ci-template.yml#test_{{ project.name }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}
{% endfor %}
{% else %}
{% if project.name != "renderstreaming-rtx" %}
{% for param in platform.test_params %}
- .yamato/upm-ci-template.yml#test_{{ project.name }}_{{ param.platform }}_{{ param.backend }}_{{ platform.name }}_{{ editor.version }}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
publish_{{ project.name }}:
name: Publish {{ project.packagename }}
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 template publish --project-path {{ project.packagename }}
triggers:
tags:
only:
- /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
packages:
paths:
- "upm-ci~/packages/*.tgz"
- "upm-ci~/templates/*.tgz"
dependencies:
{% for editor in editors %}
{% if editor.version == "2020.3" %}
- .yamato/upm-ci-template.yml#pack_{{ project.name }}_{{ editor.version }}
- .yamato/upm-ci-template.yml#trigger_template_test_{{ project.name }}_{{ editor.version }}
{% endif %}
{% endfor %}
publish_dryrun_{{ project.name }}:
name: Publish Dry Run {{ project.packagename }}
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 template publish --dry-run
triggers:
tags:
only:
- /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
packages:
paths:
- "upm-ci~/packages/*.tgz"
- "upm-ci~/templates/*.tgz"
dependencies:
{% for editor in editors %}
{% if editor.version == "2020.3" %}
- .yamato/upm-ci-template.yml#pack_{{ project.name }}_{{ editor.version }}
- .yamato/upm-ci-template.yml#trigger_template_test_{{ project.name }}_{{ editor.version }}
{% endif %}
{% endfor %}
{% endfor %}