mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-23 09:19:06 +00:00
c355e99913
- replace unreachable Azure runner mirrors with the HTTPS Ubuntu archive - retain bounded apt retries and timeout safeguards
126 lines
5.0 KiB
YAML
126 lines
5.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
frontend:
|
|
name: Frontend checks
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
submodules: recursive
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: node --test scripts/*.node-test.js
|
|
- run: npm test -- --run
|
|
- run: npm run build
|
|
|
|
desktop:
|
|
name: Desktop checks (${{ matrix.target }})
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: macos-latest
|
|
target: aarch64-apple-darwin
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
- os: ubuntu-22.04
|
|
target: x86_64-unknown-linux-gnu
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
submodules: recursive
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
- name: Install Linux dependencies
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
# The hosted Ubuntu image can expose an unreachable Azure mirror in
|
|
# its apt sources while the public Ubuntu archive is reachable.
|
|
# Normalize every apt source, including the image's mirror list,
|
|
# before refreshing indexes so a transient runner-local mirror does
|
|
# not consume the whole job timeout.
|
|
sudo find /etc/apt -type f \
|
|
-exec sed -i \
|
|
-e 's#http://azure\.archive\.ubuntu\.com#https://archive.ubuntu.com#g' \
|
|
-e 's#https://azure\.archive\.ubuntu\.com#https://archive.ubuntu.com#g' \
|
|
{} +
|
|
sudo env DEBIAN_FRONTEND=noninteractive timeout --foreground --signal=TERM --kill-after=30s 10m apt-get \
|
|
-o Acquire::Retries=3 \
|
|
-o Acquire::http::Timeout=30 \
|
|
-o Acquire::https::Timeout=30 \
|
|
-o DPkg::Lock::Timeout=60 \
|
|
update
|
|
sudo env DEBIAN_FRONTEND=noninteractive timeout --foreground --signal=TERM --kill-after=30s 10m apt-get \
|
|
-o Acquire::Retries=3 \
|
|
-o Acquire::http::Timeout=30 \
|
|
-o Acquire::https::Timeout=30 \
|
|
-o DPkg::Lock::Timeout=60 \
|
|
install -y --no-install-recommends \
|
|
libwebkit2gtk-4.1-dev \
|
|
libappindicator3-dev \
|
|
librsvg2-dev \
|
|
patchelf \
|
|
libdbus-1-dev \
|
|
pkg-config
|
|
- run: npm ci
|
|
- name: Test Rust backend
|
|
if: runner.os != 'Windows'
|
|
working-directory: src-tauri
|
|
run: cargo test --all-targets --target ${{ matrix.target }}
|
|
- name: Test Windows Torrent RPC integration
|
|
if: runner.os == 'Windows'
|
|
working-directory: src-tauri
|
|
run: cargo test --test torrent_rpc --target ${{ matrix.target }} -- --nocapture
|
|
- name: Compile Windows queue-manager integration
|
|
if: runner.os == 'Windows'
|
|
working-directory: src-tauri
|
|
run: cargo test --test queue_manager --no-run --target ${{ matrix.target }}
|
|
- name: Compile Windows Rust library tests
|
|
if: runner.os == 'Windows'
|
|
working-directory: src-tauri
|
|
run: cargo test --lib --no-run --target ${{ matrix.target }}
|
|
- name: Verify Windows atomic Torrent storage
|
|
if: runner.os == 'Windows'
|
|
working-directory: src-tauri
|
|
run: cargo test --test atomic_file --target ${{ matrix.target }} -- --nocapture
|
|
- name: Verify Windows Torrent cache safety
|
|
if: runner.os == 'Windows'
|
|
working-directory: src-tauri
|
|
run: cargo test --test torrent_cache --target ${{ matrix.target }} -- --nocapture
|
|
- name: Verify Windows Torrent web-seed normalization
|
|
if: runner.os == 'Windows'
|
|
working-directory: src-tauri
|
|
run: cargo test --test torrent_web_seed --target ${{ matrix.target }} -- --nocapture
|
|
- name: Provision locked engines
|
|
if: runner.os != 'macOS'
|
|
run: node scripts/provision-engines.js --target ${{ matrix.target }}
|
|
- name: Stage and verify engines
|
|
run: |
|
|
node scripts/stage-engines.js --target ${{ matrix.target }}
|
|
node scripts/verify-binaries.js --staged --target ${{ matrix.target }}
|
|
- name: Run Torrent process smoke
|
|
run: node scripts/smoke-torrent.js --binary src-tauri/engine-dist/${{ matrix.target }}/aria2c-${{ matrix.target }}${{ runner.os == 'Windows' && '.exe' || '' }} --failure-paths
|
|
- name: Run Aria2 resolver smoke
|
|
run: node scripts/smoke-aria2-resolver.js --binary src-tauri/engine-dist/${{ matrix.target }}/aria2c-${{ matrix.target }}${{ runner.os == 'Windows' && '.exe' || '' }}
|
|
- name: Run Aria2 normal-transfer smoke
|
|
run: node scripts/smoke-aria2-transfers.js --binary src-tauri/engine-dist/${{ matrix.target }}/aria2c-${{ matrix.target }}${{ runner.os == 'Windows' && '.exe' || '' }}
|