Files
SCOPENET-MC/.gitea/workflows/ci.yml
T
SCOPEDD 7809d47d39
CI / Real Minecraft installs (manual) (push) Skipped
CI / Rust, web and container (push) Canceled after 0s
CI / Windows launcher (push) Canceled after 0s
Server integrations / paper (push) Canceled after 0s
Server integrations / Fabric and Forge / 1.20.1 (push) Canceled after 0s
Server integrations / Fabric and Forge / 1.21.1 (push) Canceled after 0s
Server integrations / Fabric and Forge / 26.1.2 (push) Canceled after 0s
Server integrations / Fabric and Forge / 26.2 (push) Canceled after 0s
Server integrations / Fabric and Forge / 26.3 (push) Canceled after 0s
Migrate CI to Gitea and improve live map diagnostics
2026-10-01 00:07:35 -04:00

94 lines
3.3 KiB
YAML

name: CI
on:
push:
branches: ['**']
tags-ignore: ['**']
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ gitea.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
verify:
name: Rust, web and container
runs-on: linux-build
steps:
- uses: builtin:checkout
- name: Verify Linux runner
run: |
set -eu
test "$(uname -s)" = Linux
for tool in cargo rustc node npm docker; do command -v "$tool" >/dev/null || { echo "Missing $tool on linux-build runner"; exit 1; }; done
test "$(node -p 'process.versions.node.split(".")[0]')" -ge 22
rustup component list --installed | grep -q rustfmt
rustup component list --installed | grep -q clippy
pkg-config --exists webkit2gtk-4.1 ayatana-appindicator3-0.1 librsvg-2.0 || { echo 'Missing Tauri GTK/WebKit development packages'; exit 1; }
docker info >/dev/null || { echo 'Docker daemon unavailable'; exit 1; }
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: |
panel/web/package-lock.json
launcher/package-lock.json
- name: Check Rust
run: |
mkdir -p launcher/dist
echo '<!doctype html>' > launcher/dist/index.html
cargo fmt --all --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --locked
- name: Check panel and launcher UI
run: |
for app in panel/web launcher; do
(cd "$app" && npm ci --no-audit --no-fund && npm run check && npm run build)
done
- name: Build panel container
run: docker build -t scopenet-panel:ci .
launcher-windows:
name: Windows launcher
runs-on: windows-build
steps:
- uses: builtin:checkout
- name: Verify Windows runner
shell: pwsh
run: |
if (-not $IsWindows) { throw 'windows-build must be a Windows host runner' }
foreach ($tool in @('cargo', 'rustc', 'node', 'npm')) {
if (-not (Get-Command $tool -ErrorAction SilentlyContinue)) { throw "Missing $tool" }
}
if ([int](node -p 'process.versions.node.split(".")[0]') -lt 22) { throw 'Node 22+ required' }
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
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 Minecraft installs (manual)
if: ${{ gitea.event_name == 'workflow_dispatch' }}
runs-on: linux-build
continue-on-error: true
steps:
- uses: builtin:checkout
- name: Verify runner
run: |
test "$(uname -s)" = Linux
command -v cargo
- uses: Swatinem/rust-cache@v2
- run: cargo test -p scopenet-core --test online --locked -- --ignored --test-threads=2 --nocapture