From 972c832ec65b59fa170d38ebdce0ce9855357d88 Mon Sep 17 00:00:00 2001 From: nevaforget Date: Thu, 23 Apr 2026 12:51:20 +0200 Subject: [PATCH] ci(build): single-threaded low-priority makepkg to spare host Parallel Rust builds have OOM-killed the Gitea host twice (2026-04-20, 2026-04-23 run 86). Force CARGO_BUILD_JOBS=1, MAKEFLAGS=-j1, and wrap makepkg with nice+ionice so the act_runner can't drown the shared host. --- .gitea/workflows/build-and-publish.yaml | 10 +++++++++- DECISIONS.md | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml index 5aa2e01..7533997 100644 --- a/.gitea/workflows/build-and-publish.yaml +++ b/.gitea/workflows/build-and-publish.yaml @@ -52,7 +52,15 @@ jobs: # shellcheck disable=SC2086 sudo pacman -S --needed --noconfirm $MAKEDEPS fi - makepkg -sfd --noconfirm + + # Resource-constrained build. The act_runner shares CPU/RAM/I/O + # with the Gitea host (network-host mode). A parallel Rust build + # has OOM-killed the host: run 86 on 2026-04-23 stopped mid-compile + # with no error, taking gitea HTTPS down ~11 min. Force single-job + # compile and low CPU/IO priority so the host stays responsive. + export CARGO_BUILD_JOBS=1 + export MAKEFLAGS="-j1" + nice -n 19 ionice -c 3 makepkg -sfd --noconfirm # makepkg can emit multiple artifacts per build (main + -debug # split package). Upload each. Arch filename convention: diff --git a/DECISIONS.md b/DECISIONS.md index 308a359..75dc990 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -1,5 +1,11 @@ # Decisions +## 2026-04-23 – Single-threaded, low-priority build in CI to keep the Gitea host alive +- **Who**: Dominik, ClaudeCode +- **Why**: The act_runner container shares CPU/RAM/I/O with the Gitea host (network-host mode, no resource limits). Parallel Rust builds OOM-kill or thrash the host: run 86 (2026-04-23, moongreet-git 0.8.3.r1) stopped mid-compile at `Compiling gio v0.22.2` with no error, and gitea HTTPS was unreachable for ~11 min. Same pattern on 2026-04-20. Runner-side resource limits would be better, but require host-side config changes; a pipeline-side fix is portable and low-risk. +- **Tradeoffs**: Builds are slower — single-threaded cargo compile of a moon* project takes ~2–3× as long. `nice -n 19` + `ionice -c 3` further delay the build when the host is busy, but that's the point. Slow build beats downed host. +- **How**: `build-and-publish.yaml` exports `CARGO_BUILD_JOBS=1` and `MAKEFLAGS=-j1` before `makepkg`, and wraps `makepkg` with `nice -n 19 ionice -c 3`. Affects every package build in the matrix. + ## 2026-04-21 – moonarch-git becomes a full meta-package (hard deps on all Arch-repo essentials + own registry siblings) - **Who**: Dominik, ClaudeCode - **Why**: `moonarch-git` listed `moongreet-git`/`moonlock-git`/`moonset-git` only as `optdepends` and omitted most Arch-repo essentials (wlsunset, networkmanager, bluez, xwayland-satellite, file-manager stack, zsh plugins, CLI tools, …) entirely — they lived only in `packages/official.txt`. `paru -S moonarch-git` on a fresh system therefore produced a desktop with no greeter, no lockscreen, no power menu, no nightlight, no network manager, no portals — a non-functional Moonarch. Split source of truth between PKGBUILD deps and txt files caused continuous drift (e.g. walker-bin was missing from both).