name: Build Slint (self-hosted) # Builds qbz-slint on the self-hosted runner registered on the dev box # (`qbz-box`, labels: self-hosted,linux,x64,qbz-builder). The box CAN compile # qbz-slint (proven locally), so this is the reliable path to a real CI/CD # artifact while the GitHub-hosted private runner (2 vCPU / 8 GB) cannot. # # Self-hosted runners keep their work directory between runs, so `target/` # persists → builds are INCREMENTAL after the first (no `actions/cache` needed). # # MANUAL trigger only (workflow_dispatch): the box shares RAM with the desktop # and earlyoom will SIGTERM the build if RAM runs low. Trigger this when the box # is free (close heavy apps / TTY), and do NOT run a local build at the same # time (one heavy build at a time — the box hard-freezes on double-build OOM). on: workflow_dispatch: concurrency: group: selfhosted-slint cancel-in-progress: true jobs: build: runs-on: [self-hosted, qbz-builder] timeout-minutes: 180 steps: - uses: actions/checkout@v7 - name: Free RAM check (earlyoom will kill the build if too low) run: | free -h | head -2 avail=$(free -m | awk '/^Mem:/ {print $7}') echo "MemAvailable: ${avail} MB" if [ "${avail}" -lt 16000 ]; then echo "::warning::Only ${avail} MB free — earlyoom may SIGTERM the qbz-slint rustc. Close apps / drop to TTY for headroom." fi # Desktop-proof recipe, root-caused 2026-07-04 (ftrace): earlyoom's # RAM-only trigger SIGTERM'd rustc whenever global MemAvailable dipped # to ~3 GB — the cap margin, not the settings, was the bug. With # slint-run.sh anchoring memory.high at avail-9G, this exact recipe # (threads=2, cgu=256, opt=3, capped) completed with a 5.7 GB global # floor and zero signals while the desktop ran. Same flags as the # distribution profile → the runner cache stays warm between runs. - name: Build qbz-slint (desktop-proof — capped, threads=2, opt-3) run: NORUN=1 CAPPED=1 THREADS=2 CODEGEN_UNITS=256 OPT=3 ./scripts/slint-run.sh - name: Strip + report size run: | BIN=crates/target/release/qbz echo "unstripped:"; ls -lh "$BIN" | awk '{print $5}' cp "$BIN" qbz-linux-x86_64 strip qbz-linux-x86_64 || true echo "stripped:"; ls -lh qbz-linux-x86_64 | awk '{print $5}' - uses: actions/upload-artifact@v7 with: name: qbz-linux-x86_64 path: qbz-linux-x86_64 if-no-files-found: error