Release workflow, myTS avatars, host banner, hardware video decode setting, nickname-first tree layout, CI run #1 analysis; core raw-extras lifecycle
This commit is contained in:
1 parent
ceb18f3fc9
commit
aaa389cc9b
16 files changed
+425
-23
No files matched your search
@@ -0,0 +1,158 @@
|
||||
# Release builds on the self-hosted Gitea runner (Linux x64 job containers).
|
||||
# - workflow_dispatch: build + verify packages, keep them as run artifacts (no release).
|
||||
# - tag v*: same, then publish a Gitea release with the packages, only if every build job succeeded.
|
||||
# Windows x64 packages are built on a Windows machine and attached separately (see README).
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
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
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Tests
|
||||
run: |
|
||||
npm ci
|
||||
npm test
|
||||
cargo test --manifest-path core/Cargo.toml --locked
|
||||
|
||||
- name: Core release build and checks
|
||||
run: |
|
||||
cargo build --manifest-path core/Cargo.toml --release --locked
|
||||
node scripts/binary-arch.mjs core/target/release/teamspeach-core --expect linux-x64
|
||||
node scripts/core-smoke.mjs core/target/release/teamspeach-core
|
||||
|
||||
- name: Electron UI smoke (Xvfb, offline)
|
||||
env:
|
||||
TEAMSPEACH_SMOKE_EXTRA_ARGS: --no-sandbox
|
||||
run: xvfb-run -a node scripts/smoke-ui.mjs --out smoke-out
|
||||
|
||||
- name: Package
|
||||
run: node scripts/dist.mjs --os linux --arch x64
|
||||
|
||||
- name: Package report
|
||||
run: |
|
||||
ldd --version | head -n1 > dist/build-info-linux-x64.txt
|
||||
node scripts/elf-pagesize.mjs dist/linux-unpacked --page 4096 --json dist/elf-report-linux-x64.json >> dist/build-info-linux-x64.txt
|
||||
sha256sum dist/*.AppImage dist/*.tar.gz >> dist/build-info-linux-x64.txt
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: teamspeach-linux-x64
|
||||
path: |
|
||||
dist/*.AppImage
|
||||
dist/*.tar.gz
|
||||
dist/build-info-linux-x64.txt
|
||||
dist/elf-report-linux-x64.json
|
||||
if-no-files-found: error
|
||||
|
||||
linux-arm64:
|
||||
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 and checks
|
||||
run: |
|
||||
cargo build --manifest-path core/Cargo.toml --release --locked --target aarch64-unknown-linux-gnu
|
||||
node scripts/binary-arch.mjs core/target/aarch64-unknown-linux-gnu/release/teamspeach-core --expect linux-arm64
|
||||
node scripts/elf-pagesize.mjs core/target/aarch64-unknown-linux-gnu/release/teamspeach-core --page 16384
|
||||
node scripts/core-smoke.mjs core/target/aarch64-unknown-linux-gnu/release/teamspeach-core --wrapper "qemu-aarch64 -L /usr/aarch64-linux-gnu"
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
npm ci
|
||||
node scripts/dist.mjs --os linux --arch arm64
|
||||
|
||||
- name: 16 KiB page check of every ELF in the package (Asahi)
|
||||
run: |
|
||||
echo "glibc of build sysroot: $(dpkg-query -W -f='${Version}' libc6-dev-arm64-cross)" > dist/build-info-linux-arm64.txt
|
||||
node scripts/elf-pagesize.mjs dist/linux-arm64-unpacked --page 16384 --json dist/elf-report-linux-arm64.json | tee -a dist/build-info-linux-arm64.txt
|
||||
sha256sum dist/*.AppImage dist/*.tar.gz >> dist/build-info-linux-arm64.txt
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: teamspeach-linux-arm64
|
||||
path: |
|
||||
dist/*.AppImage
|
||||
dist/*.tar.gz
|
||||
dist/build-info-linux-arm64.txt
|
||||
dist/elf-report-linux-arm64.json
|
||||
if-no-files-found: error
|
||||
|
||||
publish:
|
||||
needs: [linux-x64, linux-arm64]
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:22-bookworm
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Create release and upload packages
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
|
||||
TAG: ${{ github.ref_name }}
|
||||
run: |
|
||||
set -eu
|
||||
body="Linux x64 и Linux ARM64 (aarch64) собраны в CI: тесты, офлайн-проверка ядра, проверка страниц 16 КиБ для ARM64 (см. build-info-*.txt). ARM64 проверен только статически и под qemu, не на Apple Silicon. Пакеты не подписаны. Сборка Windows x64 прикладывается отдельно с пометкой local."
|
||||
id=$(node -e '
|
||||
const [api, tag, token, body] = process.argv.slice(1);
|
||||
fetch(`${api}/releases`, { method: "POST", headers: { Authorization: `token ${token}`, "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ tag_name: tag, name: `TeamsPeach ${tag}`, body, prerelease: true }) })
|
||||
.then(async (r) => { const j = await r.json(); if (!r.ok) { console.error(r.status, JSON.stringify(j)); process.exit(1); } console.log(j.id); });
|
||||
' "$API" "$TAG" "$TOKEN" "$body")
|
||||
for f in artifacts/*/*; do
|
||||
name=$(basename "$f")
|
||||
curl --fail -sS -X POST -H "Authorization: token $TOKEN" -F "attachment=@$f" "$API/releases/$id/assets?name=$name" > /dev/null
|
||||
echo "uploaded $name"
|
||||
done
|
||||
Reference in new issue
Block a user