Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extension package tests #4189

Merged
merged 11 commits into from
Jul 2, 2020
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
13 changes: 3 additions & 10 deletions .yamato/com.unity.ml-agents-pack.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
packages:
- name: com.unity.ml-agents
- name: com.unity.ml-agents.extensions
---

{% for package in packages %}
pack_{{ package.name }}:
name: Pack {{ package.name }}
pack:
name: Pack
agent:
type: Unity::VM::osx
image: package-ci/mac: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
- upm-ci package pack --package-path {{ package.name }}
- upm-ci project pack --project-path Project
artifacts:
packages:
paths:
- "upm-ci~/packages/**/*"
triggers:
cancel_old_ci: true
{% endfor %}
11 changes: 6 additions & 5 deletions .yamato/com.unity.ml-agents-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ test_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
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 -u {{ editor.version }} --package-path {{ package.name }} {{ editor.coverageOptions }}
- upm-ci project test -u {{ editor.version }} --project-path Project --type package-tests --package-filter {{ package.name }} {{ editor.coverageOptions }}

{% if package.name == "com.unity.ml-agents" %}
# TODO get coverage tests running for extensions too
- python ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}
Expand All @@ -75,7 +76,7 @@ test_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/com.unity.ml-agents-pack.yml#pack_{{ package.name }}
- .yamato/com.unity.ml-agents-pack.yml#pack
triggers:
cancel_old_ci: true
{% if platform.name == "mac" %}
Expand All @@ -84,7 +85,7 @@ test_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
pull_request.target match "release.+") AND
NOT pull_request.draft AND
(pull_request.changes.any match "com.unity.ml-agents/**" OR
{% if package.name == "com.unity.ml-agents" %}
{% if package.name == "com.unity.ml-agents.extensions" %}
pull_request.changes.any match "com.unity.ml-agents.extensions/**" OR
{% endif %}
pull_request.changes.any match ".yamato/com.unity.ml-agents-test.yml")
Expand All @@ -106,7 +107,7 @@ test_{{ package.name }}_{{ platform.name }}_trunk:
- python -m pip install unity-downloader-cli --extra-index-url https://artifactory.eu-cph-1.unityops.net/api/pypi/common-python/simple
- unity-downloader-cli -u trunk -c editor --wait --fast
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package test -u {{ editor.version }} --package-path {{ package.name }} {{ editor.coverageOptions }}
- upm-ci project test -u {{ editor.version }} --project-path Project --type package-tests --package-filter {{ package.name }} {{ editor.coverageOptions }}
{% if package.name == "com.unity.ml-agents" %}
# TODO get coverage tests running for extensions too
- python ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}
Expand All @@ -116,7 +117,7 @@ test_{{ package.name }}_{{ platform.name }}_trunk:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/com.unity.ml-agents-pack.yml#pack_{{ package.name }}
- .yamato/com.unity.ml-agents-pack.yml#pack
triggers:
cancel_old_ci: true
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion DevProject/Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"com.unity.ide.vscode": "1.1.4",
"com.unity.ml-agents": "file:../../com.unity.ml-agents",
"com.unity.ml-agents.extensions": "file:../../com.unity.ml-agents.extensions",
"com.unity.multiplayer-hlapi": "1.0.4",
"com.unity.multiplayer-hlapi": "1.0.6",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was producing errors:

[20:53:43.945 INF] Compiler
	severity: Error
	message: Deterministic compilation failed. You can disable Deterministic builds in Player Settings
Library/PackageCache/com.unity.multiplayer-hlapi@1.0.4/Editor/Tools/Weaver/AssemblyInfo.cs(22,28): error CS8357: The specified version string contains wildcards, which are not compatible with determinism. Either remove wildcards from the version string, or disable determinism for this compilation
	stacktrace: 
	line: 22
	file: Library/PackageCache/com.unity.multiplayer-hlapi@1.0.4/Editor/Tools/Weaver/AssemblyInfo.cs

Should be fixed in https://docs.unity3d.com/Packages/com.unity.multiplayer-hlapi@1.0/changelog/CHANGELOG.html#106---2020-05-08

"com.unity.package-manager-doctools": "1.1.1-preview.3",
"com.unity.package-validation-suite": "0.11.0-preview",
"com.unity.purchasing": "2.0.6",
Expand Down