From e5bb7ed5d27c5c5ef57c794b4db938f841c6a9fc Mon Sep 17 00:00:00 2001 From: Matt Schoen Date: Wed, 2 Sep 2020 14:45:03 -0700 Subject: [PATCH] Update Yamato jobs --- .yamato/base.yml | 84 ---------- .yamato/pack.yml | 14 ++ .yamato/package-publish.yml | 134 ---------------- .yamato/package-test.yml | 297 ------------------------------------ .yamato/publish.yml | 38 +++++ .yamato/template-config.yml | 57 ------- .yamato/test.yml | 73 +++++++++ 7 files changed, 125 insertions(+), 572 deletions(-) delete mode 100644 .yamato/base.yml create mode 100644 .yamato/pack.yml delete mode 100644 .yamato/package-publish.yml delete mode 100644 .yamato/package-test.yml create mode 100644 .yamato/publish.yml delete mode 100644 .yamato/template-config.yml create mode 100644 .yamato/test.yml diff --git a/.yamato/base.yml b/.yamato/base.yml deleted file mode 100644 index 0f2c22b0a..000000000 --- a/.yamato/base.yml +++ /dev/null @@ -1,84 +0,0 @@ -# This template is the base template required to exist for all other templates to work -# It has some common jobs shared between all the templates provided. -# Required CI templates: none -# When using the template for setting up a yamato job, please include the following disclaimer: -#_________________________________________________ -# If you make changes to this file, please consider making a PR to the templating repo! -# Please find the source file here: https://github.cds.internal.unity3d.com/unity/yamato-ci-templates/blob/master/.yamato/base.yml -# VERSION 1 -#_________________________________________________ - -# Configuration ####################################### - -###################################################### -# Avoid tampering with stuff below here if you can - -{% metadata_file .yamato/template-config.yml %} - -template_environment_variables: - # Do not touch - JOB_TEMPLATE_VERSION: 1 ---- - -{% for platform in platforms %} -{% for editor in editors %} -editor:priming:{{ editor.version }}:{{ platform.os }}: - name: "[{{ editor.version }},{{ platform.os }}] Editor priming" - agent: - type: Unity::VM - image: 'cds-ops/ubuntu-16.04-base:stable' - flavor: b1.small - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - {% for v in template_environment_variables %} - {{ v[0] }}: {{ v[1]}} - {% endfor %} - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - > - unity-downloader-cli - -u {{ editor.version }} - -o {{ platform.os }} - --wait - --skip-download -{% for component in platform.components -%} - -c {{ component }} -{% endfor -%} - > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" -{% endfor -%} -{% for test in testables %} -editor:priming:{{ test.name }}:{{ platform.os }}: - name: "[{{ test.name }},{{ platform.os }}] Editor priming" - agent: - type: Unity::VM - image: 'cds-ops/ubuntu-16.04-base:stable' - flavor: b1.small - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - {% for v in template_environment_variables %} - {{ v[0] }}: {{ v[1]}} - {% endfor %} - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - > - unity-downloader-cli - -u {{ test.path }} - -o {{ platform.os }} - --wait - --skip-download -{% for component in platform.components -%} - -c {{ component }} -{% endfor -%} - > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" -{% endfor -%} # testables -{% endfor %} diff --git a/.yamato/pack.yml b/.yamato/pack.yml new file mode 100644 index 000000000..2b08f13b0 --- /dev/null +++ b/.yamato/pack.yml @@ -0,0 +1,14 @@ +pack: + name: Pack + agent: + type: Unity::VM + image: package-ci/ubuntu:stable + flavor: b1.large + commands: + - git submodule update --init --recursive + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - upm-ci package pack --package-path . + artifacts: + packages: + paths: + - "upm-ci~/packages/**/*" \ No newline at end of file diff --git a/.yamato/package-publish.yml b/.yamato/package-publish.yml deleted file mode 100644 index a3c5cb9d8..000000000 --- a/.yamato/package-publish.yml +++ /dev/null @@ -1,134 +0,0 @@ -# This template contains all package publishing jobs to candidates, including nightly auto-publishing -{% metadata_file .yamato/template-config.yml %} - -template_environment_variables: - # Do not touch - JOB_TEMPLATE_VERSION: 1 - -scripting_backends: - -images: - windows: - type: Unity::VM - image: package-ci/win10:stable - flavor: b1.large - linux: - type: Unity::VM - image: package-ci/ubuntu:stable - flavor: b1.large ---- -auto-version: - name: "Auto version" - agent: - type: {{ images.linux.type }} - image: {{ images.linux.image }} - flavor: {{ images.linux.flavor }} - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" -{% for v in template_environment_variables -%} - {{ v[0] }}: {{ v[1]}} -{% endfor -%} - commands: - - npm install git+ssh://git@github.cds.internal.unity3d.com/unity/upm-ci-utils#auto-publish -g --@upm:registry=https://artifactory.internal.unity3d.com/api/npm/upm-service-npm - - > - upm-ci auto-version bump -{% for test in testables -%} - --{{ test.type }}-path {{ test.path }} -{% endfor -%} - - upm-ci auto-version commit --push - artifacts: - packages: - paths: - - "upm-ci~/**/*" -{% if publishing.auto_version == "true" -%} - triggers: - branches: - only: - - "{{ repo.branches.integration }}" -{% endif -%} -{% if extra_jobs.pre -%} - dependencies: -{% for prebuild in extra_jobs.pre -%} - - {{ prebuild }} -{% endfor -%} -{% endif -%} -{% for test in testables -%} -{% if test.publish_source == "true" -%} -publish:{{ test.name }}: - name: "[{{ test.name }}] Candidates Publish" - agent: - type: {{ images.windows.type }} - image: {{ images.windows.image }} - flavor: {{ images.windows.flavor }} - variables: - {% for v in template_environment_variables %} - {{ v[0] }}: {{ v[1]}} - {% endfor %} - commands: - - npm install upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm -g - - > - upm-ci {{ test.type }} publish -{% if test.type == "template" -%} - --project-path {{ test.path }} -{% else -%} - --{{ test.type }}-path {{ test.path }} -{% endif -%} - artifacts: - packages: - paths: - - "upm-ci~/packages/*.tgz" -{% if publishing.auto_publish == "true" -%} - triggers: - recurring: - - branch: "{{ repo.branches.integration }}" - frequency: daily -{% endif -%} - dependencies: -{% for testing in extra_jobs.testing -%} - - {{ testing }} -{% endfor -%} -{% if test.publish_source -%} - - .yamato/package-test.yml#pack:{{ test.name }} -{% endif -%} -{% for editor in editors -%} -{% for platform in platforms -%} - - .yamato/package-test.yml#{{ test.name }}:{{ platform.os }}:{{ editor.version }} -# Disabled for linux since it requires GPUs -{% if platform.os != "linux" -%} -{% if test.standalone == "true" -%} -{% for backend in scripting_backends -%} - - .yamato/package-test.yml#{{ test.name }}:{{ platform.os }}:{{ editor.version }}:standalone:{{ backend }} -{% endfor -%} -{% endif -%} # test.standalone -{% endif -%} # platform.os -{% endfor -%} -{% endfor -%} -{% endif -%} # publish_source -{% endfor -%} - - -{% for test in testables -%} -{% if test.publish_source == "true" and test.type != "template" -%} -promote:{{ test.name }}: - name: "[{{ test.name }}] Production Promote" - agent: - type: {{ images.windows.type }} - image: {{ images.windows.image }} - flavor: {{ images.windows.flavor }} - variables: - UPMCI_PROMOTION: 1 - commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - > - upm-ci {{ test.type }} promote - --{{ test.type }}-path {{ test.path }} - artifacts: - packages: - paths: - - "upm-ci~/packages/*.tgz" - dependencies: - - .yamato/package-test.yml#pack:{{ test.name }} - - .yamato/package-test.yml#promotion:test:trigger:{{ test.name }} -{% endif -%} # publish_source -{% endfor %} diff --git a/.yamato/package-test.yml b/.yamato/package-test.yml deleted file mode 100644 index cf38c13c4..000000000 --- a/.yamato/package-test.yml +++ /dev/null @@ -1,297 +0,0 @@ -# This template contains all package validation -# Required CI templates: -# - base.yml -# When using the template for setting up a yamato job, please include the following disclaimer: -#_________________________________________________ -# If you make changes to this file, please consider making a PR to the templating repo! -# Please find the source file here: https://github.cds.internal.unity3d.com/unity/yamato-ci-templates/blob/master/.yamato/package-test.yml -# VERSION 2 -#_________________________________________________ - -###################################################### -# Avoid tampering with stuff below here if you can - -{% metadata_file .yamato/template-config.yml %} -template_environment_variables: - # Do not touch - JOB_TEMPLATE_VERSION: 2 - -images: - windows: - type: Unity::VM - image: package-ci/win10:stable - flavor: b1.large - linux: - type: Unity::VM - image: package-ci/ubuntu:stable - flavor: b1.large - macos: - type: Unity::VM::osx - image: package-ci/mac:stable - flavor: m1.mac - -scripting_backends: ---- - -{% for test in testables %} -{% for platform in platforms %} -{% for editor in editors %} -{% if test.standalone == "true" -%} -# Standalone tests -# Disabled for linux since it requires GPUs -{% if platform.os != "linux" -%} -{% for backend in scripting_backends %} -{{ test.name }}:{{ platform.os }}:{{ editor.version }}:standalone:{{ backend }}: - name: "[{{ backend }},{{ test.name }},{{ editor.version }},{{ platform.os }}] Test Standalone" - agent: - type: {{ images[platform.os].type }} - image: {{ images[platform.os].image }} - flavor: {{ images[platform.os].flavor }} - variables: -{% if platform.os == "linux" -%} - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" -{% endif -%} -{% for v in template_environment_variables -%} - {{ v[0] }}: {{ v[1]}} -{% endfor -%} - commands: - - pip install unity-downloader-cli --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - npm install upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm -g - - unity-downloader-cli --source-file unity_revision.txt {% for component in platform.components %}-c {{ component }} {% endfor %}--wait --published-only - # TODO: upm-ci needs to support scripting backends - - > - upm-ci - {{ test.type }} - test - -u .Editor -{% if test.type == "template" -%} - --project-path {{ test.path }} -{% else -%} - --{{ test.type }}-path {{ test.path }} -{% endif -%} - --platform standalone - artifacts: - logs.zip: - paths: - - "upm-ci~/test-results/**/*" - dependencies: - - .yamato/base.yml#editor:priming:{{ editor.version }}:{{ platform.os }} - - .yamato/package-test.yml#pack:{{ test.name }} -{% for prebuild in extra_jobs.pre -%} - - {{ prebuild }} -{% endfor -%} -{% endfor %} # scripting_backends -{% endif %} # platform.os -{% endif %} # test.standalone - -{{ test.name }}:{{ platform.os }}:{{ editor.version }}: - name : "[{{ test.name }},{{ platform.os }},{{ editor.version }}] Test" - agent: - type: {{ images[platform.os].type }} - image: {{ images[platform.os].image }} - flavor: {{ images[platform.os].flavor }} - variables: -{% if platform.os == "linux" -%} - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" -{% endif -%} -{% for v in template_environment_variables -%} - {{ v[0] }}: {{ v[1]}} -{% endfor -%} - commands: - - pip install unity-downloader-cli --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - npm install upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm -g - - unity-downloader-cli --source-file unity_revision.txt {% for component in platform.components %}-c {{ component }} {% endfor %}--wait --published-only - - > - upm-ci - {{ test.type }} - test - -u .Editor -{% if test.type == "template" -%} - --project-path {{ test.path }} -{% else -%} - --{{ test.type }}-path {{ test.path }} -{% endif -%} -{% if test.standalone == "false" -%} - --platform editmode -{% endif -%} - artifacts: - logs.zip: - paths: - - "upm-ci~/test-results/**/*" - dependencies: - - .yamato/base.yml#editor:priming:{{ editor.version }}:{{ platform.os }} - - .yamato/package-test.yml#pack:{{ test.name }} -{% for prebuild in extra_jobs.pre -%} - - {{ prebuild }} -{% endfor -%} -{% endfor %} - -{{ test.name }}:{{ platform.os }}:{{ test.type }}: - name : "[{{ test.name }},{{ platform.os }},{{ test.type }}] Test" - agent: - type: {{ images[platform.os].type }} - image: {{ images[platform.os].image }} - flavor: {{ images[platform.os].flavor }} - variables: -{% if platform.os == "linux" -%} - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" -{% endif -%} -{% for v in template_environment_variables -%} - {{ v[0] }}: {{ v[1]}} -{% endfor -%} - commands: - - pip install unity-downloader-cli --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - npm install upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm -g - - unity-downloader-cli --source-file unity_revision.txt {% for component in platform.components %}-c {{ component }} {% endfor %}--wait --published-only - - > - upm-ci - {{ test.type }} - test - -u .Editor -{% if test.type == "template" -%} - --project-path {{ test.path }} -{% else -%} - --{{ test.type }}-path {{ test.path }} -{% endif -%} -{% if test.standalone == "false" -%} - --platform editmode -{% endif -%} - artifacts: - logs.zip: - paths: - - "upm-ci~/test-results/**/*" - dependencies: - - .yamato/base.yml#editor:priming:{{ test.name }}:{{ platform.os }} - - .yamato/package-test.yml#pack:{{ test.name }} -{% for prebuild in extra_jobs.pre -%} - - {{ prebuild }} -{% endfor -%} - -{% endfor %} -{% endfor %} - -{% for test in testables %} -pack:{{ test.name }}: - name: "[{{ test.name }}] Pack" - agent: - type: {{ images.linux.type }} - image: {{ images.linux.image }} - flavor: {{ images.linux.flavor }} - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" -{% for v in template_environment_variables -%} - {{ v[0] }}: {{ v[1]}} -{% endfor -%} - commands: - - git submodule update --init - - npm install git+ssh://git@github.cds.internal.unity3d.com/unity/upm-ci-utils#auto-publish -g --@upm:registry=https://artifactory.internal.unity3d.com/api/npm/upm-service-npm -{% if test.type == "project" or test.type == "template" %} - - upm-ci {{ test.type }} pack --project-path {{ test.path }} -{% elsif test.type == "package" %} - - upm-ci package pack --package-path {{ test.path }} -{% endif %} - artifacts: - packages: - paths: - - "upm-ci~/**/*" -{% if extra_jobs.pre -%} - dependencies: -{% for prebuild in extra_jobs.pre -%} - - {{ prebuild }} -{% endfor -%} -{% endif -%} -{% endfor %} - -test_trigger: - name: Tests Trigger - agent: - type: Unity::VM - image: package-ci/win10:stable - flavor: b1.large - commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - upm-ci package izon --tests-complete - triggers: - branches: - only: - - /.*/ - except: - - ^draft - dependencies: -{% for test in testables %} -{% for editor in editors %} -{% for platform in platforms %} - - .yamato/package-test.yml#{{ test.name }}:{{ platform.os }}:{{ editor.version }} - - .yamato/package-test.yml#{{ test.name }}:{{ platform.os }}:{{ test.type }} -{% endfor %} -{% endfor %} -{% endfor %} - -{% for test in testables %} -{% for editor in editors %} -{% for platform in platforms %} -promotion:test:{{ test.name }}:{{ platform.os }}:{{ editor.version }}: - name : "[{{ test.name }},{{ editor.version }},{{ platform.os }}] Promotion Test" - agent: - type: {{ images[platform.os].type }} - image: {{ images[platform.os].image }} - flavor: {{ images[platform.os].flavor }} - variables: -{% if platform.os == "linux" -%} - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" -{% endif -%} -{% for v in template_environment_variables -%} - {{ v[0] }}: {{ v[1]}} -{% endfor -%} - UPMCI_PROMOTION: 1 - commands: - - pip install unity-downloader-cli --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - - unity-downloader-cli --source-file unity_revision.txt {% for component in platform.components %}-c {{ component }} {% endfor %}--wait --published-only - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - > - upm-ci - {{ test.type }} - test - -u {{ editor.version }} -{% if test.type == "template" -%} - --project-path {{ test.path }} -{% else -%} - --{{ test.type }}-path {{ test.path }} -{% endif -%} - artifacts: - logs: - paths: - - "upm-ci~/test-results/**/*" - dependencies: - - .yamato/package-test.yml#pack:{{ test.name }} - - .yamato/base.yml#editor:priming:{{ editor.version }}:{{ platform.os }} -{% for prebuild in extra_jobs.pre -%} - - {{ prebuild }} -{% endfor -%} -{% endfor %} -{% endfor %} -{% endfor %} - -{% for test in testables %} -promotion:test:trigger:{{ test.name }}: - name: "[{{ test.name }}] Promotion Tests Trigger" - agent: - type: Unity::VM - image: package-ci/win10:stable - flavor: b1.large - commands: - - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - - upm-ci {{ test.type }} izon -d - dependencies: - - .yamato/package-test.yml#pack:{{ test.name }} -{% for editor in editors %} -{% for platform in platforms %} - - .yamato/package-test.yml#promotion:test:{{ test.name }}:{{ platform.os }}:{{ editor.version }} -{% endfor %} -{% endfor %} -{% endfor %} \ No newline at end of file diff --git a/.yamato/publish.yml b/.yamato/publish.yml new file mode 100644 index 000000000..81bf9f2b6 --- /dev/null +++ b/.yamato/publish.yml @@ -0,0 +1,38 @@ +test_editors: + - version: 2019.1.14f1 +test_platforms: + - name: win + type: Unity::VM + image: package-ci/win10:stable + flavor: b1.large + - name: mac + type: Unity::VM::osx + image: package-ci/mac:stable + flavor: m1.mac +--- + +publish: + name: Publish to Internal Registry + agent: + type: Unity::VM + image: package-ci/win10:stable + flavor: b1.large + commands: + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - upm-ci package publish --package-path . + triggers: + tags: + only: + - /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/ + artifacts: + artifacts: + paths: + - "upm-ci~/packages/*.tgz" + dependencies: + - .yamato/pack.yml#pack + {% for editor in test_editors %} + {% for platform in test_platforms %} + - .yamato/test.yml#test_{{ platform.name }}_{{ editor.version }} + - .yamato/test.yml#validate_{{ platform.name }}_{{ editor.version }} + {% endfor %} + {% endfor %} diff --git a/.yamato/template-config.yml b/.yamato/template-config.yml deleted file mode 100644 index 327ffc3d6..000000000 --- a/.yamato/template-config.yml +++ /dev/null @@ -1,57 +0,0 @@ -# This file contains all the supported global configurations for the yamato-ci templates repo -# This is required by all templates -# When using the template for setting up a yamato job, please include the following disclaimer: -#_________________________________________________ -# If you make structural changes to this file, please consider making a PR to the templating repo! -# Please find the source file here: https://github.cds.internal.unity3d.com/unity/yamato-ci-templates/blob/master/.yamato/template-config.yml -# VERSION 1 -#_________________________________________________ - -editors: - # Add any versions or branches required for testing here - # This needs to be an exhaustive list of all potential versions used by all template jobs - # Make sure to include the very minimum explicit version that a package or project requires (eg. 2019.1.0f1) - - version: 2019.1 - -publishing: - auto_publish: false - auto_version: false - -# Uncomment and add any yamato jobs here that are required for other jobs to be successful. Usually this means binary builds jobs or custom test jobs -# that need to run before package packaging and/or publishing can run -# extra_jobs: -# # Can be binary build jobs or extra validation jobs etc. This will run before the pack jobs so it will block all other jobs -# # so avoid adding long running jobs here and rather use testing_jobs for heavier stuff -# pre: -# - .yamato/myjobs.yml#extra:build:job -# # For extra jobs to run side-by-side with the regular package test jobs -# # Jobs listed here will be added as dependencies to things like publishing jobs etc. -# testing: -# - .yamato/myjobs.yml#extra:testing:job - -repo: - branches: - # What the integration branch for the repo is (the branch where things need to land) - integration: development - -platforms: - # Exhaustive list of operating systems and editor components used by all jobs so the preparation jobs - # can make sure all editors are cached on cheap vms before starting the heavy duty machines for running tests - - os: windows - components: - - editor - -testables: - # Add any package and/or project folders here. If you add a package that is already covered in a project - # you will end up doing duplicate testing etc, so try to avoid overlap - # name: all generated jobs will have this string as a part of the name - # path: the path to where this testable exists relative to the root folder of the repo - # type: package or project - # publish_source: indicates if this testable should be included in publishing - # standalone: true/false for if this testable contains runtime code or if it's only editor code - - name: com.unity.editorxr - path: . - type: package - publish_source: true - standalone: false - diff --git a/.yamato/test.yml b/.yamato/test.yml new file mode 100644 index 000000000..d44d7da79 --- /dev/null +++ b/.yamato/test.yml @@ -0,0 +1,73 @@ +test_editors: + - version: 2019.1.14f1 +test_platforms: + - name: win + type: Unity::VM + image: package-ci/win10:stable + flavor: b1.large + - name: mac + type: Unity::VM::osx + image: package-ci/mac:stable + flavor: m1.mac +--- + +{% for editor in test_editors %} +{% for platform in test_platforms %} +test_{{ platform.name }}_{{ editor.version }}: + name : Test {{ editor.version }} on {{ platform.name }} + agent: + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor}} + commands: + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci package test -u {{ editor.version }} --package-path . --type package-tests + artifacts: + logs: + paths: + - "upm-ci~/test-results/**/*" + dependencies: + - .yamato/pack.yml#pack +{% endfor %} +{% endfor %} + +# Validate the package on each editor version and each platform +# Validation only occurs in editmode. +{% for editor in test_editors %} +{% for platform in test_platforms %} +validate_{{ platform.name }}_{{ editor.version }}: + name : Validate {{ editor.version }} on {{ platform.name }} + agent: + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor}} + commands: + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci package test -u {{ editor.version }} --package-path . --type vetting-tests --platform editmode + artifacts: + logs: + paths: + - "upm-ci~/test-results/**/*" + dependencies: + - .yamato/pack.yml#pack +{% endfor %} +{% endfor %} + +test_trigger: + name: Tests Trigger + triggers: + branches: + only: + - "development" + pull_requests: + - targets: + only: + - "/.*/" + dependencies: + - .yamato/pack.yml#pack + {% for editor in test_editors %} + {% for platform in test_platforms %} + - .yamato/test.yml#test_{{platform.name}}_{{editor.version}} + - .yamato/test.yml#validate_{{platform.name}}_{{editor.version}} + {% endfor %} + {% endfor %}