Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ARcGWxLx21FwXJ3yfGriS
101 lines
3.0 KiB
YAML
101 lines
3.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ['**']
|
|
tags-ignore: ['**']
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
rust:
|
|
name: Rust (fmt, clippy, tests)
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Install Tauri system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
|
|
- name: Placeholder launcher frontend (tauri::generate_context needs it)
|
|
run: mkdir -p launcher/dist && echo '<!doctype html>' > launcher/dist/index.html
|
|
- run: cargo fmt --all --check
|
|
- run: cargo clippy --workspace --all-targets --locked -- -D warnings
|
|
- run: cargo test --workspace --locked
|
|
|
|
web:
|
|
name: Web UIs (type-check + build)
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
matrix:
|
|
app: [panel/web, launcher]
|
|
defaults:
|
|
run:
|
|
working-directory: ${{ matrix.app }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
cache-dependency-path: ${{ matrix.app }}/package-lock.json
|
|
- run: npm ci --no-audit --no-fund
|
|
- run: npm run check
|
|
- run: npm run build
|
|
|
|
launcher-windows:
|
|
name: Launcher (Windows build check)
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
cache-dependency-path: launcher/package-lock.json
|
|
- run: npm ci --no-audit --no-fund
|
|
working-directory: launcher
|
|
- run: npm run build
|
|
working-directory: launcher
|
|
- run: cargo clippy -p scopenet-launcher --locked -- -D warnings
|
|
- run: cargo test -p scopenet-launcher -p scopenet-core -p scopenet-shared --locked
|
|
|
|
engine-online:
|
|
name: Real installs (Mojang, Fabric, Quilt, Forge, NeoForge)
|
|
runs-on: ubuntu-24.04
|
|
# Talks to third-party servers; a hiccup there shouldn't block merges.
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Install games (vanilla, legacy, Fabric, Quilt, Forge, NeoForge)
|
|
run: cargo test -p scopenet-core --test online --locked -- --ignored --test-threads=2 --nocapture
|
|
|
|
docker:
|
|
name: Docker image builds
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: docker/setup-buildx-action@v3
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
push: false
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|