language: python

matrix:
  include:
    - python: 2.7
      os: linux
      compiler: gcc
      env: ARCH=x86_64
    - python: 2.7
      os: linux
      compiler: gcc
      env: ARCH=i386
    - python: 3.4
      os: linux
      compiler: gcc
      env: ARCH=x86_64
    - python: 3.4
      os: linux
      compiler: gcc
      env: ARCH=i386
    - language: C
      os: osx
      compiler: clang
      env: ARCH=x86_64
    - language: C
      os: osx
      compiler: clang
      env: ARCH=i386
    - python: 2.7
      os: linux
      compiler: gcc
      env: ARCH=x86_64 HAVE_DOUBLE=1
    - python: 2.7
      os: linux
      compiler: gcc
      env: ARCH=i386 HAVE_DOUBLE=1
    - python: 3.4
      os: linux
      compiler: gcc
      env: ARCH=x86_64 HAVE_DOUBLE=1
    - python: 3.4
      os: linux
      compiler: gcc
      env: ARCH=i386 HAVE_DOUBLE=1
    - language: C
      os: osx
      compiler: clang
      env: ARCH=x86_64 HAVE_DOUBLE=1
    - language: C
      os: osx
      compiler: clang
      env: ARCH=i386 HAVE_DOUBLE=1

addons:
  apt:
    packages:
    - bzip2
    - libsndfile1-dev
    - libsamplerate-dev
    - libjack-dev
    - libasound2-dev
    - libfftw3-dev
    - sox

before_install:
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update     ; fi
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sox; fi

install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then travis_retry pip install nose2; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_retry pip install --user nose2; fi

script:
  - make create_test_sounds
  - make build
  - make build_python
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make test_python; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PATH="$HOME/Library/Python/2.7/bin/:$PATH" make test_python_osx; fi
  - make clean_python
  - make clean
  - make distcheck

notifications:
    irc:
        channels:
            - "irc.freenode.org#aubio"
        use_notice: true
