Restructure CI with matrix approach and multi-feature support (#7376)

* `--features` flag can take multiple values

* Simplify CI job

* Remove bad default

* Enable jit on macOS
This commit is contained in:
Shahar Naveh authored and GitHub committed 2026-03-07 20:28:26 +09:00
1 parent d9020c5841
commit ab32c785ea
2 files changed
+20 -21

No files matched your search

+9 -5
View File
@@ -67,9 +67,9 @@ def parse_args():
)
parser.add_argument(
"--features",
action="store",
help="which features to enable when building RustPython (default: ssl)",
default="ssl",
action="append",
help="which features to enable when building RustPython (default: [])",
default=[],
)
args = parser.parse_args()
@@ -449,16 +449,20 @@ with open(GENERATED_FILE, "w", encoding="utf-8") as f:
cargo_build_command = ["cargo", "build", "--release"]
if args.no_default_features:
cargo_build_command.append("--no-default-features")
joined_features = ",".join(args.features)
if args.features:
cargo_build_command.extend(["--features", args.features])
cargo_build_command.extend(["--features", joined_features])
subprocess.run(cargo_build_command, check=True)
cargo_run_command = ["cargo", "run", "--release"]
if args.no_default_features:
cargo_run_command.append("--no-default-features")
if args.features:
cargo_run_command.extend(["--features", args.features])
cargo_run_command.extend(["--features", joined_features])
cargo_run_command.extend(["-q", "--", GENERATED_FILE])
result = subprocess.run(