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: ...@@ -1267,58 +1267,16 @@ workflows:
cuda_version: cpu cuda_version: cpu
name: unittest_windows_cpu_py3.7 name: unittest_windows_cpu_py3.7
python_version: '3.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: - unittest_windows_gpu:
cuda_version: cu113 cuda_version: cu113
name: unittest_windows_gpu_py3.7 name: unittest_windows_gpu_py3.7
python_version: '3.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: - unittest_macos_cpu:
cuda_version: cpu cuda_version: cpu
name: unittest_macos_cpu_py3.7 name: unittest_macos_cpu_py3.7
python_version: '3.7' python_version: '3.7'
requires: requires:
- download_third_parties_nix - 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: nightly:
jobs: jobs:
- circleci_consistency: - circleci_consistency:
......
...@@ -210,6 +210,14 @@ def indent(indentation, data_list): ...@@ -210,6 +210,14 @@ def indent(indentation, data_list):
return ("\n" + " " * indentation).join(yaml.dump(data_list).splitlines()) 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): def unittest_workflows(indentation=6):
jobs = [] jobs = []
jobs += build_download_job(None) jobs += build_download_job(None)
...@@ -218,7 +226,7 @@ def unittest_workflows(indentation=6): ...@@ -218,7 +226,7 @@ def unittest_workflows(indentation=6):
if os_type == "macos" and device_type == "gpu": if os_type == "macos" and device_type == "gpu":
continue continue
for i, python_version in enumerate(PYTHON_VERSIONS): for i, python_version in enumerate(unittest_python_versions(os_type)):
job = { job = {
"name": f"unittest_{os_type}_{device_type}_py{python_version}", "name": f"unittest_{os_type}_{device_type}_py{python_version}",
"python_version": 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