Skip to content

Commit d34adde

Browse files
jokubaskfabriziounity
authored andcommitted
improve package validation (#86)
1 parent 8f69c44 commit d34adde

File tree

1 file changed

+32
-36
lines changed

1 file changed

+32
-36
lines changed

.yamato/upm-ci.yml

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,24 @@ editor_versions:
2626
- version: "trunk"
2727
---
2828

29-
30-
run_tests_on_mono:
31-
name: Tests NUnit
29+
{% for platform in build_platforms %}
30+
{% unless platform.name == "linux" %}
31+
run_tests_on_mono_{{platform.name}}:
32+
name: Tests NUnit on {{platform.name}}
33+
agent:
34+
name: {{platform.name}}
35+
type: {{platform.type}}
36+
image: {{platform.image}}
37+
flavor: {{platform.flavor}}
3238
commands:
39+
{% if platform.name == "windows" %}
40+
- choco install nuget.commandline
41+
{% endif %}
3342
- nuget restore src
3443
- msbuild src/Unity.Mathematics.sln
3544
- mono src/packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe src/Tests/bin/Debug/Unity.Mathematics.Tests.dll --process=single
36-
agent:
37-
name: mac
38-
type: Unity::VM::osx
39-
image: buildfarm/mac:latest
40-
flavor: m1.mac
41-
42-
43-
pack_package:
44-
name: Pack package
45-
agent:
46-
name: mac
47-
type: Unity::VM::osx
48-
image: buildfarm/mac:latest
49-
flavor: m1.mac
50-
commands:
51-
- npm install upm-ci-utils@stable --registry https://api.bintray.com/npm/unity/unity-npm -g
52-
- upm-ci package pack --package-path src/
53-
artifacts:
54-
packages:
55-
paths:
56-
- "upm-ci~/packages/**/*"
57-
dependencies:
58-
- .yamato/upm-ci.yml#run_tests_on_mono
59-
45+
{% endunless %}
46+
{% endfor %}
6047

6148
validate_package_minimal:
6249
name: Validate Package Linux Minimal
@@ -67,13 +54,18 @@ validate_package_minimal:
6754
flavor: b1.large
6855
commands:
6956
- sudo npm install upm-ci-utils@stable --registry https://api.bintray.com/npm/unity/unity-npm -g
57+
- DISPLAY=:0.0 upm-ci package pack --package-path src/
7058
- DISPLAY=:0.0 upm-ci package test --package-path src/ --unity-version 2019.1
7159
artifacts:
7260
packages:
7361
paths:
7462
- "upm-ci~/packages/**/*"
7563
dependencies:
76-
- .yamato/upm-ci.yml#pack_package
64+
{% for platform in build_platforms %}
65+
{% unless platform.name == "linux" %}
66+
- .yamato/upm-ci.yml#run_tests_on_mono_{{platform.name}}
67+
{% endunless %}
68+
{% endfor %}
7769

7870
{% for platform in build_platforms %}
7971
{% for editor in editor_versions %}
@@ -86,13 +78,21 @@ validate_package_{{platform.name}}_{{editor.version}}:
8678
flavor: {{platform.flavor}}
8779
commands:
8880
- {{platform.npm_cmd}} install upm-ci-utils@stable --registry https://api.bintray.com/npm/unity/unity-npm -g
81+
- {{platform.upm_cmd}} package pack --package-path src/
8982
- {{platform.upm_cmd}} package test --package-path src/ --unity-version {{ editor.version }}
9083
artifacts:
91-
packages:
84+
packages_{{platform.name}}_{{editor.version}}:
9285
paths:
9386
- "upm-ci~/packages/**/*"
87+
results_{{platform.name}}_{{editor.version}}:
88+
paths:
89+
- "upm-ci~/**/*"
9490
dependencies:
95-
- .yamato/upm-ci.yml#pack_package
91+
{% for platform in build_platforms %}
92+
{% unless platform.name == "linux" %}
93+
- .yamato/upm-ci.yml#run_tests_on_mono_{{platform.name}}
94+
{% endunless %}
95+
{% endfor %}
9696
{% endfor %}
9797
{% endfor %}
9898

@@ -111,11 +111,7 @@ publish:
111111
paths:
112112
- "upm-ci~/packages/**/*"
113113
dependencies:
114-
{% for platform in build_platforms %}
115-
{% for editor in editor_versions %}
116-
- .yamato/upm-ci.yml#validate_package_{{platform.name}}_{{editor.version}}
117-
{% endfor %}
118-
{% endfor %}
114+
- .yamato/upm-ci.yml#validate_package_minimal
119115

120116

121117
promote:
@@ -157,7 +153,7 @@ nightly_ci:
157153
{% for editor in editor_versions %}
158154
- .yamato/upm-ci.yml#validate_package_{{platform.name}}_{{editor.version}}
159155
{% endfor %}
160-
{% endfor %}
156+
{% endfor %}
161157

162158

163159
commit_ci:

0 commit comments

Comments
 (0)