Skip to content

Commit c3774b6

Browse files
seemetherexiaohui-zhang
authored andcommitted
ci: Limit scope of unittest to one python version (pytorch#2256)
Summary: Pull Request resolved: pytorch#2256 Limits scope of unittesting to one python version for both macOS and Windows. These types of workflows are particularly expensive and take a long time so running them on every PR / every push is a bit wasteful considering the value in signal between different python versions is probably negligible. Signed-off-by: Eli Uriegas <[email protected]> Test Plan: Imported from OSS Reviewed By: mthrok Differential Revision: D34459626 Pulled By: seemethere fbshipit-source-id: 47f5c317027f1b395edf9c1720b1b33ba689cad5
1 parent 6fc2603 commit c3774b6

File tree

2 files changed

+9
-43
lines changed

2 files changed

+9
-43
lines changed

.circleci/config.yml

Lines changed: 0 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/regenerate.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,14 @@ def indent(indentation, data_list):
210210
return ("\n" + " " * indentation).join(yaml.dump(data_list).splitlines())
211211

212212

213+
def unittest_python_versions(os):
214+
return {
215+
"windows": PYTHON_VERSIONS[:1],
216+
"macos": PYTHON_VERSIONS[:1],
217+
"linux": PYTHON_VERSIONS,
218+
}.get(os)
219+
220+
213221
def unittest_workflows(indentation=6):
214222
jobs = []
215223
jobs += build_download_job(None)
@@ -218,7 +226,7 @@ def unittest_workflows(indentation=6):
218226
if os_type == "macos" and device_type == "gpu":
219227
continue
220228

221-
for i, python_version in enumerate(PYTHON_VERSIONS):
229+
for i, python_version in enumerate(unittest_python_versions(os_type)):
222230
job = {
223231
"name": f"unittest_{os_type}_{device_type}_py{python_version}",
224232
"python_version": python_version,

0 commit comments

Comments
 (0)