|
60 | 60 | env = { |
61 | 61 | "ci": {"board": pio_env, "platform": env_platform}, |
62 | 62 | "board_level": board_level, |
63 | | - "board_check": cfg.get(f"env:{pio_env}", "board_check", default="false").strip().lower() == "true", |
64 | 63 | } |
65 | 64 | all_envs.append(env) |
66 | 65 |
|
67 | | -# Filter outputs based on options |
68 | | -# Check is mutually exclusive with other options (except 'pr') |
69 | | -if "check" in args.platform: |
70 | | - for env in all_envs: |
71 | | - if env["board_check"]: |
72 | | - # '--level pr' narrows to the PR subset; otherwise check every level |
73 | | - if "pr" not in args.level or env["board_level"] == "pr": |
74 | | - outlist.append(env["ci"]) |
75 | | -# Filter (non-check) builds by platform |
76 | | -else: |
77 | | - for env in all_envs: |
78 | | - if args.platform == env["ci"]["platform"] or args.platform == "all": |
79 | | - # Always include board_level = 'pr' |
80 | | - if env["board_level"] == "pr": |
81 | | - outlist.append(env["ci"]) |
82 | | - # Include board_level = 'extra' when requested |
83 | | - elif "extra" in args.level and env["board_level"] == "extra": |
84 | | - outlist.append(env["ci"]) |
85 | | - # Include board_level = 'release' unless narrowed to the PR subset |
86 | | - elif "pr" not in args.level and env["board_level"] == "release": |
87 | | - outlist.append(env["ci"]) |
| 66 | +# Filter builds by platform |
| 67 | +for env in all_envs: |
| 68 | + if args.platform == env["ci"]["platform"] or args.platform == "all": |
| 69 | + # Always include board_level = 'pr' |
| 70 | + if env["board_level"] == "pr": |
| 71 | + outlist.append(env["ci"]) |
| 72 | + # Include board_level = 'extra' when requested |
| 73 | + elif "extra" in args.level and env["board_level"] == "extra": |
| 74 | + outlist.append(env["ci"]) |
| 75 | + # Include board_level = 'release' unless narrowed to the PR subset |
| 76 | + elif "pr" not in args.level and env["board_level"] == "release": |
| 77 | + outlist.append(env["ci"]) |
88 | 78 |
|
89 | 79 | # Return as a JSON list |
90 | 80 | print(json.dumps(outlist)) |
0 commit comments