Commit 8c1db721 authored by Eli Uriegas's avatar Eli Uriegas Committed by Facebook GitHub Bot
Browse files

ci: Limit scope of unittest to one python version (#2256)

Summary:
Pull Request resolved: https://github.com/pytorch/audio/pull/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: default avatarEli Uriegas <eliuriegas@fb.com>

Test Plan: Imported from OSS

Reviewed By: mthrok

Differential Revision: D34459626

Pulled By: seemethere

fbshipit-source-id: 47f5c317027f1b395edf9c1720b1b33ba689cad5
parent 86fe4fa7
......@@ -1267,58 +1267,16 @@ workflows:
cuda_version: cpu
name: unittest_windows_cpu_py3.7
python_version: '3.7'
- unittest_windows_cpu:
cuda_version: cpu
name: unittest_windows_cpu_py3.8
python_version: '3.8'
- unittest_windows_cpu:
cuda_version: cpu
name: unittest_windows_cpu_py3.9
python_version: '3.9'
- unittest_windows_cpu:
cuda_version: cpu
name: unittest_windows_cpu_py3.10
python_version: '3.10'
- unittest_windows_gpu:
cuda_version: cu113
name: unittest_windows_gpu_py3.7
python_version: '3.7'
- unittest_windows_gpu:
cuda_version: cu113
name: unittest_windows_gpu_py3.8
python_version: '3.8'
- unittest_windows_gpu:
cuda_version: cu113
name: unittest_windows_gpu_py3.9
python_version: '3.9'
- unittest_windows_gpu:
cuda_version: cu113
name: unittest_windows_gpu_py3.10
python_version: '3.10'
- unittest_macos_cpu:
cuda_version: cpu
name: unittest_macos_cpu_py3.7
python_version: '3.7'
requires:
- download_third_parties_nix
- unittest_macos_cpu:
cuda_version: cpu
name: unittest_macos_cpu_py3.8
python_version: '3.8'
requires:
- download_third_parties_nix
- unittest_macos_cpu:
cuda_version: cpu
name: unittest_macos_cpu_py3.9
python_version: '3.9'
requires:
- download_third_parties_nix
- unittest_macos_cpu:
cuda_version: cpu
name: unittest_macos_cpu_py3.10
python_version: '3.10'
requires:
- download_third_parties_nix
nightly:
jobs:
- circleci_consistency:
......
......@@ -210,6 +210,14 @@ def indent(indentation, data_list):
return ("\n" + " " * indentation).join(yaml.dump(data_list).splitlines())
def unittest_python_versions(os):
return {
"windows": PYTHON_VERSIONS[:1],
"macos": PYTHON_VERSIONS[:1],
"linux": PYTHON_VERSIONS,
}.get(os)
def unittest_workflows(indentation=6):
jobs = []
jobs += build_download_job(None)
......@@ -218,7 +226,7 @@ def unittest_workflows(indentation=6):
if os_type == "macos" and device_type == "gpu":
continue
for i, python_version in enumerate(PYTHON_VERSIONS):
for i, python_version in enumerate(unittest_python_versions(os_type)):
job = {
"name": f"unittest_{os_type}_{device_type}_py{python_version}",
"python_version": python_version,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment