os:
  - linux
  - osx
dist: focal

addons:
  apt:
    packages:
      - libopenal-dev
  homebrew:
    packages:
      - openal-soft
      - pkg-config

language: c
env:
  - BUILD_TYPE=Debug
  - BUILD_TYPE=Release
matrix:
  include:
    - os: linux
      env:
        ANALYZE="scan-build --use-cc clang --use-c++ clang++"
      compiler: clang
branches:
  only:
    - master
    - coverity_scan
    - /wildmidi-.*$/

script:
  - cmake -B build -DWANT_PLAYER=ON -DWANT_ALSA=OFF -DWANT_OPENAL=ON -DWANT_OSS=OFF
  - ${ANALYZE} cmake --build build -j3 --verbose

notifications:
  irc:
    channels:
      - "chat.freenode.net#wildmidi"
    on_success: change
    on_failure: always    
