-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Turns physics modules into optional dependencies. #5112
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{% metadata_file .yamato/coverage_tests.metafile %} | ||
--- | ||
{% for package in coverage_test_packages %} | ||
{% for editor in coverage_test_editors %} | ||
{% for platform in coverage_test_platforms %} | ||
{% capture coverageOptions %} --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+{{ package.assembly }}'{% endcapture %} | ||
|
||
test_coverage_{{ package.name }}_{{ platform.name }}_{{ editor.version }}: | ||
name : Coverage {{ package.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 project test -u {{ editor.version }} --type project-tests --project-path {{ editor.testProject }} --package-filter {{ package.name }} {{ coverageOptions }} --extra-utr-arg "reruncount=2" | ||
- python3 ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ package.minCoveragePct }} | ||
artifacts: | ||
logs: | ||
paths: | ||
- "upm-ci~/test-results/**/*" | ||
dependencies: | ||
- .yamato/com.unity.ml-agents-pack.yml#pack | ||
triggers: | ||
cancel_old_ci: true | ||
{% if platform.name == "linux" %} | ||
expression: | | ||
(pull_request.target eq "main" OR | ||
pull_request.target match "release.+") AND | ||
NOT pull_request.draft AND | ||
(pull_request.changes.any match "com.unity.ml-agents/**" OR | ||
pull_request.changes.any match " {{ editor.testProject }}/**" OR | ||
{% 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") | ||
{% endif %} | ||
{% endfor %} | ||
{% endfor %} | ||
{% endfor %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,65 @@ | ||
OptionalDependencyTestsLinux: | ||
name : LinuxOptionalDependenciesTests | ||
agent: | ||
type: Unity::VM | ||
image: package-ci/ubuntu:stable | ||
flavor: b1.medium | ||
commands: | ||
- | | ||
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 | ||
npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm | ||
unity-config settings editor-path ./.Editor | ||
unity-config project create opt-deps-test | ||
unity-config project add dependency com.unity.ml-agents/ | ||
unity-config project add testable com.unity.ml-agents | ||
unity-config project add dependency [email protected] | ||
unity-config project add dependency [email protected] | ||
unity-config project add dependency [email protected] | ||
unity-config project add dependency [email protected] | ||
upm-ci project test -u 2019.4 --type project-tests --project-path opt-deps-test --package-filter com.unity.ml-agents | ||
artifacts: | ||
logs: | ||
paths: | ||
- "upm-ci~/test-results/**/*" | ||
dependencies: | ||
- .yamato/com.unity.ml-agents-pack.yml#pack | ||
triggers: | ||
cancel_old_ci: true | ||
expression: | | ||
(pull_request.target eq "main" OR | ||
pull_request.target match "release.+") AND | ||
NOT pull_request.draft AND | ||
(pull_request.changes.any match "com.unity.ml-agents/**" OR | ||
pull_request.changes.any match ".yamato/com.unity.ml-agents-test.yml") | ||
optional_deps: | ||
- name: Analytics | ||
project: "OptionalDepedencyTests/NoAnalyticsModule" | ||
version: 2020.2 | ||
- name: Physics | ||
project: OptionalDepedencyTests/NoPhysicsModule | ||
version: 2020.2 | ||
- name: Physics2D | ||
project: OptionalDepedencyTests/NoPhysics2DModule | ||
version: 2020.2 | ||
--- | ||
|
||
{% for optional_dep in optional_deps %} | ||
OptionalDependencyTests_{{ optional_dep.name }}: | ||
name : Test Optional Package Dependencies {{ optional_dep.name }} | ||
agent: | ||
type: Unity::VM | ||
image: package-ci/ubuntu:stable | ||
flavor: b1.medium | ||
commands: | ||
- | | ||
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 | ||
npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm | ||
unity-config settings editor-path ./.Editor | ||
unity-config project create opt-deps-test | ||
unity-config project add dependency com.unity.ml-agents/ | ||
unity-config project add testable com.unity.ml-agents | ||
unity-config project add dependency [email protected] | ||
unity-config project add dependency [email protected] | ||
{% unless optional_dep.name == "Physics" %} | ||
unity-config project add dependency [email protected] | ||
{% endunless %} | ||
{% unless optional_dep.name == "Physics2D" %} | ||
unity-config project add dependency [email protected] | ||
{% endunless %} | ||
{% unless optional_dep.name == "Analytics" %} | ||
unity-config project add dependency [email protected] | ||
{% endunless %} | ||
upm-ci project test -u {{ optional_dep.version }} --type project-tests --project-path opt-deps-test --package-filter com.unity.ml-agents | ||
artifacts: | ||
logs: | ||
paths: | ||
- "upm-ci~/test-results/**/*" | ||
dependencies: | ||
- .yamato/com.unity.ml-agents-pack.yml#pack | ||
{% for coverage_editor in coverage_test_editors %} | ||
{% for coverage_plathform in coverage_test_platforms %} | ||
{% for coverage_package in coverage_test_packages %} | ||
- .yamato/com.unity.ml-agents-coverage.yml#test_coverage_{{ coverage_package.name }}_{{ coverage_platform.name }}_{{ coverage_editor.version }} | ||
{% endfor %} | ||
{% endfor %} | ||
{% endfor %} | ||
triggers: | ||
cancel_old_ci: true | ||
expression: | | ||
(pull_request.target eq "main" OR | ||
pull_request.target match "release.+") AND | ||
NOT pull_request.draft AND | ||
(pull_request.changes.any match "com.unity.ml-agents/**" OR | ||
pull_request.changes.any match ".yamato/com.unity.ml-agents-test.yml") | ||
{% endfor %} | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yml to test the package with different project setups to ensure all tests pass with each optional dependency removed.