rusting_engine 1.4.0

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

# Runs the determinism suite (docs/determinism.md) when simulation code
# changes: the GPU tests on lavapipe, which compare shader math with the Rust
# reference bit for bit and check that frame batching does not change GPU
# state hashes, then `rusting determinism` on the starter template, which
# compares debug, release, and one-CPU runs tick by tick.

env:
  CMAKE_POLICY_VERSION_MINIMUM: "3.5"

on:
  push:
    paths:
      - "src/runtime/**"
      - "src/shaders/**"
      - "src/rendering/**"
      - "src/project_runner.rs"
      - "crates/rusting-core/**"
      - "Cargo.lock"
      - ".github/workflows/determinism.yml"
  pull_request:
    paths:
      - "src/runtime/**"
      - "src/shaders/**"
      - "src/rendering/**"
      - "src/project_runner.rs"
      - "crates/rusting-core/**"
      - "Cargo.lock"
      - ".github/workflows/determinism.yml"

jobs:
  determinism:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: Install lavapipe and glslc
        run: sudo apt-get update && sudo apt-get install -y mesa-vulkan-drivers glslc
      - name: GPU determinism tests on lavapipe
        run: |
          set -- /usr/share/vulkan/icd.d/lvp_icd*.json
          export VK_ICD_FILENAMES="$1"
          cargo test --workspace --features gpu-tests -- --test-threads=1
      - name: Debug, release, and one-CPU runs agree
        run: |
          cargo build --bin rusting
          ./target/debug/rusting new "$RUNNER_TEMP" determinism_check --template starter
          ./target/debug/rusting determinism "$RUNNER_TEMP/determinism_check" --ticks 600