Skip to content

Commit

Permalink
Fix matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
yut23 committed Dec 3, 2023
1 parent 1dfc953 commit 63964d2
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/gen_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
from pathlib import Path

includes: list[dict[str, str]] = []


def add_config(**kwargs: str) -> None:
includes.append({"compiler": "g++", **kwargs})
includes.append({"compiler": "clang++", **kwargs})


changed_files = json.loads(sys.argv[1])
for file in changed_files:
path = Path(file)
print(path, file=sys.stderr)

includes.append({"dir": "2023", "target": "day01"})
includes.append({"dir": "2023", "target": "day02"})
includes.append({"dir": "2023", "target": "day03"})
includes.append({"dir": "2022", "target": "day19"})
add_config(dir="2023", target="day01")
add_config(dir="2023", target="day02")
add_config(dir="2023", target="day03")
add_config(dir="2022", target="day19")

matrix = {
# "compiler": ["clang++", "g++"],
}
print("matrix-combinations=" + json.dumps({**matrix, "include": includes}))
print("matrix-combinations=" + json.dumps({"include": includes}))

0 comments on commit 63964d2

Please sign in to comment.