bliss-audio 0.11.3

A song analysis library for making playlists
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always

jobs:
  build-test-lint-linux:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
      with:
        submodules: recursive
    - uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
      with:
        toolchain: stable
        override: true
        components: rustfmt, clippy
    - name: Packages
      run: sudo apt-get update && sudo apt-get install build-essential yasm libavutil-dev libavcodec-dev libavformat-dev libavfilter-dev libavfilter-dev libavdevice-dev libswresample-dev libfftw3-dev ffmpeg libsqlite3-dev
    - name: Check format
      run: cargo fmt -- --check
    - name: Lint
      run: cargo clippy --examples --features=serde,library,symphonia -- -D warnings
    - name: Build
      run: cargo build --verbose
    - name: Run tests
      run: cargo test --verbose
    - name: Build benches
      run: cargo bench --verbose --features=bench,symphonia-all --no-run
    - name: Run example tests
      run: cargo test --verbose --examples
    - name: Build examples with library
      run: cargo build --examples --verbose --features=serde,library
    - name: Build with library
      run: cargo build --features=library --verbose
    - name: Run tests with library
      run: cargo test --verbose --features=library
    - name: Build without ffmpeg
      run: cargo build --verbose --no-default-features
    - name: Test without ffmpeg
      run: cargo test --verbose --no-default-features
    - name: Build library without ffmpeg
      run: cargo build --verbose --no-default-features --features=library
    - name: Test library without ffmpeg
      run: cargo test --verbose --no-default-features --features=library
    - name: Lint without ffmpeg
      run: cargo clippy --examples --features=serde,library,symphonia --no-default-features -- -D warnings
    - name: Test symphonia
      run: cargo test --features=symphonia-all
    - name: Install emscripten
      run: rustup target add wasm32-unknown-emscripten && rustup install nightly && rustup component add rust-src --toolchain nightly && cd /tmp && git clone https://github.com/emscripten-core/emsdk.git && cd ./emsdk && ./emsdk install latest && ./emsdk activate latest
    - name: Build emscripten
      run: source /tmp/emsdk/emsdk_env.sh && cargo build --target wasm32-unknown-emscripten --no-default-features

  build-test-lint-windows:
    name: Windows - build, test and lint
    runs-on: windows-latest
    strategy:
      matrix:
        include:
          - ffmpeg_version: latest
            ffmpeg_download_url: https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-8.0.1-full_build-shared.7z
      fail-fast: false
    env:
      FFMPEG_DOWNLOAD_URL: ${{ matrix.ffmpeg_download_url }}
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
      - name: Install dependencies
        run: |
          $VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
          Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n"
          Invoke-WebRequest "${env:FFMPEG_DOWNLOAD_URL}" -OutFile ffmpeg-release-full-shared.7z
          7z x ffmpeg-release-full-shared.7z
          mkdir ffmpeg
          mv ffmpeg-*/* ffmpeg/
          Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\ffmpeg`n"
          Add-Content $env:GITHUB_PATH "${pwd}\ffmpeg\bin`n"
      - name: Set up Rust
        uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
        with:
          toolchain: stable
          override: true
          components: rustfmt, clippy
      - name: Lint
        run: cargo clippy --examples --features=serde -- -D warnings
      - name: Check format
        run: cargo fmt -- --check
      - name: Build
        run: cargo build --examples
      - name: Test
        run: cargo test --examples --features=serde