比较提交

...
此合并请求有变更与目标分支冲突。
/.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

8 次代码提交

作者 SHA1 备注 提交日期
Chris Elion 8a71144d fix envs 4 年前
Chris Elion 64113c20 publish all 3 packages 4 年前
Chris Elion 8d4886fd tag parsing: 4 年前
Chris Elion 51562e67 fix yaml 4 年前
Chris Elion 509639e1 remove circleCI workflow 4 年前
Chris Elion f129ded4 tag filtering 4 年前
Chris Elion 8fdeddec expected tag 4 年前
Chris Elion ae5e6dd5 first pass, will fail 4 年前
共有 9 个文件被更改,包括 62 次插入74 次删除
  1. 64
      .circleci/config.yml
  2. 8
      .pre-commit-config.yaml
  3. 2
      gym-unity/gym_unity/__init__.py
  4. 5
      gym-unity/setup.py
  5. 2
      ml-agents-envs/mlagents_envs/__init__.py
  6. 5
      ml-agents-envs/setup.py
  7. 2
      ml-agents/mlagents/trainers/__init__.py
  8. 5
      ml-agents/setup.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

2
gym-unity/gym_unity/__init__.py


__version__ = "0.21.0.dev0"
# Git tag that will be checked to determine whether to trigger upload to pypi
__release_tag__ = None
__release_tag__ = "release_8_test0" # TODO DO NOT MERGE

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(

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


__version__ = "0.21.0.dev0"
# Git tag that will be checked to determine whether to trigger upload to pypi
__release_tag__ = None
__release_tag__ = "release_8_test0" # 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(

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


__version__ = "0.21.0.dev0"
# Git tag that will be checked to determine whether to trigger upload to pypi
__release_tag__ = None
__release_tag__ = "release_8_test0" # 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(

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 Python 🐍 distributions 📦 to PyPI and TestPyPI
on:
push:
tags:
- "release_[0-9]+_test[0-9]+"
- "release_[0-9]+"
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and 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/
正在加载...
取消
保存