FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Optimize CI cache usage by fanninpm · Pull Request #6707 · RustPython/RustPython · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .yaml  (1) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 8 additions & 2 deletions .github/workflows/ci.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,14 @@ jobs:
run: |
target/release/rustpython -m venv testvenv
testvenv/bin/rustpython -m pip install wheel
- name: Check whats_left is not broken
run: python -I scripts/whats_left.py
- if: runner.os != 'macOS'
name: Check whats_left is not broken
shell: bash
run: python -I scripts/whats_left.py --no-default-features --features "$(sed -e 's/--[^ ]*//g' <<< "${{ env.CARGO_ARGS }}" | tr -d '[:space:]'),threading,jit"
- if: runner.os == 'macOS' # TODO fix jit on macOS
name: Check whats_left is not broken (macOS)
shell: bash
run: python -I scripts/whats_left.py --no-default-features --features "$(sed -e 's/--[^ ]*//g' <<< "${{ env.CARGO_ARGS }}" | tr -d '[:space:]'),threading" # no jit on macOS for now

lint:
name: Check Rust code with clippy
Expand Down
33 changes: 21 additions & 12 deletions scripts/whats_left.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ def parse_args():
action="store_true",
help="print output as JSON (instead of line by line)",
)
parser.add_argument(
"--no-default-features",
action="store_true",
help="disable default features when building RustPython",
)
parser.add_argument(
"--features",
action="store",
Expand Down Expand Up @@ -441,19 +446,23 @@ def remove_one_indent(s):
f.write(output + "\n")


subprocess.run(
["cargo", "build", "--release", f"--features={args.features}"], check=True
)
cargo_build_command = ["cargo", "build", "--release"]
if args.no_default_features:
cargo_build_command.append("--no-default-features")
if args.features:
cargo_build_command.extend(["--features", args.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(["-q", "--", GENERATED_FILE])

result = subprocess.run(
[
"cargo",
"run",
"--release",
f"--features={args.features}",
"-q",
"--",
GENERATED_FILE,
],
cargo_run_command,
env={**os.environ.copy(), "RUSTPYTHONPATH": "Lib"},
text=True,
capture_output=True,
Expand Down
Loading

Back | FazBrowse Home | New Git URL