From dca3e14791bb271fa0b9c0a9efb4c61190ff0e4d Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Thu, 24 Feb 2022 11:19:15 -0800 Subject: [PATCH 1/2] ci: Limit scope of unittest to one python version 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 [ghstack-poisoned] --- .circleci/config.yml | 42 ----------------------------------------- .circleci/regenerate.py | 9 ++++++++- 2 files changed, 8 insertions(+), 43 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 587174d725..49a9bd7016 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1323,58 +1323,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: diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index e25cb5b7c3..f33ba01f6d 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -210,6 +210,13 @@ 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 +225,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, From e8e29f93f65907ff64f3eafc23c2b87aca476585 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Thu, 24 Feb 2022 11:22:35 -0800 Subject: [PATCH 2/2] Update on "ci: Limit scope of unittest to one python version" 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 [ghstack-poisoned] --- .circleci/regenerate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index f33ba01f6d..86ed669fb5 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -217,6 +217,7 @@ def unittest_python_versions(os): "linux": PYTHON_VERSIONS, }.get(os) + def unittest_workflows(indentation=6): jobs = [] jobs += build_download_job(None)