128 lines
5.2 KiB
YAML
128 lines
5.2 KiB
YAML
# 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
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
linux-x64:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:22-bookworm
|
|
env:
|
|
CARGO_TERM_COLOR: never
|
|
CARGO_BUILD_JOBS: "2"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: System packages (container only)
|
|
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
|
|
|
|
- name: Rust toolchain
|
|
run: |
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable --target wasm32-unknown-unknown
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: glibc baseline
|
|
run: ldd --version | sed -n 1p
|
|
|
|
- name: Node dependencies
|
|
run: npm ci
|
|
|
|
- name: Portable microphone DSP
|
|
run: |
|
|
node scripts/build-denoise.mjs
|
|
cargo test --manifest-path dsp/Cargo.toml --locked
|
|
|
|
- name: Unit tests (desktop)
|
|
run: npm test
|
|
|
|
- name: Core tests
|
|
run: cargo test --manifest-path core/Cargo.toml --locked
|
|
|
|
- name: Core release build
|
|
run: cargo build --manifest-path core/Cargo.toml --release --locked
|
|
|
|
- name: Core binary architecture
|
|
run: node scripts/binary-arch.mjs core/target/release/teamspeach-core --expect linux-x64
|
|
|
|
- name: Core identity smoke (stdio, offline)
|
|
run: node scripts/core-smoke.mjs core/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
|
|
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 stable --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 core/target/aarch64-unknown-linux-gnu/release/teamspeach-core --expect linux-arm64
|
|
|
|
- name: Required glibc symbols
|
|
run: aarch64-linux-gnu-objdump -T core/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 core/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 core/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.
|
|
- 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
|
|
run: cargo test --manifest-path core/Cargo.toml --locked --target aarch64-unknown-linux-gnu --bin teamspeach-core
|