From df023aa08ccdd0e9af2ad3a534957f8b4d14e60e Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 7 Jun 2021 23:25:45 +0300 Subject: [PATCH 1/4] add filter for binary_linux_wheel_py3.7_cpu fixes issue #3997 --- .circleci/config.yml | 5 +++++ .circleci/regenerate.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c6e45edbfcc..f4ad0294eca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1024,6 +1024,11 @@ workflows: - binary_linux_wheel: conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu + filters: + branches: + only: master,nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_linux_wheel_py3.7_cpu python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda102 diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index db6b44c089a..d613a416b68 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -45,6 +45,10 @@ def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6, (python_version != python_versions[-1] or (cu_version not in [cu_versions[0], cu_versions[-1]])): fb = "master" + if not fb and (os_type == 'linux' and cu_version == 'cpu' and + btype == 'wheel' and python_version =='3.7'): + # this is for build_docs, the versions must match + fb = "master,nightly" w += workflow_pair( btype, os_type, python_version, cu_version, unicode, prefix, upload, filter_branch=fb) From 4faa664781a0bf2f48944f4971a5953b4802ce60 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 8 Jun 2021 13:56:28 +0300 Subject: [PATCH 2/4] add tag,nightly filter to build_docs --- .circleci/config.yml | 6 ++++++ .circleci/regenerate.py | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f4ad0294eca..b296e6c3d34 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1427,6 +1427,12 @@ workflows: name: binary_win_conda_py3.9_cu111 python_version: '3.9' - build_docs: + filters: + branches: + only: + - nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: build_docs python_version: '3.7' requires: diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index d613a416b68..82a61cba41c 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -55,7 +55,7 @@ def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6, if not filter_branch: # Build on every pull request, but upload only on nightly and tags - w += build_doc_job(None) + w += build_doc_job('nightly') w += upload_doc_job('nightly') return indent(indentation, w) @@ -87,7 +87,8 @@ def build_doc_job(filter_branch): } if filter_branch: - job["filters"] = gen_filter_branch_tree(filter_branch) + job["filters"] = gen_filter_branch_tree(filter_branch, + tags_list=RC_PATTERN) return [{"build_docs": job}] From 4955a42b0b4216a09325c703ca304ce5160e93b0 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 8 Jun 2021 16:20:16 +0300 Subject: [PATCH 3/4] flake8 formatting --- .circleci/regenerate.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 82a61cba41c..162d3098279 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -45,8 +45,10 @@ def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6, (python_version != python_versions[-1] or (cu_version not in [cu_versions[0], cu_versions[-1]])): fb = "master" - if not fb and (os_type == 'linux' and cu_version == 'cpu' and - btype == 'wheel' and python_version =='3.7'): + if not fb and (os_type == 'linux' and + cu_version == 'cpu' and + btype == 'wheel' and + python_version == '3.7'): # this is for build_docs, the versions must match fb = "master,nightly" w += workflow_pair( From 1e107a390feac09e1899dbddc9c801038568ece6 Mon Sep 17 00:00:00 2001 From: mattip Date: Thu, 10 Jun 2021 07:58:49 +0300 Subject: [PATCH 4/4] fixes from review --- .circleci/config.yml | 2 +- .circleci/regenerate.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b296e6c3d34..4b010636ac2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1026,7 +1026,7 @@ workflows: cu_version: cpu filters: branches: - only: master,nightly + only: '*' tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_linux_wheel_py3.7_cpu diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 162d3098279..e0809de7a50 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -49,8 +49,8 @@ def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6, cu_version == 'cpu' and btype == 'wheel' and python_version == '3.7'): - # this is for build_docs, the versions must match - fb = "master,nightly" + # the fields must match the build_docs "requires" dependency + fb = "*" w += workflow_pair( btype, os_type, python_version, cu_version, unicode, prefix, upload, filter_branch=fb)