Skip to content

Commit 300a8a4

Browse files
authored
backport fixes to build/push docs on tags (#4060)
1 parent 9d5561b commit 300a8a4

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.circleci/config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,11 @@ workflows:
10111011
- binary_linux_wheel:
10121012
conda_docker_image: pytorch/conda-builder:cpu
10131013
cu_version: cpu
1014+
filters:
1015+
branches:
1016+
only: /.*/
1017+
tags:
1018+
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
10141019
name: binary_linux_wheel_py3.7_cpu
10151020
python_version: '3.7'
10161021
wheel_docker_image: pytorch/manylinux-cuda102
@@ -1409,6 +1414,12 @@ workflows:
14091414
name: binary_win_conda_py3.9_cu111
14101415
python_version: '3.9'
14111416
- build_docs:
1417+
filters:
1418+
branches:
1419+
only:
1420+
- /.*/
1421+
tags:
1422+
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
14121423
name: build_docs
14131424
python_version: '3.7'
14141425
requires:

.circleci/regenerate.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,19 @@ def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6,
4545
(python_version != python_versions[-1] or
4646
(cu_version not in [cu_versions[0], cu_versions[-1]])):
4747
fb = "master"
48+
if not fb and (os_type == 'linux' and
49+
cu_version == 'cpu' and
50+
btype == 'wheel' and
51+
python_version == '3.7'):
52+
# the fields must match the build_docs "requires" dependency
53+
fb = "/.*/"
4854
w += workflow_pair(
4955
btype, os_type, python_version, cu_version,
5056
unicode, prefix, upload, filter_branch=fb)
5157

5258
if not filter_branch:
5359
# Build on every pull request, but upload only on nightly and tags
54-
w += build_doc_job(None)
60+
w += build_doc_job('/.*/')
5561
w += upload_doc_job('nightly')
5662
return indent(indentation, w)
5763

@@ -83,7 +89,8 @@ def build_doc_job(filter_branch):
8389
}
8490

8591
if filter_branch:
86-
job["filters"] = gen_filter_branch_tree(filter_branch)
92+
job["filters"] = gen_filter_branch_tree(filter_branch,
93+
tags_list=RC_PATTERN)
8794
return [{"build_docs": job}]
8895

8996

0 commit comments

Comments
 (0)