mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
CI: Trim cache before saving
This commit is contained in:
parent
701505eb4f
commit
de33bd2b7c
11 changed files with 71 additions and 63 deletions
|
@ -897,11 +897,9 @@ def prepare_cache(env) -> None:
|
|||
# Convert GiB to bytes; treat negative numbers as 0 (unlimited).
|
||||
cache_limit = max(0, int(cache_limit * 1024 * 1024 * 1024))
|
||||
if env["verbose"]:
|
||||
print(
|
||||
"Current cache limit is {} (used: {})".format(
|
||||
convert_size(cache_limit) if cache_limit else "∞",
|
||||
convert_size(get_size(cache_path)),
|
||||
)
|
||||
print_info(
|
||||
f"Current cache size is {convert_size(get_size(cache_path))}"
|
||||
+ (f" (limit: {convert_size(cache_limit)})" if cache_limit else "")
|
||||
)
|
||||
|
||||
atexit.register(clean_cache, cache_path, cache_limit, env["verbose"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue