Skip to content

reuse the generate binary builds from test-infra #3515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/scripts/filter-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import argparse
import json
import os
import sys
from typing import List

# this was introduced to avoid build for py3.13, currently we support py3.13, but keep this for future use with other python versions
disabled_python_versions: List[str] = []


Expand All @@ -17,15 +19,34 @@ def main(args: list[str]) -> None:
default="",
)

parser.add_argument(
"--limit-pr-builds",
help="Limit PR builds to single python/cuda config(py3.11/cu12.8): true or false",
type=str,
choices=["true", "false"],
default=os.getenv("LIMIT_PR_BUILDS", "false"),
)

options = parser.parse_args(args)

if options.matrix == "":
raise Exception("--matrix needs to be provided")

matrix_dict = json.loads(options.matrix)
includes = matrix_dict["include"]
filtered_includes = []
for item in includes:
if item["python_version"] not in disabled_python_versions:
if item["python_version"] in disabled_python_versions:
continue
if options.limit_pr_builds == "true":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that instead of by default not testing multiple cuda we might want to think about testing phases to catch meaningful errors early #3501

# currently if it is the pr build, it build using py3.9 with all cuda versions, we want to change to py3.11 with singlecu12.8
if item["desired_cuda"] == "cu128":
item["python_version"] = "3.11"
build_names = item["build_name"].split("-")
build_names[1] = "py3_11"
item["build_name"] = "-".join(build_names)
filtered_includes.append(item)
else:
filtered_includes.append(item)
filtered_matrix_dict = {}
filtered_matrix_dict["include"] = filtered_includes
Expand Down
Loading
Loading