Files
client/.gitea/workflows/ci.yml
T

91 lines
3.6 KiB
YAML

# 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:
branches: [main]
workflow_dispatch:
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
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: Require explicitly provisioned source and native tools
run: |
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: Native version gate
run: cargo run --locked -p xtask -- check-version
- name: Gitea transport unit tests (mocked HTTP, no publication)
run: python3 -m unittest discover -s xtask -p test_publish_release.py
- 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: 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: Rust workspace tests on matching native architecture
run: cargo test --locked --workspace --target "$TARGET" --jobs "$CARGO_BUILD_JOBS"
- 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: 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: 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: Upload measured native smoke evidence
if: always()
uses: actions/upload-artifact@v3
with:
name: native-ci-${{ matrix.target }}
path: |
native-smoke-${{ matrix.target }}/
native-migration-${{ matrix.target }}/
if-no-files-found: warn