Skip to content

Commit

Permalink
exclude clang18+debug from freestanding again
Browse files Browse the repository at this point in the history
  • Loading branch information
burnpanck committed Nov 12, 2024
1 parent 5713243 commit ff11878
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/generate-job-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ def main():

rgen = random.Random(args.seed)

collector = CombinationCollector(full_matrix)
collector = CombinationCollector(
full_matrix,
hard_excludes=lambda e: (
e.formatting == "std::format" and not e.config.std_format_support
),
)
match args.preset:
case None:
pass
Expand All @@ -143,7 +148,11 @@ def main():
case "clang-tidy":
collector.all_combinations(config=configs["Clang-18 (x86-64)"])
case "freestanding":
# TODO For some reason Clang-18 Debug with -ffreestanding does not pass CMakeTestCXXCompiler
collector.all_combinations(
filter=lambda e: not (
e.config.name.startswith("Clang-18") and e.build_type == "Debug"
),
config=[configs[c] for c in ["GCC-14", "Clang-18 (x86-64)"]],
contracts="none",
std=23,
Expand Down
10 changes: 8 additions & 2 deletions .github/job_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ def dataclass_to_json(obj):
class CombinationCollector:
"""Incremental builder of MatrixElements, allowing successive selection of entries."""

def __init__(self, full_matrix: dict[str, list[typing.Any]]):
def __init__(
self,
full_matrix: dict[str, list[typing.Any]],
*,
hard_excludes: typing.Callable[[MatrixElement], bool] | None = None,
):
self.full_matrix = full_matrix
self.hard_excludes = hard_excludes
self.combinations: set[MatrixElement] = set()
self.per_value_counts: dict[tuple[str, typing.Any], int] = {
(k, v): 0 for k, options in full_matrix.items() for v in options
Expand All @@ -72,7 +78,7 @@ def _make_submatrix(self, **overrides):

def _add_combination(self, e: MatrixElement):
if e in self.combinations or (
e.formatting == "std::format" and not e.config.std_format_support
self.hard_excludes is not None and self.hard_excludes(e)
):
return
self.combinations.add(e)
Expand Down

0 comments on commit ff11878

Please sign in to comment.