bevy_lagrange 0.0.3

Bevy camera controller with pan, orbit, zoom-to-fit, queued animations, and trackpad support
Documentation
name: CI

# Standard assumption: commit Cargo.lock even for library repos so CI uses stable
# dependency resolution and can reuse caches predictably.

on:
  pull_request:
    branches: [main]
  push:
    branches:
      - '**'
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always
  CARGO_TERM_PROGRESS_WHEN: always
  CARGO_TERM_PROGRESS_WIDTH: 80
  FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
  TAPLO_VERSION: 0.10.0

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  format:
    name: Format Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install Rust nightly
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: nightly
          components: rustfmt

      - name: Check formatting
        run: cargo +nightly fmt -- --check

  taplo:
    name: Taplo Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install Taplo
        uses: taiki-e/install-action@v2
        with:
          tool: taplo@${{ env.TAPLO_VERSION }}

      - name: Check TOML formatting
        run: taplo fmt --check

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install Rust stable
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          components: clippy

      - name: Install mold linker
        uses: rui314/setup-mold@v1

      - name: Install and cache Linux dependencies
        uses: natepiano/cache-apt-pkgs-action@1a93bf1cfca3126459c9aea5af90d717f9ea216f
        with:
          packages: libudev-dev libasound2-dev pkg-config clang libwayland-dev libxkbcommon-dev
          version: 1.0

      - name: Cache Rust dependencies
        uses: Swatinem/rust-cache@v2

      - name: Run clippy
        run: cargo clippy --workspace --all-targets --all-features -- -D warnings

  build:
    name: Build Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install Rust stable
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable

      - name: Install mold linker
        uses: rui314/setup-mold@v1

      - name: Install and cache Linux dependencies
        uses: natepiano/cache-apt-pkgs-action@1a93bf1cfca3126459c9aea5af90d717f9ea216f
        with:
          packages: libudev-dev libasound2-dev pkg-config clang libwayland-dev libxkbcommon-dev
          version: 1.0

      - name: Cache Rust dependencies
        uses: Swatinem/rust-cache@v2

      - name: Build release examples
        run: cargo build --release --all-features --workspace --examples

  test:
    name: Test Suite
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install Rust stable
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable

      - name: Install cargo-nextest
        uses: taiki-e/install-action@nextest

      - name: Install mold linker
        uses: rui314/setup-mold@v1

      - name: Install and cache Linux dependencies
        uses: natepiano/cache-apt-pkgs-action@1a93bf1cfca3126459c9aea5af90d717f9ea216f
        with:
          packages: libudev-dev libasound2-dev pkg-config clang libwayland-dev libxkbcommon-dev
          version: 1.0

      - name: Cache Rust dependencies
        uses: Swatinem/rust-cache@v2

      - name: Free disk space
        run: |
          sudo rm -rf /usr/share/dotnet
          sudo rm -rf /usr/local/lib/android
          sudo rm -rf /opt/ghc
          df -h

      # Build only test targets here. Example compilation belongs in Build Check.
      - name: Run test targets
        run: cargo nextest run --all-features --workspace --tests
        env:
          WGPU_BACKEND: "gl"
          WINIT_UNIX_BACKEND: "x11"
          RUSTFLAGS: "-C link-arg=-fuse-ld=mold"

  mend:
    name: Mend Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install Rust stable
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          components: rust-src, rustc-dev, llvm-tools-preview

      - name: Install mold linker
        uses: rui314/setup-mold@v1

      - name: Install and cache Linux dependencies
        uses: natepiano/cache-apt-pkgs-action@1a93bf1cfca3126459c9aea5af90d717f9ea216f
        with:
          packages: libudev-dev libasound2-dev pkg-config clang libwayland-dev libxkbcommon-dev
          version: 1.0

      - name: Cache Rust dependencies
        uses: Swatinem/rust-cache@v2

      - name: Install cargo-mend
        run: cargo install cargo-mend
        env:
          RUSTC_BOOTSTRAP: 1

      - name: Run cargo mend
        run: cargo mend --fail-on-warn
        env:
          CARGO_TERM_COLOR: never