Files
proton-stream/.github/workflows/ci.yml
T
nvrl d9ca8f8d60 fix(core,app,android,cli,packaging): harden account sign-in and watch-history sync
- Desktop shows Proton's CAPTCHA instead of failing the sign-in: a wry webview
  in a child process of the app (`pstr-app::verify`), confined to
  https://*.proton.me, hands the token back and the sign-in is retried. Linux
  packages and CI gain WebKitGTK 4.1; the Windows zip and MSI ship
  WebView2Loader.dll, without which a -gnu build does not start.
- The desktop keyring splits a secret too long for one entry across several,
  so a Proton session with many key salts survives Windows' 1280-unit cap.
  Short secrets stay one entry, so every existing secret still reads.
- `WatchSync` runs against a small `HistoryDrive` trait and is tested end to
  end against an in-memory Drive: two devices, newer wins, no re-upload of an
  unchanged history, a missing file written again, an unreadable own file
  never overwritten, a newer-format file left alone.
- An installation's file unwritten for 90 days is retired by the next device
  to sync, after its entries are merged and carried in that device's file.
- Removing a share keeps its watch state: sync would bring it back from the
  other devices anyway, and re-adding the share picks up where it left off.
- Watch history syncs once more on desktop exit (bounded to 3 s) and, on
  Android, through a WorkManager job enqueued when the app leaves the screen.
- The second-factor prompts say security keys are not supported.
2026-10-06 14:30:15 +02:00

72 lines
2.0 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
gate:
name: Gate (Linux)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
# Pinned: the MSRV the workspace declares.
toolchain: "1.96"
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2.9.1
# libmpv for pstr-player, WebKitGTK for the CAPTCHA window.
- name: Install libmpv and WebKitGTK
run: |
sudo apt-get update
sudo apt-get install -y libmpv-dev libwebkit2gtk-4.1-dev
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace --all-targets -- -D warnings
- run: cargo test --workspace --locked
# The Windows artifacts are cross-compiled from Linux with mingw-w64 — see
# scripts/build-windows.sh — so this checks the target that actually ships.
# It is a compile check, not a test run: nothing here executes a Windows
# binary. libmpv is not linked at build time by anything but `-l mpv`, which
# is why the import library out of the mpv-dev archive is all it needs.
windows-cross:
name: Gate (Windows cross)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.96"
components: clippy
targets: x86_64-pc-windows-gnu
- uses: Swatinem/rust-cache@v2.9.1
- name: Install the cross toolchain
run: |
sudo apt-get update
sudo apt-get install -y mingw-w64 p7zip-full
- name: Fetch libmpv's Windows development files
env:
GITHUB_TOKEN: ${{ github.token }}
run: scripts/build-windows.sh --fetch-mpv mpv
- name: clippy (x86_64-pc-windows-gnu)
run: |
RUSTFLAGS="-L native=$PWD/dist/mpv-dev" \
cargo clippy --workspace --all-targets \
--target x86_64-pc-windows-gnu -- -D warnings