Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .yamato/_run-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ run_all_tests:
- .yamato/project-tests.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
{% endif -%}
{% endfor -%}

## Test minimal project with different versions of dependencies
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding to RunAll - NonTrunk (runs nightly)

{% if project.name == "minimalproject" -%}
{% for dependency in dependencies -%}
{% for depeditor in dependency.test_editors -%}
{% if depeditor != "trunk" -%}
- .yamato/package-tests.yml#test_compatibility_{{ project.name }}_{{ project.packages.first.name }}_with_{{ dependency.name }}@{{ dependency.version }}_{{ depeditor }}_{{ platform.name }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endif -%}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really liking the nested for's everywhere. Should look into changing that in the future.

{% endfor -%}
{% endfor -%}

Expand All @@ -34,6 +45,17 @@ run_all_tests_trunk:
- .yamato/project-tests.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
{% endif -%}
{% endfor -%}

## Test minimal project with different versions of dependencies on trunk
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding to RunAll - trunk (runs weekly)

{% if project.name == "minimalproject" -%}
{% for dependency in dependencies -%}
{% for depeditor in dependency.test_editors -%}
{% if depeditor == "trunk" -%}
- .yamato/package-tests.yml#test_compatibility_{{ project.name }}_{{ project.packages.first.name }}_with_{{ dependency.name }}@{{ dependency.version }}_{{ depeditor }}_{{ platform.name }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endif -%}
{% endfor -%}
{% endfor -%}

Expand Down Expand Up @@ -63,6 +85,22 @@ all_package_tests:
{% endfor -%}
{% endfor -%}

# Test minimal project with different versions of dependencies
all_compatibility_tests:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handy Run All just for these, incase we update UTP in the future and just want to kick off these builds.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

name: Run All Compatibility Tests
dependencies:
{% for platform in test_platforms -%}
{% for project in projects -%}
{% if project.name == "minimalproject" -%}
{% for dependency in dependencies -%}
{% for editor in dependency.test_editors -%}
- .yamato/package-tests.yml#test_compatibility_{{ project.name }}_{{ project.packages.first.name }}_with_{{ dependency.name }}@{{ dependency.version }}_{{ editor }}_{{ platform.name }}
{% endfor -%}
{% endfor -%}
{% endif -%}
{% endfor -%}
{% endfor -%}

all_singlenode_multiprocess_tests:
name: Run All Multiprocess Tests - Single Node
dependencies:
Expand Down
27 changes: 27 additions & 0 deletions .yamato/package-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,31 @@ test_{{project.name}}_{{ package.name }}_{{ editor }}_{{ platform.name }}:
{% endfor -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}

# Test minimal project with different versions of dependencies
{% for project in projects -%}
{% if project.name == "minimalproject" -%}
{% for dependency in dependencies -%}
{% for editor in dependency.test_editors -%}
{% for platform in test_platforms -%}
test_compatibility_{{project.name}}_{{ project.packages.first.name }}_with_{{ dependency.name }}@{{ dependency.version }}_{{ editor }}_{{ platform.name }}:
name : {{ project.name }} - {{ project.packages.first.name }} with {{ dependency.name }}@{{ dependency.version }} - {{ editor }} 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 == "ubuntu" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --type project-tests --project-path {{ project.name }} --package-filter {{ project.packages.first.name }}
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/project-pack.yml#pack_{{ project.name }}_{{ dependency.name }}@{{ dependency.version }}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire config is pretty much the same as the one above, except its dependency is a Project Packed with UTP 2.0

{% endfor -%}
{% endfor -%}
{% endfor -%}
{% endif -%}
{% endfor -%}
27 changes: 27 additions & 0 deletions .yamato/project-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,31 @@ pack_{{ project.name }}:
packages:
paths:
- "upm-ci~/packages/**/*"
{% endfor -%}

# Pack minimal project with different versions of dependencies
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pack minimal project with updated dependencies (UTP 2.0 in this case). This is then used by upm-ci tests in the pipeline

{% for project in projects -%}
{% if project.name == "minimalproject" -%}
{% for dependency in dependencies -%}
pack_{{ project.name }}_{{ dependency.name }}@{{ dependency.version }}:
name: Pack {{ project.name }} with {{ dependency.name }}@{{ dependency.version }}
agent:
type: Unity::VM
image: package-ci/ubuntu:stable
flavor: b1.small
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- curl -L https://artifactory.prd.it.unity3d.com/artifactory/api/gpg/key/public | sudo apt-key add -
- sudo sh -c "echo 'deb https://artifactory.prd.it.unity3d.com/artifactory/unity-apt-local bionic main' > /etc/apt/sources.list.d/unity.list"
- sudo apt update
- sudo apt install -y unity-config
- unity-config settings project-path {{ project.path }}
- unity-config project add dependency {{ dependency.name }}@{{ dependency.version }}
- upm-ci project pack --project-path {{ project.path }}
artifacts:
packages:
paths:
- "upm-ci~/packages/**/*"
{% endfor -%}
{% endif -%}
{% endfor -%}
8 changes: 8 additions & 0 deletions .yamato/project.metafile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ projects:
- 2022.2
- trunk

# Package dependencies
dependencies:
- name: com.unity.transport
version: 2.0.0-exp.6
test_editors:
- 2022.2
- trunk

# Scripting backends used by Standalone Playmode Tests
scripting_backends:
- mono
Expand Down