rusty_audio 1.4.0

Convenient sound library for small projects and educational purposes.
Documentation
name: CI

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

env:
  RUSTFLAGS: "-C debuginfo=0 -D warnings"
  CARGO_TERM_COLOR: always
  CARGO_INCREMENTAL: 0

jobs:
  tests:
    name: Tests
    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ matrix.toolchain == 'nightly' }}
    strategy:
      fail-fast: false
      matrix:
        os: [macos-latest, windows-latest, ubuntu-latest]
        toolchain: [stable, beta, nightly]
        include:
          - os: macos-latest
            MACOS: true
          - os: windows-latest
          - os: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      # https://github.com/actions/cache/blob/main/examples.md#rust---cargo
      - uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

      - name: install linux deps
        run: |
          sudo apt update
          sudo apt install --no-install-recommends libasound2-dev pkg-config
        if: contains(matrix.os, 'ubuntu')

      - name: install ${{ matrix.toolchain }} toolchain
        id: install_toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.toolchain }}
          profile: minimal
          # Don't use a 'components:' entry--we don't need them with beta/nightly, plus nightly often doesn't have them
          override: true

      - name: rustfmt & clippy
        run: |
          rustup component add clippy rustfmt
          cargo fmt --all -- --check
          cargo clippy -- -D warnings
        if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'

      - run: cargo test --all-targets --all-features