The checks no longer run on pushes, pull requests or a schedule, on GitHub or Gitea: ci.yml, audit.yml, fuzz.yml and Gitea's ci.yml run by hand only (Run workflow). Only the package builds still run by themselves, on v* tags (release.yml, docker.yml, Gitea's release.yml), and the release workflows no longer run the checks first: GitHub's drops its checks and Windows test jobs, Gitea's the shared checks step. The docs say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEpqsPES27Eacue91u3d2Q
220 lines
8.3 KiB
YAML
220 lines
8.3 KiB
YAML
name: CI
|
|
|
|
# Checks: lint, tests, license and advisory checks, and the integration
|
|
# tests against TS3/TS6 servers. Off for pushes and pull requests: run by
|
|
# hand only (Actions → CI → Run workflow). Packages are built by release.yml
|
|
# (tags, or by hand), which does not wait for these checks.
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: "0"
|
|
# In particular, do not compile the generated UI lib and lib-test together.
|
|
CARGO_BUILD_JOBS: "1"
|
|
CARGO_INCREMENTAL: "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: |
|
|
packages=$(scripts/own-crates.sh)
|
|
read -r -a packages <<< "$packages"
|
|
cargo fmt "${packages[@]}" --check
|
|
- name: clippy (own crates, deny warnings)
|
|
run: |
|
|
packages=$(scripts/own-crates.sh)
|
|
read -r -a packages <<< "$packages"
|
|
cargo clippy "${packages[@]}" --all-targets --no-deps --locked -- -D warnings
|
|
- name: clippy (workspace, report only)
|
|
run: cargo clippy --workspace --all-targets --locked
|
|
|
|
# Under Xvfb, so X11 tests (screen capture, global hotkeys through XTEST
|
|
# input) run instead of skipping. Windows tests run in release.yml.
|
|
test:
|
|
name: test (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
|
|
- name: Build
|
|
run: cargo build --workspace --all-targets --locked
|
|
- name: Test
|
|
run: |
|
|
# DISPLAY is assigned by xvfb-run, then expanded by the inner shell.
|
|
# shellcheck disable=SC2016
|
|
xvfb-run -a bash -c 'VOELIN_X11_TEST_DISPLAY="$DISPLAY" cargo test --workspace --locked'
|
|
|
|
# Windows-only code compiles and is lint-clean (MSVC, libvpx from vcpkg).
|
|
clippy-windows:
|
|
name: clippy (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
|
|
- name: clippy (own crates, deny warnings)
|
|
shell: bash
|
|
run: |
|
|
packages=$(scripts/own-crates.sh)
|
|
read -r -a packages <<< "$packages"
|
|
cargo clippy "${packages[@]}" --all-targets --no-deps --locked -- -D warnings
|
|
|
|
# The Android-only code (docs/android.md), for the Android target. The APKs
|
|
# are built by release.yml.
|
|
clippy-android:
|
|
name: clippy (Android)
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 45
|
|
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
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: android
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
- name: Android SDK packages
|
|
run: |
|
|
# sdkmanager closes stdin after the last license; ignore only yes's
|
|
# SIGPIPE, not a failure from sdkmanager (also works with pipefail).
|
|
yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null || test "${PIPESTATUS[1]}" -eq 0
|
|
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
|
|
"ndk;$NDK_VERSION" "platforms;android-36" > /dev/null
|
|
{
|
|
echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/$NDK_VERSION"
|
|
# CMake (libopus) and Slint's Java helper.
|
|
echo "ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/$NDK_VERSION"
|
|
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
|
|
|
|
# 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
|