浏览代码

Add env var for pip constraints

/github-actions
Jonathan Harper 5 年前
当前提交
41952f49
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 12
      .github/workflows/deploy.yml

12
.github/workflows/deploy.yml


os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.6', '3.7', '3.8']
pip-constraints: ['test_constraints_max_tf1_version.txt', 'test_constraints_max_tf2_version.txt', 'test_constraints_min_version.txt']
env:
PIP_CONSTRAINTS: ${{ matrix.pip-constraints }}
steps:
- uses: actions/checkout@v2
- name: Set up Python

- name: Combine pip dependencies for caching
run: cat ml-agents/setup.py ml-agents-envs/setup.py gym-unity/setup.py test_requirements.txt ${{ matrix.pip_constraints }} > python_deps.txt
run: cat ml-agents/setup.py ml-agents-envs/setup.py gym-unity/setup.py test_requirements.txt $PIP_CONSTRAINTS > python_deps.txt
- uses: actions/cache@v2
if: startsWith(runner.os, 'Linux')
with:

. venv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install --progress-bar=off -e ./ml-agents-envs -c ${{ matrix.pip_constraints }}
pip install --progress-bar=off -e ./ml-agents -c ${{ matrix.pip_constraints }}
pip install --progress-bar=off -r test_requirements.txt -c ${{ matrix.pip_constraints }}
pip install --progress-bar=off -e ./gym-unity -c ${{ matrix.pip_constraints }}
pip install --progress-bar=off -e ./ml-agents-envs -c $PIP_CONSTRAINTS
pip install --progress-bar=off -e ./ml-agents -c $PIP_CONSTRAINTS
pip install --progress-bar=off -r test_requirements.txt -c $PIP_CONSTRAINTS
pip install --progress-bar=off -e ./gym-unity -c $PIP_CONSTRAINTS
- name: Run Tests for ml-agents and gym_unity
run: |
. venv/bin/activate

正在加载...
取消
保存