Remove Electron and make Rust Slint the sole native client

This commit is contained in:
bit9992 committed 2026-11-10 17:53:53 +03:00
1 parent eb24965076
commit 220852f8cb
720 files changed
+2535 -130856

No files matched your search

+61 -101
View File
@@ -1,9 +1,6 @@
# Continuous integration on the self-hosted Gitea runner (Linux x64 container jobs).
# Everything runs inside the job container; nothing is installed on the runner host.
# Triggers are trusted only: pushes to main by maintainers and manual dispatch. There is deliberately no
# pull_request trigger: the repository is public and the runner sits on a private network, so outside
# contributions are reviewed first and then validated by a maintainer (push to main or workflow_dispatch).
name: ci
# Trusted pushes/manual runs only: public pull requests must not execute on private runners.
# Runner administrators provision the native SDKs/tools; jobs never install on the host.
name: native-ci
on:
push:
@@ -13,118 +10,81 @@ on:
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
linux-x64:
runs-on: ubuntu-latest
container:
image: node:22-bookworm
native-linux:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
runner: teamspeach-native-linux-x64
- target: aarch64-unknown-linux-gnu
runner: teamspeach-native-linux-arm64
runs-on: ${{ matrix.runner }}
env:
CARGO_TERM_COLOR: never
CARGO_BUILD_JOBS: "2"
TARGET: ${{ matrix.target }}
LLVM_HOME: ${{ vars.NATIVE_LLVM_HOME }}
SKIA_SOURCE_DIR: ${{ vars.NATIVE_SKIA_SOURCE_DIR }}
LIBCLANG_PATH: ${{ vars.NATIVE_LIBCLANG_PATH }}
LK_CUSTOM_WEBRTC: ${{ github.workspace }}/target/native-deps/${{ matrix.target }}/webrtc
steps:
- uses: actions/checkout@v4
- name: System packages (container only)
- name: Require explicitly provisioned source and native tools
run: |
apt-get update
apt-get install -y --no-install-recommends build-essential cmake curl ca-certificates git \
xvfb xauth libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libgbm1 libgtk-3-0 \
libasound2 libxss1 libxshmfence1 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libpango-1.0-0
set -euo pipefail
: "${LLVM_HOME:?set NATIVE_LLVM_HOME to installed LLVM}"
: "${LIBCLANG_PATH:?set NATIVE_LIBCLANG_PATH to the libclang directory}"
: "${SKIA_SOURCE_DIR:?set NATIVE_SKIA_SOURCE_DIR to a dependency-synchronized Skia checkout}"
test -x "$LLVM_HOME/bin/clang"
test -f "$SKIA_SOURCE_DIR/BUILD.gn"
test -x "$SKIA_SOURCE_DIR/bin/gn"
echo "$LLVM_HOME/bin" >> "$GITHUB_PATH"
command -v cargo
command -v cmake
command -v ninja
command -v python3
command -v xvfb-run
command -v dbus-run-session
echo "SKIA_GN_COMMAND=$SKIA_SOURCE_DIR/bin/gn" >> "$GITHUB_ENV"
echo "SKIA_NINJA_COMMAND=$(command -v ninja)" >> "$GITHUB_ENV"
- name: Rust toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.96.0 --target wasm32-unknown-unknown
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Native version gate
run: cargo run --locked -p xtask -- check-version
- name: glibc baseline
run: ldd --version | sed -n 1p
- name: Gitea transport unit tests (mocked HTTP, no publication)
run: python3 -m unittest discover -s xtask -p test_publish_release.py
- name: Node dependencies
run: npm ci
- name: Provision pinned WebRTC sources and archive
run: cargo run --locked -p xtask -- deps --target "$TARGET" --llvm-dir "$LLVM_HOME" --jobs "$CARGO_BUILD_JOBS"
- name: Portable microphone DSP
run: |
node scripts/build-denoise.mjs
cargo test --manifest-path dsp/Cargo.toml --locked
- name: Build full native app and update helper (Skia + WebRTC defaults)
run: cargo run --locked -p xtask -- build --target "$TARGET" --llvm-dir "$LLVM_HOME" --skia-source "$SKIA_SOURCE_DIR" --jobs "$CARGO_BUILD_JOBS"
- name: Unit tests (desktop)
run: npm test
- name: Rust workspace tests on matching native architecture
run: cargo test --locked --workspace --target "$TARGET" --jobs "$CARGO_BUILD_JOBS"
- name: Core tests
run: cargo test --manifest-path core/Cargo.toml --locked
- name: Build explicit native test harness
run: cargo run --locked -p xtask -- build --target "$TARGET" --llvm-dir "$LLVM_HOME" --skia-source "$SKIA_SOURCE_DIR" --jobs "$CARGO_BUILD_JOBS" --test-harness true
- name: Core release build
run: cargo build --manifest-path core/Cargo.toml --release --locked
- name: Native offline UI smoke (not updater end-to-end acceptance)
run: dbus-run-session -- xvfb-run -a cargo run --locked -p xtask -- smoke --target "$TARGET" --scenario offline-ui --out "native-smoke-$TARGET"
- name: Core binary architecture
run: node scripts/binary-arch.mjs "${CARGO_TARGET_DIR:-target}/release/teamspeach-core" --expect linux-x64
- name: Native historical profile migration smoke
run: dbus-run-session -- xvfb-run -a cargo run --locked -p xtask -- smoke --target "$TARGET" --scenario migration --out "native-migration-$TARGET"
- name: Core identity smoke (stdio, offline)
run: node scripts/core-smoke.mjs "${CARGO_TARGET_DIR:-target}/release/teamspeach-core"
- name: Electron UI smoke (Xvfb, offline, disposable profile)
env:
TEAMSPEACH_SMOKE_EXTRA_ARGS: --no-sandbox
run: xvfb-run -a node scripts/smoke-ui.mjs --out smoke-out
- name: Updater engine behaviour (Xvfb, emulated release host)
run: xvfb-run -a node --test test/update-engine.test.mjs
- name: Upload smoke evidence
- name: Upload measured native smoke evidence
if: always()
uses: actions/upload-artifact@v3
with:
name: ci-smoke-linux-x64
path: smoke-out/
if-no-files-found: ignore
linux-arm64-cross:
runs-on: ubuntu-latest
container:
image: node:22-bookworm
env:
CARGO_TERM_COLOR: never
CARGO_BUILD_JOBS: "2"
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
CXX_aarch64_unknown_linux_gnu: aarch64-linux-gnu-g++
AR_aarch64_unknown_linux_gnu: aarch64-linux-gnu-ar
steps:
- uses: actions/checkout@v4
- name: Cross toolchain and user-mode emulator (container only, no binfmt)
run: |
apt-get update
apt-get install -y --no-install-recommends build-essential cmake curl ca-certificates git \
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user
- name: Rust toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.96.0 --target aarch64-unknown-linux-gnu
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Core cross build (aarch64-unknown-linux-gnu)
run: cargo build --manifest-path core/Cargo.toml --release --locked --target aarch64-unknown-linux-gnu
- name: Core binary architecture
run: node scripts/binary-arch.mjs "${CARGO_TARGET_DIR:-target}/aarch64-unknown-linux-gnu/release/teamspeach-core" --expect linux-arm64
- name: Required glibc symbols
run: aarch64-linux-gnu-objdump -T "${CARGO_TARGET_DIR:-target}/aarch64-unknown-linux-gnu/release/teamspeach-core" | grep -o 'GLIBC_[0-9.]*' | sort -Vu | tail -n1
- name: 16 KiB page compatibility (Asahi) of the core ELF
run: node scripts/elf-pagesize.mjs "${CARGO_TARGET_DIR:-target}/aarch64-unknown-linux-gnu/release/teamspeach-core" --page 16384
- name: Core identity smoke under qemu-aarch64 (emulated, not native hardware)
run: node scripts/core-smoke.mjs "${CARGO_TARGET_DIR:-target}/aarch64-unknown-linux-gnu/release/teamspeach-core" --wrapper "qemu-aarch64 -L /usr/aarch64-linux-gnu"
# The unit tests (voice detector, resampler, identity keys, codecs, protocol) built for aarch64 and run
# under user-mode qemu. Emulated, not native hardware; the bridge smoke tests spawn the core binary and
# are left to the host build above. Tests that re-run their own binary as a child get the same emulator
# and sysroot explicitly (core/src/test_exec.rs): without binfmt the kernel cannot exec the aarch64 ELF.
- name: Core unit tests under qemu-aarch64 (emulated, not native hardware)
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER: qemu-aarch64 -L /usr/aarch64-linux-gnu
TEAMSPEACH_TEST_QEMU: qemu-aarch64
TEAMSPEACH_TEST_QEMU_SYSROOT: /usr/aarch64-linux-gnu
run: cargo test --manifest-path core/Cargo.toml --locked --target aarch64-unknown-linux-gnu --bin teamspeach-core
name: native-ci-${{ matrix.target }}
path: |
native-smoke-${{ matrix.target }}/
native-migration-${{ matrix.target }}/
if-no-files-found: warn