wavegen 0.4.1

Wavefrom generator library
Documentation
name: Rust

on:
  push:
    branches: [master, staging, trying]
  pull_request:
    branches: [master]
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    strategy:
      matrix:
        build_args:
          ["", "--no-default-features --features libm", "--features libm"]
        toolchain: ["stable", "1.60"]

    runs-on: ubuntu-latest

    env:
      RUSTFLAGS: "--deny warnings"

    steps:
      - uses: actions/checkout@v3
      - name: Install toolchain ${{ matrix.toolchain }}
        run: |
          rustup install ${{ matrix.toolchain }}
          rustup override set ${{ matrix.toolchain }}
      - name: Build
        run: cargo build --verbose ${{ matrix.build_args }}
      - name: Run tests
        if: matrix.toolchain == 'stable'
        run: cargo test --verbose ${{ matrix.build_args }}
      - name: Build examples
        if: matrix.toolchain == 'stable'
        run: cargo build --verbose --examples

  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install toolchain
        run: |
          rustup install stable
          rustup override set stable
      - name: Check code formatting
        run: cargo fmt -- --check
      - name: Run Clippy
        run: cargo clippy -- --deny clippy::all

  # This job should depend on all required jobs.
  # We will make Bors watch this job to tell whether to merge or not.
  done:
    name: Done
    needs: [build, lint]
    runs-on: ubuntu-latest
    steps:
      - name: Done
        run: echo Done