6a289b7b50
actions/checkout, actions/cache, actions/upload-artifact, and actions/download-artifact bumped from v4 to v5 across both ci.yml and release.yml. Pre-empts the 2026-06-02 Node 20 deprecation deadline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
89 lines
2.2 KiB
YAML
89 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: "-D warnings"
|
|
|
|
jobs:
|
|
test:
|
|
name: Test & Lint
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
|
|
- name: Install Linux audio/display dependencies
|
|
run: |
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y --no-install-recommends \
|
|
libasound2-dev \
|
|
libudev-dev \
|
|
libwayland-dev \
|
|
libxkbcommon-dev
|
|
|
|
- name: Cache cargo registry and build artifacts
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-
|
|
|
|
- name: Clippy (all crates, zero warnings)
|
|
run: cargo clippy --workspace -- -D warnings
|
|
|
|
- name: Test (headless crates only — no display required)
|
|
run: |
|
|
cargo test -p solitaire_core
|
|
cargo test -p solitaire_sync
|
|
cargo test -p solitaire_data
|
|
cargo test -p solitaire_server
|
|
|
|
build:
|
|
name: Release Build
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install Linux audio/display dependencies
|
|
run: |
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y --no-install-recommends \
|
|
libasound2-dev \
|
|
libudev-dev \
|
|
libwayland-dev \
|
|
libxkbcommon-dev
|
|
|
|
- name: Cache cargo registry and build artifacts
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-release-
|
|
|
|
- name: Build release binaries
|
|
run: cargo build --workspace --release
|