ci: self-hosted runner workflow for qbz-slint (real artifact path)

The GitHub-hosted private runner is 2 vCPU/8 GB and cannot build qbz-slint
(died at 1h42m). The dev box CAN, so a self-hosted runner (qbz-box) gives a
reliable CI artifact. Manual trigger; uncapped threads=2 (box-proven);
persistent work dir = incremental after first build.

cc
This commit is contained in:
vicrodh committed 2026-06-25 13:32:06 -06:00
1 parent a4371f294b
commit b9eb300516
1 file changed
+54
@@ -0,0 +1,54 @@
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@v4
- 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
- name: Build qbz-slint (box-proven settings — uncapped, threads=2)
run: NORUN=1 CAPPED=0 THREADS=2 ./scripts/slint-run.sh
- name: Strip + report size
run: |
BIN=crates/target/release/qbz-slint
echo "unstripped:"; ls -lh "$BIN" | awk '{print $5}'
cp "$BIN" qbz-slint-linux-x86_64
strip qbz-slint-linux-x86_64 || true
echo "stripped:"; ls -lh qbz-slint-linux-x86_64 | awk '{print $5}'
- uses: actions/upload-artifact@v4
with:
name: qbz-slint-linux-x86_64
path: qbz-slint-linux-x86_64
if-no-files-found: error