浏览代码

setup venv in yamato commands

/yamato-linux-debug-venv
Chris Elion 4 年前
当前提交
5ef19213
共有 3 个文件被更改,包括 23 次插入15 次删除
  1. 7
      .yamato/python-ll-api-test.yml
  2. 19
      .yamato/training-int-tests.yml
  3. 12
      ml-agents/tests/yamato/yamato_utils.py

7
.yamato/python-ll-api-test.yml


variables:
UNITY_VERSION: {{ editor.version }}
commands:
- sudo apt-get update && sudo apt-get install -y python3-venv
- python3 -m venv venv
- source venv/bin/activate
- python3 -m pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- python3 -u -m ml-agents.tests.yamato.setup_venv
- ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py

triggers:
cancel_old_ci: true
expression: |
(pull_request.target eq "master" OR
pull_request.target match "release.+") AND
#(pull_request.target eq "master" 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 "Project/**" OR

19
.yamato/training-int-tests.yml


variables:
UNITY_VERSION: {{ editor.version }}
commands:
- sudo apt-get update && sudo apt-get install -y python3-venv
- python3 -m venv venv
- source venv/bin/activate
dependencies:
- .yamato/standalone-build-test.yml#test_linux_standalone_{{ editor.version }}
# dependencies:
# - .yamato/standalone-build-test.yml#test_linux_standalone_{{ editor.version }}
(pull_request.target eq "master" OR
pull_request.target match "release.+") AND
#(pull_request.target eq "master" 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 "com.unity.ml-agents.extensions/**" OR

- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=mac
- python -u -m ml-agents.tests.yamato.training_int_tests --python=0.16.0
- python -u -m ml-agents.tests.yamato.training_int_tests --csharp={{ csharp_backcompat_version }}
dependencies:
- .yamato/standalone-build-test.yml#test_linux_training_int_{{ editor_version }}
# dependencies:
# - .yamato/standalone-build-test.yml#test_linux_training_int_{{ editor_version }}
(pull_request.target eq "master" OR
pull_request.target match "release.+") AND
#(pull_request.target eq "master" 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 "com.unity.ml-agents.extensions/**" OR

12
ml-agents/tests/yamato/yamato_utils.py


venv_path += "_" + mlagents_python_version
# Set up the venv and install mlagents
if platform == "linux":
subprocess.check_call(
"sudo apt-get update && sudo apt-get install -y python3-venv", shell=True
)
# if platform == "linux":
# subprocess.check_call(
# "sudo apt-get update && sudo apt-get install -y python3-venv", shell=True
# )
subprocess.check_call(f"python3 -m venv {venv_path}", shell=True)
if platform == "darwin":
subprocess.check_call(f"python3 -m venv {venv_path}", shell=True)
pip_commands = ["--upgrade pip", "--upgrade setuptools"]
if mlagents_python_version:
# install from pypi

正在加载...
取消
保存