From 80c05b582e77b3739a2bc6c648d0e519a97698bf Mon Sep 17 00:00:00 2001 From: Oleks Date: Wed, 29 Apr 2026 11:44:50 +0300 Subject: [PATCH] ci: make env probes non-fatal, swap free for /proc/meminfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pipeline #41 died with exit 127 on `free -h` — procps isn't in the nix-ci image. New info() helper runs the command and ignores the exit code, so missing tools no longer abort the build. Also switched to /proc/meminfo since it's always available on Linux. --- ci/build.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ci/build.py b/ci/build.py index 624fd1a..f34834d 100644 --- a/ci/build.py +++ b/ci/build.py @@ -13,6 +13,12 @@ def run(cmd): sys.exit(r.returncode) +def info(cmd): + """Like run(), but tolerant of failure — for non-load-bearing diagnostics.""" + print(f"+ {cmd}", flush=True) + subprocess.run(cmd, shell=True) + + def build(cmd): """Run a `nix build`, streaming stderr live; return stdout (the out path).""" print(f"+ {cmd}", flush=True) @@ -31,10 +37,10 @@ ATTIC_TOKEN = os.environ["ATTIC_TOKEN"] print(f"=== Building flake-hub packages for {ARCH} ===") # Environment context for log readers -run("nix --version") -run("uname -a") -run("df -h /nix 2>/dev/null || df -h /") -run("free -h") +info("nix --version") +info("uname -a") +info("df -h /nix 2>/dev/null || df -h /") +info("cat /proc/meminfo | head -3") # Setup attic attic = (