From ce785c44f6fd586fefb3ba84cc8f4737ad1d3898 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Thu, 24 Feb 2022 13:26:48 -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 --- .circleci/config.yml | 46 ----------------------------------------- .circleci/regenerate.py | 10 ++++++++- 2 files changed, 9 insertions(+), 47 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b616f3bde93..7ef13b912fe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1658,18 +1658,6 @@ workflows: cu_version: cpu name: unittest_windows_cpu_py3.7 python_version: '3.7' - - unittest_windows_cpu: - cu_version: cpu - name: unittest_windows_cpu_py3.8 - python_version: '3.8' - - unittest_windows_cpu: - cu_version: cpu - name: unittest_windows_cpu_py3.9 - python_version: '3.9' - - unittest_windows_cpu: - cu_version: cpu - name: unittest_windows_cpu_py3.10 - python_version: '3.10' - unittest_windows_gpu: cu_version: cu102 filters: @@ -1679,44 +1667,10 @@ workflows: - nightly name: unittest_windows_gpu_py3.7 python_version: '3.7' - - unittest_windows_gpu: - cu_version: cu102 - name: unittest_windows_gpu_py3.8 - python_version: '3.8' - - unittest_windows_gpu: - cu_version: cu102 - filters: - branches: - only: - - main - - nightly - name: unittest_windows_gpu_py3.9 - python_version: '3.9' - - unittest_windows_gpu: - cu_version: cu102 - filters: - branches: - only: - - main - - nightly - name: unittest_windows_gpu_py3.10 - python_version: '3.10' - unittest_macos_cpu: cu_version: cpu name: unittest_macos_cpu_py3.7 python_version: '3.7' - - unittest_macos_cpu: - cu_version: cpu - name: unittest_macos_cpu_py3.8 - python_version: '3.8' - - unittest_macos_cpu: - cu_version: cpu - name: unittest_macos_cpu_py3.9 - python_version: '3.9' - - unittest_macos_cpu: - cu_version: cpu - name: unittest_macos_cpu_py3.10 - python_version: '3.10' cmake: jobs: diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index b860d71f14d..58827778eda 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -236,13 +236,21 @@ def indent(indentation, data_list): return ("\n" + " " * indentation).join(yaml.dump(data_list, default_flow_style=False).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 = [] for os_type in ["linux", "windows", "macos"]: for device_type in ["cpu", "gpu"]: 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 bc12c3623528e0a9851bd3d4c81a82fab75ae0e3 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Thu, 24 Feb 2022 16:39:15 -0800 Subject: [PATCH 2/2] set filtering only for linux jobs Signed-off-by: Eli Uriegas --- .circleci/config.yml | 5 ----- .circleci/regenerate.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ef13b912fe..95a2baaa8fa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1660,11 +1660,6 @@ workflows: python_version: '3.7' - unittest_windows_gpu: cu_version: cu102 - filters: - branches: - only: - - main - - nightly name: unittest_windows_gpu_py3.7 python_version: '3.7' - unittest_macos_cpu: diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 58827778eda..8f674ec0630 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -257,7 +257,7 @@ def unittest_workflows(indentation=6): } if device_type == "gpu": - if python_version != "3.8": + if os_type != "windows" and python_version != "3.8": job["filters"] = gen_filter_branch_tree("main", "nightly") job["cu_version"] = "cu102" else: