The product is Voelin (app id io.github.faumaray.Voelin), everywhere: - crates tsc-* -> voelin-* (and voelin-fuzz), the desktop binary tsc-desktop -> voelin, the development CLI tsctl -> voelinctl; - the Android app: applicationId, Kotlin package io.github.faumaray.voelin, VoelinApp, libvoelin_android.so (JNI class names follow); - TSC_* environment variables -> VOELIN_*, Gradle properties tsc.* -> voelin.*, signing secrets VOELIN_SIGNING_*; - the data/config/cache/state folder tsc -> voelin, the keyring service, thread names, the dev compose project; - desktop file, metainfo, icon, Flatpak manifest, NSIS installer, docs. The gateway keeps its name: bin tsgw (crate voelin-gateway), TSGW_* env vars, the tsgw.v1+json protocol, the tsgw image. The window title and the About page show "Voelin <version>" from voelin_platform::APP_NAME. Packages (scripts/package.sh): the app only (voelin, voelin.exe, APKs, Flatpak). voelinctl is a development tool and in no package. tsgw is for servers and now its own Linux package, tsgw_<v>_amd64.deb and tsgw-<v>-linux-x86_64.tar.gz, with a sandboxed systemd unit (packaging/linux/tsgw.service; /etc/tsgw config, /var/lib/tsgw state) and dependencies of its own (no GUI libraries). docs/gateway-admin.md has an Install section. Fixes: - package-windows: makensis on Windows found no file through "D:/a/..." paths; pass Windows paths (cygpath -w). - StartupWMClass is the app id, which the app sets as its X11 WM_CLASS (it was the binary name, so desktops could not match the window). - Gradle wrapper download timeout 10 s -> 60 s (slow proxies). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
362 lines
14 KiB
YAML
362 lines
14 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
# A version tag also publishes the packages as a draft release (release job).
|
|
tags: ["v*"]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: "0"
|
|
|
|
jobs:
|
|
lint:
|
|
name: fmt + clippy
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/system-deps
|
|
- name: Install toolchain (rust-toolchain.toml)
|
|
run: rustup toolchain install
|
|
- uses: Swatinem/rust-cache@v2
|
|
# The vendored crates in crates/proto use upstream's nightly rustfmt config
|
|
# and have known clippy findings (cleanup is milestone M1), so the strict
|
|
# checks cover our own crates only.
|
|
- name: rustfmt (own crates)
|
|
run: cargo fmt $(scripts/own-crates.sh) --check
|
|
- name: clippy (own crates, deny warnings)
|
|
run: cargo clippy $(scripts/own-crates.sh) --all-targets --no-deps -- -D warnings
|
|
- name: clippy (workspace, report only)
|
|
run: cargo clippy --workspace --all-targets
|
|
|
|
test:
|
|
name: test (${{ matrix.os }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-24.04, windows-2025]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/system-deps
|
|
- name: Install toolchain (rust-toolchain.toml)
|
|
run: rustup toolchain install
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Build
|
|
run: cargo build --workspace --all-targets --locked
|
|
# Under Xvfb, so X11 tests (screen capture, global hotkeys through
|
|
# XTEST input) run instead of skipping.
|
|
- name: Test (Linux, Xvfb)
|
|
if: runner.os == 'Linux'
|
|
run: xvfb-run -a bash -c 'VOELIN_X11_TEST_DISPLAY="$DISPLAY" cargo test --workspace --locked'
|
|
- name: Test
|
|
if: runner.os != 'Linux'
|
|
run: cargo test --workspace --locked
|
|
|
|
# Packages for every platform (docs/building.md), made by scripts/package.sh
|
|
# like the Docker builds in docker/; each job uploads them as an artifact.
|
|
package-linux:
|
|
name: package (Linux)
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/system-deps
|
|
- name: Install toolchain (rust-toolchain.toml)
|
|
run: rustup toolchain install
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: release
|
|
- name: Build
|
|
run: cargo build --release --locked -p voelin-ui -p voelin-gateway
|
|
# dpkg-shlibdeps works out the .deb's dependencies.
|
|
- name: Package (.tar.gz, .deb)
|
|
run: |
|
|
sudo apt-get install -y --no-install-recommends dpkg-dev
|
|
scripts/package.sh linux dist
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: voelin-linux-x86_64
|
|
path: dist/
|
|
if-no-files-found: error
|
|
|
|
package-windows:
|
|
name: package (Windows)
|
|
runs-on: windows-2025
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/system-deps
|
|
- name: Install toolchain (rust-toolchain.toml)
|
|
run: rustup toolchain install
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: release
|
|
- name: Build
|
|
run: cargo build --release --locked -p voelin-ui
|
|
# The installer is required here: install NSIS when the image lacks it.
|
|
- name: NSIS
|
|
shell: pwsh
|
|
run: |
|
|
$makensis = (Get-Command makensis -ErrorAction SilentlyContinue).Source
|
|
if (-not $makensis) { $makensis = "${env:ProgramFiles(x86)}\NSIS\makensis.exe" }
|
|
if (-not (Test-Path $makensis)) {
|
|
choco install nsis -y --no-progress
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
}
|
|
"MAKENSIS=$($makensis.Replace('\', '/'))" >> $env:GITHUB_ENV
|
|
- name: Package (.zip, installer)
|
|
shell: bash
|
|
run: scripts/package.sh windows dist
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: voelin-windows-x86_64
|
|
path: dist/
|
|
if-no-files-found: error
|
|
|
|
# Flatpak bundle from packaging/flatpak (install with
|
|
# `flatpak install --user voelin.flatpak`). flatpak-builder builds
|
|
# offline, from the crates that flatpak-cargo-generator lists.
|
|
package-flatpak:
|
|
name: package (Flatpak)
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 90
|
|
container:
|
|
image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-25.08
|
|
options: --privileged
|
|
env:
|
|
# flatpak-builder-tools, pinned.
|
|
FBT_COMMIT: 41c20aa10819cdb2a4f3ca171758a96d1955c018
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Cargo sources
|
|
run: |
|
|
curl -sSfL -o /tmp/flatpak-cargo-generator.py \
|
|
"https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/$FBT_COMMIT/cargo/flatpak-cargo-generator.py"
|
|
python3 -m venv /tmp/venv
|
|
/tmp/venv/bin/pip install --quiet "aiohttp>=3.9.5,<4" "tomlkit>=0.13.3,<1" "PyYAML>=6.0.2,<7"
|
|
/tmp/venv/bin/python /tmp/flatpak-cargo-generator.py Cargo.lock -o packaging/flatpak/cargo-sources.json
|
|
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
|
with:
|
|
bundle: voelin.flatpak
|
|
manifest-path: packaging/flatpak/io.github.faumaray.Voelin.yml
|
|
cache-key: flatpak-builder-${{ hashFiles('Cargo.lock') }}
|
|
upload-artifact: false
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: voelin-flatpak-x86_64
|
|
path: voelin.flatpak
|
|
if-no-files-found: error
|
|
|
|
# The gateway's container image (crates/voelin-gateway/Dockerfile), saved as a
|
|
# file: `docker load -i tsgw-image.tar.gz`.
|
|
package-gateway-image:
|
|
name: package (gateway image)
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build and save
|
|
run: |
|
|
version=$(sed -n 's/^version = "\(.*\)"$/\1/p' crates/voelin-gateway/Cargo.toml | head -n 1)
|
|
docker build -f crates/voelin-gateway/Dockerfile -t "tsgw:$version" -t tsgw:latest .
|
|
mkdir -p dist
|
|
docker save "tsgw:$version" tsgw:latest | gzip > dist/tsgw-image.tar.gz
|
|
(cd dist && sha256sum tsgw-image.tar.gz > SHA256SUMS-gateway)
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: tsgw-image
|
|
path: dist/
|
|
if-no-files-found: error
|
|
|
|
# The Android app (docs/android.md): clippy on the Android-only code, a
|
|
# debug APK for arm64-v8a and x86_64 (emulators), and a signed release APK
|
|
# when the signing secrets are set (docs/release.md). Nothing runs on a
|
|
# device here.
|
|
android:
|
|
name: android (APKs)
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 90
|
|
env:
|
|
NDK_VERSION: 27.3.13750724
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install toolchain (rust-toolchain.toml)
|
|
run: |
|
|
rustup toolchain install
|
|
rustup target add aarch64-linux-android x86_64-linux-android
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: android
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
- name: Android SDK packages
|
|
run: |
|
|
yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null
|
|
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
|
|
"ndk;$NDK_VERSION" "platforms;android-36" "build-tools;36.0.0" > /dev/null
|
|
echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/$NDK_VERSION" >> "$GITHUB_ENV"
|
|
# CMake (libopus) and Slint's Java helper.
|
|
echo "ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/$NDK_VERSION" >> "$GITHUB_ENV"
|
|
echo "ANDROID_JAR=$ANDROID_HOME/platforms/android-36/android.jar" >> "$GITHUB_ENV"
|
|
- name: Install cargo-ndk
|
|
run: cargo install cargo-ndk --locked --version 4.1.2
|
|
- name: clippy (Android target, deny warnings)
|
|
run: |
|
|
cargo ndk -t arm64-v8a --platform 29 clippy --locked -p voelin-android -p voelin-ui --no-deps -- -D warnings
|
|
cargo ndk -t arm64-v8a --platform 29 clippy --locked -p voelin-media --no-default-features --no-deps -- -D warnings
|
|
- name: Debug APK
|
|
working-directory: android
|
|
run: ./gradlew --no-daemon assembleDebug -Pvoelin.abis=arm64-v8a,x86_64
|
|
# Only with the signing secrets; an unsigned release APK is not installable.
|
|
- name: Release APK (signed)
|
|
working-directory: android
|
|
env:
|
|
KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
|
VOELIN_SIGNING_STORE_PASSWORD: ${{ secrets.VOELIN_SIGNING_STORE_PASSWORD }}
|
|
VOELIN_SIGNING_KEY_ALIAS: ${{ secrets.VOELIN_SIGNING_KEY_ALIAS }}
|
|
VOELIN_SIGNING_KEY_PASSWORD: ${{ secrets.VOELIN_SIGNING_KEY_PASSWORD }}
|
|
run: |
|
|
if [ -z "$KEYSTORE_BASE64" ]; then
|
|
echo "::notice::No ANDROID_KEYSTORE_BASE64 secret: skipping the release APK"
|
|
exit 0
|
|
fi
|
|
export VOELIN_SIGNING_STORE_FILE="$RUNNER_TEMP/release.jks"
|
|
echo "$KEYSTORE_BASE64" | base64 -d > "$VOELIN_SIGNING_STORE_FILE"
|
|
./gradlew --no-daemon assembleRelease -Pvoelin.abis=arm64-v8a,x86_64
|
|
rm -f "$VOELIN_SIGNING_STORE_FILE"
|
|
- name: Package
|
|
run: scripts/package.sh android dist
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: voelin-android
|
|
path: dist/
|
|
if-no-files-found: error
|
|
|
|
# A v* tag: every package, attached to a draft GitHub release to review and
|
|
# publish by hand.
|
|
release:
|
|
name: draft release
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
needs: [lint, test, deny, notices, smoke, package-linux, package-windows, package-flatpak, package-gateway-image, android]
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
path: dist
|
|
merge-multiple: true
|
|
- name: Checksums
|
|
run: |
|
|
cd dist
|
|
rm -f SHA256SUMS-*
|
|
sha256sum -- * > SHA256SUMS
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
draft: true
|
|
generate_release_notes: true
|
|
files: dist/*
|
|
|
|
# Licenses, bans, sources and RustSec advisories (the `cargo audit`
|
|
# database); audit.yml repeats the advisories check daily.
|
|
deny:
|
|
name: cargo-deny
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
# Default features only: the optional `rug` puzzle backend (GMP, LGPL) is
|
|
# benchmark-only and never shipped.
|
|
- uses: EmbarkStudios/cargo-deny-action@v2
|
|
with:
|
|
arguments: --workspace
|
|
|
|
# THIRD_PARTY_NOTICES.md (shown in the About page) must match Cargo.lock.
|
|
# cargo-about's output is independent of the host (the graph is filtered
|
|
# by the targets in about.toml), so the committed file is compared exactly.
|
|
notices:
|
|
name: third-party notices
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install toolchain (rust-toolchain.toml)
|
|
run: rustup toolchain install
|
|
# Caches ~/.cargo/bin too, so cargo-about is built once.
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: notices
|
|
- name: Install cargo-about
|
|
run: cargo install cargo-about --locked --version 0.9.2 --features cli
|
|
- name: Check THIRD_PARTY_NOTICES.md
|
|
run: scripts/notices.sh --check
|
|
|
|
# voelinctl, the gateway, the engine and voelin-stream against real TS3 and TS6
|
|
# servers, including a synthetic VP8 + Opus stream through the TS6 server
|
|
# (scripts/it-smoke.sh).
|
|
smoke:
|
|
name: integration smoke (TS3 + TS6)
|
|
runs-on: ubuntu-24.04
|
|
needs: test
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/system-deps
|
|
- name: Install toolchain (rust-toolchain.toml)
|
|
run: rustup toolchain install
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Start TeamSpeak servers
|
|
run: docker compose -f dev/docker-compose.yml up -d
|
|
- name: Smoke test
|
|
run: scripts/it-smoke.sh
|
|
- name: Server logs
|
|
if: failure()
|
|
run: docker compose -f dev/docker-compose.yml logs --no-color
|
|
# Client, gateway and stream logs the script keeps in dev/.state.
|
|
- name: Upload smoke logs
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: smoke-logs
|
|
path: dev/.state/*.log
|
|
if-no-files-found: ignore
|
|
|
|
# Our WebRTC peers against Chromium's (libwebrtc, as in the official TS6
|
|
# client); see tests/interop/README.md. Informational: a failure is
|
|
# reported on the job but does not fail the workflow, since it depends on
|
|
# a browser download and the runner's network interfaces.
|
|
browser-interop:
|
|
name: browser interop (voelin-stream, Chromium)
|
|
runs-on: ubuntu-24.04
|
|
needs: test
|
|
continue-on-error: true
|
|
timeout-minutes: 30
|
|
env:
|
|
PLAYWRIGHT_VERSION: 1.56.1
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/system-deps
|
|
- name: Install toolchain (rust-toolchain.toml)
|
|
run: rustup toolchain install
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
- name: Cache Playwright browsers
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/ms-playwright
|
|
key: playwright-${{ env.PLAYWRIGHT_VERSION }}-chromium
|
|
# Global install: the test finds Playwright through `npm root -g`.
|
|
- name: Install Playwright and Chromium
|
|
run: |
|
|
npm install -g "playwright@$PLAYWRIGHT_VERSION"
|
|
playwright install --with-deps chromium
|
|
- name: Browser interop test
|
|
run: VOELIN_INTEROP=1 cargo test --locked -p voelin-stream --test browser_interop -- --nocapture
|