Skip to content
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

ci: fix build matrix #5664

Merged
merged 1 commit into from
Aug 18, 2023
Merged
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
16 changes: 10 additions & 6 deletions .github/scripts/matrices.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

import json
import os

Expand Down Expand Up @@ -88,12 +90,10 @@ def __init__(self, os: str, target: str, name: str, flags: str, partition: int):


def build_matrix():
os_ids = []
targets_ = []
expanded = []
for target in targets:
os_ids.append(target.os_id)
targets_.append(target.target)
print(json.dumps({"os": os_ids, "target": targets_}))
expanded.append({"os": target.os_id, "target": target.target})
print_json({"include": expanded})


def test_matrix():
Expand Down Expand Up @@ -125,7 +125,11 @@ def test_matrix():
)
expanded.append(vars(obj))

print(json.dumps({"include": expanded}), end="", flush=True)
print_json({"include": expanded})


def print_json(obj):
print(json.dumps(obj), end="", flush=True)


if __name__ == "__main__":
Expand Down
Loading