From d52f501dc6d2972ce223655c90497197aa89d4a5 Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Wed, 1 Jul 2020 16:51:04 -0700 Subject: [PATCH 01/11] warn as errors --- .yamato/com.unity.ml-agents-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/com.unity.ml-agents-test.yml b/.yamato/com.unity.ml-agents-test.yml index 826cf92b63..d6b30d500f 100644 --- a/.yamato/com.unity.ml-agents-test.yml +++ b/.yamato/com.unity.ml-agents-test.yml @@ -65,7 +65,7 @@ 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 package test -u {{ editor.version }} --package-path {{ package.name }} -warnings-as-errors {{ 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 }} @@ -106,7 +106,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 package test -u {{ editor.version }} --package-path {{ package.name }} -warnings-as-errors {{ 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 }} From 1d8a4b5eff3fd4f9c1b16a47f07f94d1028ac38e Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Wed, 1 Jul 2020 17:03:35 -0700 Subject: [PATCH 02/11] fix command line args --- .yamato/com.unity.ml-agents-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/com.unity.ml-agents-test.yml b/.yamato/com.unity.ml-agents-test.yml index d6b30d500f..b05996f087 100644 --- a/.yamato/com.unity.ml-agents-test.yml +++ b/.yamato/com.unity.ml-agents-test.yml @@ -65,7 +65,7 @@ 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 }} -warnings-as-errors {{ editor.coverageOptions }} + - upm-ci package test -u {{ editor.version }} --package-path {{ package.name }} --warnings-as-errors {{ 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 }} @@ -106,7 +106,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 }} -warnings-as-errors {{ editor.coverageOptions }} + - upm-ci package test -u {{ editor.version }} --package-path {{ package.name }} --warnings-as-errors {{ 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 }} From f9d52e281df37b2377921e3791c512e8cc9be8ad Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Wed, 1 Jul 2020 17:14:26 -0700 Subject: [PATCH 03/11] actually fix warning --- com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs b/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs index 8996eb38d3..80662b4bf6 100644 --- a/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs +++ b/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs @@ -481,7 +481,7 @@ out DebugDisplayInfo.RayInfo debugRayOut tagsEqual = hitObject.CompareTag(tag); } } - catch (UnityException e) + catch (UnityException) { // If the tag is null, empty, or not a valid tag, just ignore it. } From d4c25f83b0818ccb3133e6d1b3f42e362fe57d70 Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Thu, 2 Jul 2020 11:44:12 -0700 Subject: [PATCH 04/11] try running package tests through project --- .yamato/com.unity.ml-agents-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.yamato/com.unity.ml-agents-test.yml b/.yamato/com.unity.ml-agents-test.yml index b05996f087..458c11b892 100644 --- a/.yamato/com.unity.ml-agents-test.yml +++ b/.yamato/com.unity.ml-agents-test.yml @@ -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 }} --warnings-as-errors {{ editor.coverageOptions }} + - upm-ci project test -u {{ editor.version }} --project-path DevProject --type package-tests --package-filter {{ package.name }} --warnings-as-errors {{ 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 }} From ab6b5b7159f3e7b3c15d21a6d4ab33c044d201f8 Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Thu, 2 Jul 2020 13:02:05 -0700 Subject: [PATCH 05/11] no warn-as-errors, fix trunk --- .yamato/com.unity.ml-agents-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/com.unity.ml-agents-test.yml b/.yamato/com.unity.ml-agents-test.yml index 458c11b892..b8ac45496f 100644 --- a/.yamato/com.unity.ml-agents-test.yml +++ b/.yamato/com.unity.ml-agents-test.yml @@ -65,7 +65,7 @@ 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 project test -u {{ editor.version }} --project-path DevProject --type package-tests --package-filter {{ package.name }} --warnings-as-errors {{ editor.coverageOptions }} + - upm-ci project test -u {{ editor.version }} --project-path DevProject --type package-tests --package-filter {{ package.name }} {{ editor.coverageOptions }} {% if package.name == "com.unity.ml-agents" %} # TODO get coverage tests running for extensions too @@ -107,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 }} --warnings-as-errors {{ editor.coverageOptions }} + - upm-ci project test -u {{ editor.version }} --project-path DevProject --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 }} From b76ca78270e3a8902720e5c35f3844c04028db6b Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Thu, 2 Jul 2020 13:14:47 -0700 Subject: [PATCH 06/11] wait on both package pack jobs --- .yamato/com.unity.ml-agents-test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.yamato/com.unity.ml-agents-test.yml b/.yamato/com.unity.ml-agents-test.yml index b8ac45496f..7851bfad39 100644 --- a/.yamato/com.unity.ml-agents-test.yml +++ b/.yamato/com.unity.ml-agents-test.yml @@ -65,7 +65,7 @@ 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 project test -u {{ editor.version }} --project-path DevProject --type package-tests --package-filter {{ 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 @@ -107,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 project test -u {{ editor.version }} --project-path DevProject --type package-tests --package-filter {{ 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 }} @@ -117,7 +117,9 @@ test_{{ package.name }}_{{ platform.name }}_trunk: paths: - "upm-ci~/test-results/**/*" dependencies: - - .yamato/com.unity.ml-agents-pack.yml#pack_{{ package.name }} + {% for dep_package in packages %} + - .yamato/com.unity.ml-agents-pack.yml#pack_{{ dep_package.name }} + {% endfor %} triggers: cancel_old_ci: true {% endfor %} From 39e62eb531c72c1863d712d4222df0246430c4d5 Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Thu, 2 Jul 2020 13:39:19 -0700 Subject: [PATCH 07/11] use project pack job --- .yamato/com.unity.ml-agents-pack.yml | 13 +++---------- .yamato/com.unity.ml-agents-test.yml | 4 +--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.yamato/com.unity.ml-agents-pack.yml b/.yamato/com.unity.ml-agents-pack.yml index 16ca5d2b5a..293869e7b8 100644 --- a/.yamato/com.unity.ml-agents-pack.yml +++ b/.yamato/com.unity.ml-agents-pack.yml @@ -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 %} diff --git a/.yamato/com.unity.ml-agents-test.yml b/.yamato/com.unity.ml-agents-test.yml index 7851bfad39..8c598bf04f 100644 --- a/.yamato/com.unity.ml-agents-test.yml +++ b/.yamato/com.unity.ml-agents-test.yml @@ -117,9 +117,7 @@ test_{{ package.name }}_{{ platform.name }}_trunk: paths: - "upm-ci~/test-results/**/*" dependencies: - {% for dep_package in packages %} - - .yamato/com.unity.ml-agents-pack.yml#pack_{{ dep_package.name }} - {% endfor %} + - .yamato/com.unity.ml-agents-pack.yml#pack triggers: cancel_old_ci: true {% endfor %} From 4cdfa9fdd1eb90ef76a6898d1d62c4753a187895 Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Thu, 2 Jul 2020 13:48:34 -0700 Subject: [PATCH 08/11] fix dep --- .yamato/com.unity.ml-agents-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/com.unity.ml-agents-test.yml b/.yamato/com.unity.ml-agents-test.yml index 8c598bf04f..3acf0ebec2 100644 --- a/.yamato/com.unity.ml-agents-test.yml +++ b/.yamato/com.unity.ml-agents-test.yml @@ -76,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" %} From 8dd21d3d99f89c911db173c005517b6354a73eaa Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Thu, 2 Jul 2020 14:04:45 -0700 Subject: [PATCH 09/11] update com.unity.multiplayer-hlapi version --- DevProject/Packages/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DevProject/Packages/manifest.json b/DevProject/Packages/manifest.json index 40022eeead..9c18a115e4 100644 --- a/DevProject/Packages/manifest.json +++ b/DevProject/Packages/manifest.json @@ -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", "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", From 39f0347e0800cd1992ac656eb59945d98c27f7ee Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Thu, 2 Jul 2020 14:05:36 -0700 Subject: [PATCH 10/11] fix trigger --- .yamato/com.unity.ml-agents-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/com.unity.ml-agents-test.yml b/.yamato/com.unity.ml-agents-test.yml index 3acf0ebec2..28b967bae0 100644 --- a/.yamato/com.unity.ml-agents-test.yml +++ b/.yamato/com.unity.ml-agents-test.yml @@ -85,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") From ed064dbecf73baef4ad6837bc9eb306e88524fef Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Thu, 2 Jul 2020 14:09:07 -0700 Subject: [PATCH 11/11] undo sensor change --- com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs b/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs index 80662b4bf6..8996eb38d3 100644 --- a/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs +++ b/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs @@ -481,7 +481,7 @@ out DebugDisplayInfo.RayInfo debugRayOut tagsEqual = hitObject.CompareTag(tag); } } - catch (UnityException) + catch (UnityException e) { // If the tag is null, empty, or not a valid tag, just ignore it. }