浏览代码

Merge pull request #2 from Unity-Technologies/reorg-code-structure

Add yamato configuration.
/main
GitHub 4 年前
当前提交
06d963c1
共有 7 个文件被更改,包括 202 次插入21 次删除
  1. 18
      prepare_package.sh
  2. 80
      .yamato/promotion.yml
  3. 104
      .yamato/upm-ci.yml
  4. 7
      CONTRIBUTING.md.meta
  5. 7
      README.md.meta
  6. 7
      README-ZH.md.meta

18
prepare_package.sh


#!/usr/bin/env bash
#set -xeuo pipefail
#set -x
printf "Preparing package:\n"
cd com.unity.uiwidgets
rm -rf Runtime/Plugins
rm -f Runtime/Plugins.meta
rm -rf Runtime/Resources/images
rm -f Runtime/Resources/images.meta
rm -rf Runtime/Resources/fonts
rm -f Runtime/Resources/fonts.meta
echo "Removed Resources and Plugins。"

80
.yamato/promotion.yml


test_editors:
- version: 2019.1
test_platforms:
- name: win
type: Unity::VM
image: package-ci/win10:stable
flavor: b1.large
---
{% for editor in test_editors %}
{% for platform in test_platforms %}
promotion_test_{{ platform.name }}_{{ editor.version }}:
name : Promotion Test {{ editor.version }} on {{ platform.name }}
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor}}
variables:
UPMCI_PROMOTION: 1
commands:
- npm install upm-ci-utils@latest -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package test --package-path ./com.unity.uiwidgets --unity-version {{ editor.version }}
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/upm-ci.yml#pack
{% endfor %}
{% endfor %}
promotion_test_trigger:
name: Promotion Tests Trigger
agent:
type: Unity::VM
image: package-ci/win10:stable
flavor: b1.large
commands:
- dir
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
packages:
paths:
- "upm-ci~/packages/**/*"
dependencies:
- .yamato/upm-ci.yml#pack
{% for editor in test_editors %}
{% for platform in test_platforms %}
- .yamato/promotion.yml#promotion_test_{{platform.name}}_{{editor.version}}
{% endfor %}
{% endfor %}
promote:
name: Promote to Production
agent:
type: Unity::VM
image: package-ci/win10:stable
flavor: b1.large
variables:
UPMCI_PROMOTION: 1
commands:
- npm install upm-ci-utils@latest -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path ./com.unity.uiwidgets
triggers:
tags:
only:
- /^v\d+.\d+.\d+(-preview(.\d+)?)?$/
artifacts:
artifacts:
paths:
- "upm-ci~/packages/*.tgz"
dependencies:
- .yamato/upm-ci.yml#pack
- .yamato/upm-ci.yml#publish
{% for editor in test_editors %}
{% for platform in test_platforms %}
- .yamato/promotion.yml#promotion_test_{{ platform.name }}_{{ editor.version }}
{% endfor %}
{% endfor %}

104
.yamato/upm-ci.yml


test_editors:
- version: 2019.1
- version: 2019.2
- version: 2019.4
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
---
pack:
name: Pack
agent:
type: Unity::VM
image: package-ci/ubuntu:stable
flavor: b1.small
commands:
- chmod +x ./prepare_package.sh
- ./prepare_package.sh
- 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 ./com.unity.uiwidgets
artifacts:
packages:
paths:
- "upm-ci~/**/*"
{% 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
- upm-ci package test --package-path ./com.unity.uiwidgets --unity-version {{ editor.version }}
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
packages:
paths:
- "upm-ci~/packages/**/*"
dependencies:
- .yamato/upm-ci.yml#pack
{% endfor %}
{% endfor %}
test_trigger:
name: Tests Trigger
agent:
type: Unity::VM
image: package-ci/win10:stable
flavor: b1.large
commands:
- dir
triggers:
branches:
only:
- "/.*/"
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
packages:
paths:
- "upm-ci~/packages/**/*"
dependencies:
- .yamato/upm-ci.yml#pack
{% for editor in test_editors %}
{% for platform in test_platforms %}
- .yamato/upm-ci.yml#test_{{platform.name}}_{{editor.version}}
{% endfor %}
{% endfor %}
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 ./com.unity.uiwidgets
triggers:
tags:
only:
- /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
artifacts:
artifacts:
paths:
- "upm-ci~/packages/*.tgz"
dependencies:
- .yamato/upm-ci.yml#pack
{% for editor in test_editors %}
{% for platform in test_platforms %}
- .yamato/upm-ci.yml#test_{{ platform.name }}_{{ editor.version }}
{% endfor %}
{% endfor %}

7
CONTRIBUTING.md.meta


fileFormatVersion: 2
guid: d5079cbdd40a34d6e966a9cb9e355f76
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

7
README.md.meta


fileFormatVersion: 2
guid: 1f81db83864a64e1787884fbd1e25cba
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

7
README-ZH.md.meta


fileFormatVersion: 2
guid: 10bb16e0fd5d84445aa576a308664220
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存