mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-03 16:57:14 +08:00
nix-eval-job: disable eval-cache
in ci, there is no cache, so it's just overhead and prints warnings.
This commit is contained in:
12
tests/run.py
12
tests/run.py
@@ -69,8 +69,8 @@ def run_eval_test(gcroot_dir: Path, jobs: int) -> list[str]:
|
|||||||
failed_profiles = []
|
failed_profiles = []
|
||||||
cmd = [
|
cmd = [
|
||||||
"nix-eval-jobs",
|
"nix-eval-jobs",
|
||||||
"--extra-experimental-features",
|
"--extra-experimental-features", "flakes",
|
||||||
"flakes",
|
"--option", "eval-cache", "false",
|
||||||
"--gc-roots-dir",
|
"--gc-roots-dir",
|
||||||
str(gcroot_dir),
|
str(gcroot_dir),
|
||||||
"--max-memory-size",
|
"--max-memory-size",
|
||||||
@@ -97,11 +97,11 @@ def run_eval_test(gcroot_dir: Path, jobs: int) -> list[str]:
|
|||||||
failed_profiles.append(attr)
|
failed_profiles.append(attr)
|
||||||
error_msg = data['error']
|
error_msg = data['error']
|
||||||
formatted_error = format_nix_error(error_msg)
|
formatted_error = format_nix_error(error_msg)
|
||||||
|
|
||||||
# Output for terminal
|
# Output for terminal
|
||||||
print(f"{RED}FAIL {attr}:{RESET}", file=sys.stderr)
|
print(f"{RED}FAIL {attr}:{RESET}", file=sys.stderr)
|
||||||
print(f"{RED}{error_msg}{RESET}", file=sys.stderr)
|
print(f"{RED}{error_msg}{RESET}", file=sys.stderr)
|
||||||
|
|
||||||
# Output for GitHub Actions
|
# Output for GitHub Actions
|
||||||
if is_github_actions():
|
if is_github_actions():
|
||||||
github_error(
|
github_error(
|
||||||
@@ -127,14 +127,14 @@ def main() -> None:
|
|||||||
print(f"\n{RED}{failure_msg}{RESET}")
|
print(f"\n{RED}{failure_msg}{RESET}")
|
||||||
for profile in failed_profiles:
|
for profile in failed_profiles:
|
||||||
print(f" '{profile}'")
|
print(f" '{profile}'")
|
||||||
|
|
||||||
# GitHub Actions summary
|
# GitHub Actions summary
|
||||||
if is_github_actions():
|
if is_github_actions():
|
||||||
github_error(
|
github_error(
|
||||||
f"{failure_msg} {', '.join(failed_profiles)}",
|
f"{failure_msg} {', '.join(failed_profiles)}",
|
||||||
title="Hardware Profile Tests Failed"
|
title="Hardware Profile Tests Failed"
|
||||||
)
|
)
|
||||||
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user