noiz 0.4.0

A simple, configurable, blazingly fast noise library built for and with Bevy.
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always

jobs:
  # Run cargo test
  test:
    name: Test Suite
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4
      - name: Cache
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }}
      - name: Install stable 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
      - name: Run cargo test
        run: cargo test

  # Run cargo clippy -- -D warnings
  clippy_check:
    name: Clippy
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4
      - name: Cache
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }}
      - name: Install stable 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
      - name: Run clippy
        run: cargo clippy -- -D warnings

  # Run cargo fmt --all -- --check
  format:
    name: Format
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4
      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - name: Run cargo fmt
        run: cargo fmt --all -- --check

  toml:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - name: Install taplo
        run: cargo install taplo-cli --locked
      - name: Run Taplo
        id: taplo
        run: taplo fmt --check --diff
      - name: Taplo info
        if: failure()
        run: |
          echo 'To fix toml fmt, please run `taplo fmt`.'
          echo 'To check for a diff, run `taplo fmt --check --diff`.'
          echo 'You can find taplo here: https://taplo.tamasfe.dev/'
          echo 'Or if you use VSCode, use the `Even Better Toml` extension.'
          echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml'

  typos:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - name: Check for typos
        uses: crate-ci/typos@v1.31.1
      - name: Typos info
        if: failure()
        run: |
          echo 'To fix typos, please run `typos -w`'
          echo 'To check for a diff, run `typos`'
          echo 'You can find typos here: https://crates.io/crates/typos'
          echo 'if you use VSCode, you can also install `Typos Spell Checker'
          echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode'

  check-doc:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-check-doc-${{ hashFiles('**/Cargo.toml') }}
      - uses: dtolnay/rust-toolchain@stable
      # - name: Install Linux dependencies
      #   uses: ./.github/actions/install-linux-deps
      #   with:
      #     wayland: true
      #     xkb: true
      - name: Build and check doc
        run: cargo doc --workspace --all-features --no-deps --document-private-items --keep-going
        env:
          RUSTDOCFLAGS: "-D warnings"