rusting_engine 2.6.0

Vulkan 3D game engine with GPU-accelerated physics for massive physics-heavy scenes
name: CI

# CMake 4 removed compatibility below 3.5. shaderc-sys 0.8 still contains
# third-party CMake files with an older policy declaration.
env:
  CMAKE_POLICY_VERSION_MINIMUM: "3.5"

on:
  # Branches only: a version tag points at a commit main already checked.
  push:
    branches: ["**"]
  pull_request:

jobs:
  rust:
    name: Rust checks (${{ matrix.os }})
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - name: Install audio, D-Bus, and gamepad headers
        if: runner.os == 'Linux'
        run: sudo apt-get update && sudo apt-get install -y libasound2-dev libudev-dev libdbus-1-dev
      - name: Formatting
        run: cargo fmt --all -- --check
      - name: Strict Clippy
        run: cargo clippy --workspace --all-targets -- -D warnings
      - name: Tests
        run: cargo test --workspace --all-targets
      - name: Documentation tests
        run: cargo test --workspace --doc
      - name: API reference builds without broken links
        run: cargo doc --workspace --no-deps
        env:
          RUSTDOCFLAGS: -D warnings

  shaders:
    name: Shader compilation
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install glslc
        run: sudo apt-get update && sudo apt-get install -y glslc
      - name: Compile every shader file
        run: ./scripts/check_shaders.sh