mirror of
https://github.com/VallierDev/uu-remote-linux.git
synced 2026-11-16 08:50:40 +01:00
With --features inproc-av on X11 and UU_VIDEO_ENCODER=vaapi, VAAPI runs in process: a DRI3 DMA-BUF of the root (XShm upload without DRI3) goes through VPP to NV12 and the hardware encoder. SPS/PPS(/VPS) and slice headers are packed by the host because radeonsi (Mesa 26) does not write them. libva/libva-drm are dlopen'ed; release builds do not enable inproc-av. The NVENC path is unchanged. Accepted by the contributor on AMD HawkPoint1 (Mesa 26.2.3), 1920x1200@60, with the official Mac viewer (HEVC, presets, fps, scaling). Intel iHD and 4K are not verified. Thanks @ferstar.
131 lines
5.8 KiB
YAML
131 lines
5.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test-macos-ssh-paste:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: python3 -m unittest discover -s contrib/macos-ssh -p 'test_*.py' -v
|
|
- name: Test file-URL clipboard reader on a private pasteboard
|
|
run: |
|
|
swiftc -O contrib/macos-ssh/clipboard-files.swift -o "$RUNNER_TEMP/clipboard-files"
|
|
"$RUNNER_TEMP/clipboard-files" --self-test
|
|
|
|
test:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential pkg-config \
|
|
libx11-dev libxext-dev libxtst-dev libxfixes-dev libgtk-3-dev \
|
|
libwayland-dev libwayland-bin libxkbcommon-dev
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: cargo test --locked
|
|
# Same as the release job: the wayland plugin is built on 22.04; libei is unavailable here, so
|
|
# the portal plugin is skipped with a warning (release builds it on 24.04).
|
|
- name: Release feature set
|
|
run: |
|
|
cargo build --locked --features wayland,portal,engine-plugins --bin uuremote-server
|
|
test -f target/debug/libuu-wayland.so
|
|
- name: Debian package installs
|
|
run: |
|
|
packaging/deb/build-deb.sh 0.0.0~ci target/debug /tmp/deb
|
|
dpkg-deb -I /tmp/deb/*.deb | grep -E 'Depends|Recommends'
|
|
sudo apt-get install -y /tmp/deb/*.deb
|
|
uuremote-server --help | head -1
|
|
test -f /usr/lib/uu-remote-linux/libuu-wayland.so
|
|
systemd-analyze verify /usr/lib/systemd/user/uuremote-native.service
|
|
|
|
test-viewer:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install build dependencies (X11 + GTK + SDL2 + ffmpeg CLI for the viewer)
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential pkg-config \
|
|
libx11-dev libxext-dev libxtst-dev libxfixes-dev libgtk-3-dev libsdl2-dev ffmpeg
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: cargo test --locked --features native-viewer,viewer-sdl --bin uuremote-viewer
|
|
- run: cargo build --locked --features native-viewer,viewer-sdl --bin uuremote-viewer
|
|
|
|
test-wayland:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install build dependencies (X11 + Wayland + portal)
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential pkg-config \
|
|
libx11-dev libxext-dev libxtst-dev libxfixes-dev libgtk-3-dev \
|
|
libwayland-dev libxkbcommon-dev libglib2.0-dev libpipewire-0.3-dev libei-dev libeis-dev
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: cargo test --locked --features wayland,portal
|
|
# Release layout: engines as runtime-loaded plugins; uuremote-server must not link them.
|
|
- name: Engine plugins
|
|
run: |
|
|
cargo build --locked --features wayland,portal,engine-plugins --bin uuremote-server
|
|
for lib in libuu-wayland.so libuu-portal.so; do test -f "target/debug/$lib"; done
|
|
! readelf -d target/debug/uuremote-server | grep NEEDED | grep -E 'libei|libpipewire|libwayland-client|libxkbcommon'
|
|
- name: Native portal and EIS regression tests (ASan/UBSan)
|
|
env:
|
|
ASAN_OPTIONS: detect_leaks=1
|
|
UBSAN_OPTIONS: halt_on_error=1
|
|
run: |
|
|
for source in tests/portal_engine.c tests/portal_input.c tests/portal_eis.c tests/desktop_power.c; do
|
|
target="/tmp/$(basename "$source" .c)"
|
|
cc -O1 -g -fsanitize=address,undefined -fno-omit-frame-pointer \
|
|
-Wall -Wextra -Wno-unused-parameter "$source" -o "$target" \
|
|
$(pkg-config --cflags --libs gio-2.0 gio-unix-2.0 libpipewire-0.3 libei-1.0 libeis-1.0) -lpthread -lm
|
|
"$target"
|
|
done
|
|
|
|
test-inproc:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install build dependencies (X11; inproc-av vendors the NVENC headers; the VAAPI/DRI3 engines need libva/gbm/xcb-dri3 headers, libva itself is dlopen'ed at runtime)
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential pkg-config \
|
|
libx11-dev libxext-dev libxtst-dev libxfixes-dev libgtk-3-dev \
|
|
libva-dev libgbm-dev libx11-xcb-dev libxcb-dri3-dev libxcb-damage0-dev
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: cargo test --locked --features inproc-av
|
|
|
|
test-linux-arm64:
|
|
# aarch64 hosts (Ampere A1, arm64 VMs, Apple-silicon VMs) build from source, so keep that
|
|
# build honest on a native arm64 runner instead of letting it rot between releases.
|
|
runs-on: ubuntu-24.04-arm
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential pkg-config \
|
|
libx11-dev libxext-dev libxtst-dev libxfixes-dev libgtk-3-dev \
|
|
libwayland-dev libwayland-bin libxkbcommon-dev libglib2.0-dev libpipewire-0.3-dev libei-dev
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: cargo test --locked
|
|
- name: Release binary
|
|
run: |
|
|
cargo build --locked --release --bin uuremote-server
|
|
file target/release/uuremote-server
|
|
# The aarch64 release package ships both engine plugins.
|
|
- name: Release feature set
|
|
run: |
|
|
cargo build --locked --features wayland,portal,engine-plugins --bin uuremote-server
|
|
for lib in libuu-wayland.so libuu-portal.so; do test -f "target/debug/$lib"; done
|