148 lines
4.9 KiB
YAML
148 lines
4.9 KiB
YAML
name: OneClient Nightly (Unsigned)
|
|
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: oneclient-nightly-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
permissions:
|
|
contents: read
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- platform: macos-latest
|
|
target: aarch64-apple-darwin
|
|
os_key: darwin
|
|
arch: aarch64
|
|
formats: app,dmg
|
|
- platform: macos-latest
|
|
target: x86_64-apple-darwin
|
|
os_key: darwin
|
|
arch: x86_64
|
|
formats: app,dmg
|
|
- platform: ubuntu-22.04
|
|
target: ''
|
|
os_key: linux
|
|
arch: x86_64
|
|
formats: deb,rpm,appimage
|
|
- platform: windows-latest
|
|
target: ''
|
|
os_key: windows
|
|
arch: x86_64
|
|
formats: nsis
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: ./.github/actions/setup-rust
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
save-cache: true
|
|
restore-cache: true
|
|
|
|
- name: (Linux) Install system dependencies
|
|
if: matrix.platform == 'ubuntu-22.04'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
build-essential cmake pkg-config clang python3 \
|
|
libfontconfig-dev libfreetype-dev \
|
|
libgl1-mesa-dev libx11-dev libxcursor-dev libxi-dev libxrandr-dev \
|
|
libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libdbus-1-dev \
|
|
libfuse2
|
|
|
|
- name: Install cargo-packager
|
|
shell: bash
|
|
run: cargo install cargo-packager --version 0.11.8 --locked
|
|
|
|
- name: Build release binary
|
|
shell: bash
|
|
run: |
|
|
if [ -n "${{ matrix.target }}" ]; then
|
|
cargo build --release --bin oneclient_app --target ${{ matrix.target }}
|
|
else
|
|
cargo build --release --bin oneclient_app
|
|
fi
|
|
|
|
- name: Package (unsigned)
|
|
shell: bash
|
|
env:
|
|
CI: 'true'
|
|
run: |
|
|
ARGS="--release --formats ${{ matrix.formats }}"
|
|
if [ -n "${{ matrix.target }}" ]; then
|
|
ARGS="$ARGS --target ${{ matrix.target }}"
|
|
fi
|
|
cargo packager $ARGS --verbose
|
|
|
|
- name: Resolve packager output dir
|
|
id: outdir
|
|
shell: bash
|
|
run: |
|
|
if [ -n "${{ matrix.target }}" ]; then
|
|
echo "dir=target/${{ matrix.target }}/release" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "dir=target/release" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
# Upload debug info (dSYM / .dwp / .pdb produced by the release profile's
|
|
# split-debuginfo) to Sentry so nightly crash reports get real file/function/
|
|
# line stack traces instead of raw addresses. Runs on every main push, so
|
|
# each unique build's symbols land in Sentry (matched by debug-id). Skips
|
|
# silently unless SENTRY_AUTH_TOKEN secret + SENTRY_ORG/SENTRY_PROJECT vars
|
|
# are configured.
|
|
- name: Upload debug symbols to Sentry
|
|
shell: bash
|
|
env:
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
|
|
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
|
|
OUT_DIR: ${{ steps.outdir.outputs.dir }}
|
|
run: |
|
|
if [ -z "${SENTRY_AUTH_TOKEN:-}" ] || [ -z "${SENTRY_ORG:-}" ] || [ -z "${SENTRY_PROJECT:-}" ]; then
|
|
echo "Sentry credentials not configured (need SENTRY_AUTH_TOKEN secret + SENTRY_ORG/SENTRY_PROJECT vars); skipping debug-symbol upload."
|
|
exit 0
|
|
fi
|
|
curl -sL https://sentry.io/get-cli/ | bash
|
|
sentry-cli debug-files upload --include-sources "$OUT_DIR"
|
|
|
|
- name: Collect installers
|
|
id: collect
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
shopt -s nullglob
|
|
mkdir -p dist
|
|
# Human-facing installers only; skip the .sig-paired updater bundles
|
|
# (no updater manifest is produced for unsigned nightly builds).
|
|
for f in "${{ steps.outdir.outputs.dir }}"/*.dmg \
|
|
"${{ steps.outdir.outputs.dir }}"/*.deb \
|
|
"${{ steps.outdir.outputs.dir }}"/*.rpm \
|
|
"${{ steps.outdir.outputs.dir }}"/*.AppImage \
|
|
"${{ steps.outdir.outputs.dir }}"/*-setup.exe; do
|
|
[ -e "$f" ] || continue
|
|
cp "$f" dist/
|
|
done
|
|
if [ -z "$(ls -A dist)" ]; then
|
|
echo "::error::No installers found in ${{ steps.outdir.outputs.dir }}"
|
|
exit 1
|
|
fi
|
|
ls -la dist
|
|
|
|
- name: Upload unsigned installers
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: oneclient-nightly-${{ matrix.os_key }}-${{ matrix.arch }}
|
|
path: dist/*
|
|
if-no-files-found: error
|
|
retention-days: 14
|