84329205eb
ci / docs-site (push) Successful in 59s
ci / web (push) Successful in 1m7s
decky / build-publish (push) Successful in 18s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 8s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 8s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 8s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 44s
apple / swift (push) Successful in 4m13s
ci / bench (push) Successful in 7m13s
windows-host / package (push) Successful in 9m43s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 9m26s
docker / deploy-docs (push) Successful in 28s
android / android (push) Successful in 12m35s
deb / build-publish (push) Successful in 12m46s
arch / build-publish (push) Successful in 16m31s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Successful in 19m32s
apple / screenshots (push) Successful in 18m49s
ci / rust (push) Successful in 25m10s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Successful in 18m0s
On-glass validated 2026-07-12 on an AMD RADV 780M with a real Deck-class client: the pipelined raw-Vulkan HEVC encoder ran a rock-solid 1080p@240 session and healed loss with clean P-frame recovery anchors (real RFI the libav VAAPI path can't express). Ship it on by default, mirroring the NVENC default-on. - vulkan_encode_enabled() defaults ON; PUNKTFUNK_VULKAN_ENCODE=0 is the libav VAAPI escape hatch. A failed open still falls back to VAAPI, so a device without h265 Vulkan encode (or an untested Intel/ANV that misbehaves at open) degrades gracefully instead of breaking the stream. - Ring depth defaults to 2 (one frame of overlap, lowest added latency — the on-glass-validated real-time setting); PUNKTFUNK_VULKAN_INFLIGHT still tunes it. - Compile --features punktfunk-host/vulkan-encode into the arch/deb/rpm host builds (pure-Rust ash, no new lib / no link-time dep), alongside nvenc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
169 lines
8.8 KiB
YAML
169 lines
8.8 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]
|
|
# Single project version: a `vX.Y.Z` tag is THE release for every platform (see
|
|
# docs-site channels.md). The old version-shadow (a client tag shipping a host package
|
|
# that outranked rolling builds) is now structurally impossible — main publishes to the
|
|
# `canary` apt distribution, tags to `stable`, so the two never share a version line.
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: git.unom.io
|
|
OWNER: unom
|
|
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
|
|
|
|
- name: Version + channel
|
|
# vX.Y.Z tag -> X.Y.Z, published to the `stable` apt distribution (a real release).
|
|
# A main push -> <next-minor>~ciN.g<sha>, published to the `canary` distribution: the '~' sorts
|
|
# below the eventual tag, it climbs monotonically by run number, and the canary base is
|
|
# derived one minor AHEAD of the latest stable tag (scripts/ci/pf-version.sh) so a
|
|
# stable->canary box re-point still moves forward (see channels.md). Computed BEFORE the build so it's stamped into the binary
|
|
# (PUNKTFUNK_BUILD_VERSION -> build.rs -> --version).
|
|
run: |
|
|
eval "$(bash scripts/ci/pf-version.sh)" # -> PF_BASE (one minor ahead of the latest stable tag)
|
|
SHORT=$(echo "$GITHUB_SHA" | cut -c1-8)
|
|
case "$GITHUB_REF" in
|
|
refs/tags/v*) V="${GITHUB_REF_NAME#v}"; DIST=stable ;;
|
|
*) V="${PF_BASE}~ci${GITHUB_RUN_NUMBER}.g${SHORT}"; DIST=canary ;;
|
|
esac
|
|
echo "VERSION=$V" >> "$GITHUB_ENV"
|
|
echo "DISTRIBUTION=$DIST" >> "$GITHUB_ENV"
|
|
echo "package version $V -> apt distribution '$DIST'"
|
|
|
|
# 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
|
|
# python3 is used by scripts/ci/gitea-release.sh for the stable-tag release attach.
|
|
# libvulkan-dev: /usr/include/vulkan/vulkan.h for the client's pf-ffvk bindgen
|
|
# (FFmpeg's hwcontext_vulkan.h includes it).
|
|
apt-get install -y --no-install-recommends dpkg-dev python3 \
|
|
libgtk-4-dev libadwaita-1-dev libsdl3-dev libvulkan-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
|
|
# -v3-: 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-v3-${{ env.rustc }}-${{ hashFiles('Cargo.lock') }}
|
|
restore-keys: cargo-target-v3-${{ env.rustc }}-
|
|
|
|
- name: Build release host + client
|
|
env:
|
|
PUNKTFUNK_BUILD_VERSION: ${{ env.VERSION }} # stamped into the binary (build.rs)
|
|
run: |
|
|
git config --global --add safe.directory "$PWD"
|
|
# punktfunk-client-session is the Vulkan/Skia streamer the shell execs for a connect —
|
|
# both client binaries must ship (build-client-deb.sh installs both).
|
|
# --features punktfunk-host/nvenc: the direct-SDK NVENC path (real RFI + recovery anchor on
|
|
# Linux NVIDIA; design/linux-direct-nvenc.md). AMD/Intel-safe — NVENC/CUDA is dlopen'd at
|
|
# runtime (no link-time dep; identical DT_NEEDED to a plain build), and the encoder is only
|
|
# constructed for a CUDA capture frame + PUNKTFUNK_NVENC_DIRECT, never on VAAPI hosts.
|
|
# --features punktfunk-host/vulkan-encode: the AMD/Intel twin — raw VK_KHR_video_encode_h265
|
|
# with real RFI (design/linux-vulkan-video-encode.md). Pure Rust ash (no new lib / link dep);
|
|
# default on for HEVC (PUNKTFUNK_VULKAN_ENCODE=0 → libav VAAPI), failed open falls back to VAAPI.
|
|
cargo build --release --locked --features punktfunk-host/nvenc,punktfunk-host/vulkan-encode \
|
|
-p punktfunk-host -p punktfunk-client-linux -p punktfunk-client-session
|
|
|
|
- name: Build + smoke-boot web console (bun preset)
|
|
# Gate the .deb on a real bun boot: the punktfunk-web .deb runs the Nitro `bun` preset
|
|
# (our Bun.serve TLS entry), so prove the build IS a bun bundle and serves /login.
|
|
# No TLS env here, so the custom entry binds plain HTTP — the smoke curl stays simple.
|
|
run: |
|
|
# bun builds AND runs the console. Baked into the rust-ci image; bootstrap here too so the
|
|
# job stays green against the PREVIOUS image (docker.yml bootstrap lag).
|
|
command -v bun >/dev/null || {
|
|
apt-get install -y --no-install-recommends unzip
|
|
curl -fsSL https://bun.sh/install | bash
|
|
}
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
cd web
|
|
bun install --frozen-lockfile
|
|
bun run build
|
|
if ! grep -q 'Bun\.serve' .output/server/index.mjs; then
|
|
echo "ERROR: web build is not a bun bundle — need the 'bun' preset + custom entry"; exit 1
|
|
fi
|
|
PORT=3009 HOST=127.0.0.1 PUNKTFUNK_UI_PASSWORD=ci bun .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 bun"; exit 1; }
|
|
|
|
- name: Build .debs
|
|
run: |
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
VERSION="$VERSION" bash packaging/debian/build-deb.sh
|
|
VERSION="$VERSION" bash packaging/debian/build-client-deb.sh
|
|
# Reuse CI's bun for the vendored runtime (matches the amd64 runner) instead of downloading.
|
|
VERSION="$VERSION" BUN_BIN="$(command -v bun || true)" 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"
|
|
# A re-tagged release re-fires this workflow and the apt registry 409s on duplicate
|
|
# package versions — delete any prior copy of this exact name/version/arch first
|
|
# (404 on the first publish is fine).
|
|
NAME=$(dpkg-deb -f "$DEB" Package)
|
|
VER=$(dpkg-deb -f "$DEB" Version)
|
|
ARCH=$(dpkg-deb -f "$DEB" Architecture)
|
|
curl -fsS -o /dev/null --user "enricobuehler:$TOKEN" -X DELETE \
|
|
"https://$REGISTRY/api/packages/$OWNER/debian/pool/$DISTRIBUTION/$COMPONENT/$NAME/$VER/$ARCH" || true
|
|
# 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"
|
|
|
|
# On a real release, also attach the .debs to the unified Gitea Release so they're on the
|
|
# downloads page next to every other platform's artifact (canary builds live in the apt
|
|
# `canary` distribution above — no release page for those).
|
|
- name: Attach .debs to the Gitea release (stable tags only)
|
|
if: startsWith(gitea.ref, 'refs/tags/v')
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
run: |
|
|
. scripts/ci/gitea-release.sh
|
|
RID=$(ensure_release "$GITHUB_REF_NAME" "$GITHUB_REF_NAME" auto)
|
|
for DEB in dist/*.deb; do
|
|
upsert_asset "$RID" "$DEB"
|
|
done
|