web-audio-api 0.16.0

A pure Rust implementation of the Web Audio API, for use in non-browser contexts
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    # checkout repo, install dependencies
    - uses: actions/checkout@v2
    - name: install alsa (sound driver)
      run: sudo apt-get update && sudo apt-get install libasound2-dev
    - name: update rustc
      run: rustup update

    # check it builds
    - name: Build
      run: cargo build --verbose --all-targets

    # run tests
    - name: Run tests
      run: cargo test --verbose

    # make sure all code has been formatted with rustfmt
    - run: rustup component add rustfmt
    - name: check rustfmt
      run: cargo fmt -- --check --color always

    # run clippy to verify we have no warnings
    - run: rustup component add clippy
    - name: cargo clippy
      run: cargo clippy --all-targets -- -D warnings

    # check for rustdoc warnings
    - name: generate and verify rustdoc
      env:
        RUSTDOCFLAGS: -D warnings
      run: cargo doc --no-deps --document-private-items --workspace --all-features