比较提交

...
此合并请求有变更与目标分支冲突。
/.pre-commit-config.yaml
/gym-unity/setup.py
/gym-unity/gym_unity/__init__.py
/ml-agents-envs/setup.py
/ml-agents-envs/mlagents_envs/__init__.py
/ml-agents/setup.py
/ml-agents/mlagents/trainers/__init__.py
/.github/workflows/publish_pypi.yaml
/.circleci/config.yml

1 次代码提交

作者 SHA1 备注 提交日期
Chris Elion b96a5ea3 cleanup step names 4 年前
共有 9 个文件被更改,包括 65 次插入77 次删除
  1. 64
      .circleci/config.yml
  2. 8
      .pre-commit-config.yaml
  3. 5
      gym-unity/setup.py
  4. 4
      gym-unity/gym_unity/__init__.py
  5. 5
      ml-agents-envs/setup.py
  6. 4
      ml-agents-envs/mlagents_envs/__init__.py
  7. 5
      ml-agents/setup.py
  8. 4
      ml-agents/mlagents/trainers/__init__.py
  9. 43
      .github/workflows/publish_pypi.yaml

64
.circleci/config.yml


workflows:
version: 2
workflow:
jobs:
# The first deploy jobs are the "real" ones that upload to pypi
- deploy:
name: deploy ml-agents-envs
directory: ml-agents-envs
filters:
tags:
# Matches e.g. "release_123"
only: /^release_[0-9]+$/
branches:
ignore: /.*/
- deploy:
name: deploy ml-agents
directory: ml-agents
filters:
tags:
# Matches e.g. "release_123"
only: /^release_[0-9]+$/
branches:
ignore: /.*/
- deploy:
name: deploy gym-unity
directory: gym-unity
filters:
tags:
# Matches e.g. "release_123"
only: /^release_[0-9]+$/
branches:
ignore: /.*/
# These deploy jobs upload to the pypi test repo. They have different tag triggers than the real ones.
- deploy:
name: test deploy ml-agents-envs
directory: ml-agents-envs
username: mlagents-test
test_repository_args: --repository-url https://test.pypi.org/legacy/
filters:
tags:
# Matches e.g. "release_123_test456
only: /^release_[0-9]+_test[0-9]+$/
branches:
ignore: /.*/
- deploy:
name: test deploy ml-agents
directory: ml-agents
username: mlagents-test
test_repository_args: --repository-url https://test.pypi.org/legacy/
filters:
tags:
# Matches e.g. "release_123_test456
only: /^release_[0-9]+_test[0-9]+$/
branches:
ignore: /.*/
- deploy:
name: test deploy gym-unity
directory: gym-unity
username: mlagents-test
test_repository_args: --repository-url https://test.pypi.org/legacy/
filters:
tags:
# Matches e.g. "release_123_test456
only: /^release_[0-9]+_test[0-9]+$/
branches:
ignore: /.*/

8
.pre-commit-config.yaml


language: script
entry: utils/validate_inits.py
types: [python]
- id: validate-release-links-py
name: validate release links
language: script
entry: utils/validate_release_links.py
# - id: validate-release-links-py # TODO revert
# name: validate release links
# language: script
# entry: utils/validate_release_links.py
- id: dotnet-format
name: dotnet-format
language: script

5
gym-unity/setup.py


description = "verify that the git tag matches our version"
def run(self):
tag = os.getenv("CIRCLE_TAG")
if "GITHUB_REF" in os.environ:
tag = os.getenv("GITHUB_REF").replace("refs/tags/", "")
else:
tag = os.getenv("CIRCLE_TAG")
if tag != EXPECTED_TAG:
info = "Git tag: {} does not match the expected tag of this app: {}".format(

4
gym-unity/gym_unity/__init__.py


# Version of the library that will be used to upload to pypi
__version__ = "0.21.0.dev0"
__version__ = "0.21.0.dev1"
__release_tag__ = None
__release_tag__ = "release_8_test1" # TODO DO NOT MERGE

5
ml-agents-envs/setup.py


description = "verify that the git tag matches our version"
def run(self):
tag = os.getenv("CIRCLE_TAG")
if "GITHUB_REF" in os.environ:
tag = os.getenv("GITHUB_REF").replace("refs/tags/", "")
else:
tag = os.getenv("CIRCLE_TAG")
if tag != EXPECTED_TAG:
info = "Git tag: {} does not match the expected tag of this app: {}".format(

4
ml-agents-envs/mlagents_envs/__init__.py


# Version of the library that will be used to upload to pypi
__version__ = "0.21.0.dev0"
__version__ = "0.21.0.dev1"
__release_tag__ = None
__release_tag__ = "release_8_test1" # TODO DO NOT MERGE

5
ml-agents/setup.py


description = "verify that the git tag matches our version"
def run(self):
tag = os.getenv("CIRCLE_TAG")
if "GITHUB_REF" in os.environ:
tag = os.getenv("GITHUB_REF").replace("refs/tags/", "")
else:
tag = os.getenv("CIRCLE_TAG")
if tag != EXPECTED_TAG:
info = "Git tag: {} does not match the expected tag of this app: {}".format(

4
ml-agents/mlagents/trainers/__init__.py


# Version of the library that will be used to upload to pypi
__version__ = "0.21.0.dev0"
__version__ = "0.21.0.dev1"
__release_tag__ = None
__release_tag__ = "release_8_test1" # TODO DO NOT MERGE

43
.github/workflows/publish_pypi.yaml


# Adapted from https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: publish to PyPI (or TestPyPI)
on:
push:
tags:
- "release_[0-9]+_test[0-9]+"
- "release_[0-9]+"
jobs:
build-and-publish:
name: publish to PyPI (or TestPyPI)
runs-on: ubuntu-18.04
strategy:
matrix:
package-path: [ml-agents, ml-agents-envs, gym-unity]
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: pip install setuptools wheel twine --user
- name: verify git tag vs. version
run: |
cd ${{ matrix.package-path }}
python setup.py verify
- name: Build package
run: |
cd ${{ matrix.package-path }}
python setup.py sdist
python setup.py bdist_wheel
- name: Publish distribution 📦 to Test PyPI
if: startsWith(github.ref, 'refs/tags') && contains(github.ref, 'test')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
packages_dir: ${{ matrix.package-path }}/dist/
正在加载...
取消
保存