bevy_northstar 0.3.2

A Bevy plugin for Hierarchical Pathfinding
Documentation
name: CI

on:
  push:
    branches: [main, dev]
  pull_request:
    branches: [main, dev]

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: --deny warnings
  RUSTDOCFLAGS: --deny warnings

jobs:
  # Run tests.
  test:
    name: Tests
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

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

      - name: Install dependencies
        run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev

      - name: Populate target directory from cache
        uses: Leafwing-Studios/cargo-cache@v2

      - name: Run tests
        run: |
          # Run tests for single-threaded.
          cargo test --workspace --no-default-features --all-targets
          cargo test --workspace --all-features --all-targets
          # Workaround for https://github.com/rust-lang/cargo/issues/6669
          cargo test --workspace --all-features --doc

  # Run clippy lints.
  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

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

      - name: Install dependencies
        run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev

      - name: Populate target directory from cache
        uses: Leafwing-Studios/cargo-cache@v2

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

  # Check formatting.
  format:
    name: Format
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

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

      - name: Run cargo fmt
        run: cargo fmt --all -- --check

  # Check documentation.
  doc:
    name: Docs
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

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

      - name: Install dependencies
        run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev

      - name: Populate target directory from cache
        uses: Leafwing-Studios/cargo-cache@v2

      - name: Check documentation
        run: cargo doc --workspace --all-features --document-private-items --no-deps

  check:
    name: Check features
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

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

      - name: Install dependencies
        run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev

      - name: Populate target directory from cache
        uses: Leafwing-Studios/cargo-cache@v2

      - name: Install cargo-all-features
        run: cargo install --force cargo-all-features

      - name: Check project
        run: cargo check-all-features