bf65d264fd
apple / swift (push) Successful in 54s
ci / bench (push) Successful in 1m35s
ci / rust (push) Successful in 6m49s
android / android (push) Failing after 4m5s
ci / web (push) Successful in 26s
ci / docs-site (push) Successful in 26s
decky / build-publish (push) Successful in 29s
deb / build-publish (push) Failing after 2m33s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 16s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 2m40s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 2m32s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 2m17s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 21s
flatpak / build-publish (push) Failing after 4s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 5m27s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 5m28s
docker / deploy-docs (push) Successful in 20s
The self-hosted runner filled its disk (95%, builds failing on ENOSPC): every CI
push builds a sha-<commit>-tagged Docker image per pipeline, and since those tags
are never dangling a plain `docker image prune` skips them — they piled up to 589
images / ~85 GB plus 18 GB of build cache. Two parts:
- scripts/ci/docker-prune.{service,timer}: a host-level systemd timer (every 6h,
Persistent) that prunes images/build-cache/containers older than 24h — in-use
images stay protected. Checked in (the runner is hand-provisioned and shared
across orgs) and already installed live; reclaimed 89 GB -> 39 GB (95% -> 42%).
- ci.yml / deb.yml: bump the `cargo-target-<rustc>-*` cache key to `-v2-`. The
disk-full build let actions/cache save a truncated target/ (a dep's .rmeta went
missing -> "error[E0463]: can't find crate for pem_rfc7468" while compiling der).
A suffix bump is useless here — restore-keys would fall back to the poisoned
prefix — so the prefix is versioned to force one clean rebuild. cargo-home is
untouched (sources were intact; the failure was a missing build artifact).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
114 lines
4.7 KiB
YAML
114 lines
4.7 KiB
YAML
# Build the punktfunk-host and punktfunk-client .debs and publish them to Gitea's Debian
|
|
# package registry, so Ubuntu boxes get new builds via `apt update && apt upgrade`. Runs
|
|
# inside the same Ubuntu 26.04 rust-ci builder image as ci.yml, so dpkg-shlibdeps pins the
|
|
# runtime lib package names (libavcodec62, libpipewire-0.3-0t64, …) to exactly what the
|
|
# target boxes run.
|
|
#
|
|
# Registry (public, unom org): https://git.unom.io/unom/-/packages
|
|
# Box setup (once): see packaging/debian/README.md
|
|
#
|
|
# REGISTRY_TOKEN: repo Actions secret, a PAT with write:package scope (shared with docker.yml).
|
|
name: deb
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: git.unom.io
|
|
OWNER: unom
|
|
DISTRIBUTION: stable
|
|
COMPONENT: main
|
|
|
|
jobs:
|
|
build-publish:
|
|
runs-on: ubuntu-24.04
|
|
container:
|
|
image: git.unom.io/unom/punktfunk-rust-ci:latest
|
|
timeout-minutes: 90
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# dpkg-shlibdeps (Depends resolution) + dpkg-deb live in dpkg-dev. The client's link
|
|
# deps are also baked into the rust-ci image, but this job runs against the image
|
|
# from the PREVIOUS push (docker.yml bootstrap note) — keep it green across image
|
|
# changes; a no-op once the image has them.
|
|
- name: dpkg-dev + client link deps
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends dpkg-dev \
|
|
libgtk-4-dev libadwaita-1-dev libsdl3-dev
|
|
|
|
# Share ci.yml's cache keys so the release build reuses its registry + target artifacts.
|
|
- name: Cache keys
|
|
run: echo "rustc=$(rustc --version | cut -d' ' -f2)" >> "$GITHUB_ENV"
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
/usr/local/cargo/registry
|
|
/usr/local/cargo/git
|
|
key: cargo-home-${{ hashFiles('Cargo.lock') }}
|
|
restore-keys: cargo-home-
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: target
|
|
# -v2-: bypass a target cache poisoned by a disk-full build (see ci.yml). Shares the
|
|
# key with ci.yml so the release build reuses its clean artifacts.
|
|
key: cargo-target-v2-${{ env.rustc }}-${{ hashFiles('Cargo.lock') }}
|
|
restore-keys: cargo-target-v2-${{ env.rustc }}-
|
|
|
|
- name: Build release host + client
|
|
run: |
|
|
git config --global --add safe.directory "$PWD"
|
|
cargo build --release -p punktfunk-host -p punktfunk-client-linux --locked
|
|
|
|
- name: Build + smoke-boot web console (node-server preset)
|
|
# Gate the .deb on a real node boot: the punktfunk-web .deb runs `node .output/server`,
|
|
# so prove the node-server build exists, isn't a bun bundle, and actually serves /login.
|
|
run: |
|
|
cd web
|
|
bun install --frozen-lockfile
|
|
bun run build
|
|
if grep -q 'Bun\.serve' .output/server/index.mjs; then
|
|
echo "ERROR: web build is a bun bundle (Bun.serve) — need the node-server preset"; exit 1
|
|
fi
|
|
PORT=3009 HOST=127.0.0.1 PUNKTFUNK_UI_PASSWORD=ci node .output/server/index.mjs &
|
|
NP=$!; sleep 3
|
|
code=$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:3009/login || echo 000)
|
|
kill "$NP" 2>/dev/null || true
|
|
echo "web console smoke: /login -> $code"
|
|
[ "$code" = 200 ] || { echo "ERROR: web console failed to boot under node"; exit 1; }
|
|
|
|
- name: Version
|
|
# Tag v1.2.3 -> 1.2.3 (a real release); a main push -> 0.0.1~ciN.g<sha>, which sorts
|
|
# BEFORE 0.0.1 (the '~') yet monotonically increases by run number, so `apt upgrade`
|
|
# always moves the boxes to the newest main build.
|
|
run: |
|
|
SHORT=$(echo "$GITHUB_SHA" | cut -c1-8)
|
|
case "$GITHUB_REF" in
|
|
refs/tags/v*) V="${GITHUB_REF_NAME#v}" ;;
|
|
*) V="0.0.1~ci${GITHUB_RUN_NUMBER}.g${SHORT}" ;;
|
|
esac
|
|
echo "VERSION=$V" >> "$GITHUB_ENV"
|
|
echo "package version $V"
|
|
|
|
- name: Build .debs
|
|
run: |
|
|
VERSION="$VERSION" bash packaging/debian/build-deb.sh
|
|
VERSION="$VERSION" bash packaging/debian/build-client-deb.sh
|
|
VERSION="$VERSION" bash packaging/debian/build-web-deb.sh
|
|
|
|
- name: Publish to the Gitea apt registry
|
|
env:
|
|
TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
run: |
|
|
for DEB in dist/*.deb; do
|
|
echo "uploading $DEB"
|
|
# PAT owner (enricobuehler), not the push actor — matches docker.yml's registry login.
|
|
curl -fsS --user "enricobuehler:$TOKEN" --upload-file "$DEB" \
|
|
"https://$REGISTRY/api/packages/$OWNER/debian/pool/$DISTRIBUTION/$COMPONENT/upload"
|
|
done
|
|
echo "published to $OWNER/debian $DISTRIBUTION/$COMPONENT"
|