ci: verify system dependencies instead of installing them
All checks were successful
ci / check (push) Successful in 17m43s
release / build (push) Successful in 17m51s
release / publish (push) Successful in 27s

This commit is contained in:
Loki 2026-11-01 17:21:09 +01:00
parent 548b1e38b8
commit cffb1d8962
Signed by: boba
GPG key ID: 253067914055423B
2 changed files with 25 additions and 47 deletions

View file

@ -21,21 +21,18 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
- name: Verify system dependencies
run: |
# Self-hosted host: install packages only if we may; otherwise assume they are preinstalled.
if [ "$(id -u)" != 0 ] && ! sudo -n true 2>/dev/null; then
echo "::warning::no root/passwordless sudo on the runner, skipping apt (dependencies must be preinstalled)"
exit 0
fi
SUDO=$(command -v sudo || true)
export DEBIAN_FRONTEND=noninteractive
$SUDO apt-get update
$SUDO apt-get install -y --no-install-recommends \
build-essential curl ca-certificates pkg-config cmake protobuf-compiler \
libasound2-dev libopus-dev libudev-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev \
libssl-dev libxkbcommon-dev libwayland-dev libfontconfig1-dev libdbus-1-dev
set -euo pipefail
# The runner is a developer machine (not Debian): never install system packages from CI.
miss=0
for t in cmake protoc zip pkg-config python3 curl git; do
command -v "$t" >/dev/null || { echo "::error::missing tool: $t"; miss=1; }
done
for m in alsa opus libudev gstreamer-1.0 gstreamer-app-1.0 gstreamer-video-1.0 gstreamer-webrtc-1.0 gstreamer-sdp-1.0 openssl xkbcommon wayland-client fontconfig dbus-1; do
pkg-config --exists "$m" || { echo "::error::missing pkg-config module: $m"; miss=1; }
done
[ "$miss" = 0 ]
- name: Install Rust toolchain
run: |
@ -44,8 +41,7 @@ jobs:
fi
. "$HOME/.cargo/env" 2>/dev/null || true
rustup toolchain install stable --profile minimal -c rustfmt -c clippy
rustup default stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
rustup component add rustfmt clippy
cargo --version
- name: Cache cargo