language: c++ # Build flags common to OS X and Linux. # Parallel builds are important for avoiding OSX build timeouts. # We turn off verbose output to avoid going over the 4MB output limit. # TODO(2019-07-21): Add "ffmpeg=1" if FFmpeg 4.x becomes available in Ubuntu env: global: # For SCons builds - SCONSFLAGS="test=1 mad=1 faad=1 opus=1 modplug=1 wv=1 hss1394=0 virtualize=0 debug_assertions_fatal=1 verbose=0" # For CMake builds - CMAKEFLAGS="-DMAD=ON -DFAAD=ON -DOPUS=ON -DMODPLUG=ON -DWAVPACK=ON -DHSS1394=OFF" - GTEST_COLOR=1 - CTEST_OUTPUT_ON_FAILURE=1 jobs: include: - name: qsscheck os: linux dist: xenial before_install: - pip3 install tinycss script: - ./scripts/qsscheck.py . addons: apt: packages: - python3 - python3-pip - python3-pyqt5 - python3-setuptools - python3-wheel - name: Ubuntu/gcc/SCons build os: linux dist: xenial compiler: gcc # Ubuntu Xenial build prerequisites before_install: - sudo apt-get install -y scons install: - scons -j "$(nproc)" localecompare=1 script: # NOTE(sblaisot): 2018-01-02 removing gdb wrapper on linux due to a bug in # return code in order to avoid having a successful build when a test fail. # https://bugs.launchpad.net/mixxx/+bug/1699689 - ./mixxx-test - name: Ubuntu/gcc/CMake build os: linux dist: xenial compiler: gcc cache: ccache # Ubuntu Xenial build prerequisites env: CMAKEFLAGS_EXTRA="-DLOCALECOMPARE=ON" before_install: - sudo apt-get install -y cmake - export CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)" - cmake --version - ccache -s install: - mkdir cmake_build - cd cmake_build - cmake -L $CMAKEFLAGS $CMAKEFLAGS_EXTRA .. - cmake --build . - sudo cmake --build . --target install script: # Run tests and benchmarks - cmake --build . --target test - cmake --build . --target benchmark - name: OSX/clang/SCons build os: osx compiler: clang cache: directories: - $HOME/Library/Caches/Homebrew - /usr/local/Homebrew # Workaround for bug in libopus's opus.h including # instead of . # Virtual X (Xvfb) is needed for analyzer waveform tests env: >- CFLAGS="-isystem /usr/local/include/opus" CXXFLAGS="-isystem /usr/local/include/opus" DISPLAY=:99.0 before_install: - brew install scons - export QTDIR="$(find /usr/local/Cellar/qt -d 1 | tail -n 1)" - echo "QTDIR=$QTDIR" install: - scons -j "$(sysctl -n hw.ncpu)" script: # lldb doesn't provide an easy way to exit 1 on error: # https://bugs.llvm.org/show_bug.cgi?id=27326 - lldb ./mixxx-test --batch -o run -o quit -k 'thread backtrace all' -k "script import os; os._exit(1)" before_cache: # Avoid indefinite cache growth - brew cleanup # Cache only .git files under "/usr/local/Homebrew" so "brew update" # does not take 5min every build # Source: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/12 - find /usr/local/Homebrew \! -regex ".+\.git.+" -delete - name: OSX/clang/CMake build os: osx compiler: clang cache: ccache: true directories: - $HOME/Library/Caches/Homebrew - /usr/local/Homebrew # Workaround for bug in libopus's opus.h including # instead of . # Virtual X (Xvfb) is needed for analyzer waveform tests env: >- CMAKEFLAGS_EXTRA="-DLOCALECOMPARE=OFF -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5/" DISPLAY=:99.0 before_install: - export CMAKE_BUILD_PARALLEL_LEVEL="$(sysctl -n hw.ncpu)" - brew install ccache - export PATH="/usr/local/opt/ccache/bin:$PATH" - cmake --version - ccache -s install: - mkdir cmake_build - cd cmake_build - cmake -L $CMAKEFLAGS $CMAKEFLAGS_EXTRA .. - cmake --build . - sudo cmake --build . --target install script: # Run tests and benchmarks - cmake --build . --target test - cmake --build . --target benchmark before_cache: # Avoid indefinite cache growth - brew cleanup # Cache only .git files under "/usr/local/Homebrew" so "brew update" # does not take 5min every build # Source: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/12 - find /usr/local/Homebrew \! -regex ".+\.git.+" -delete git: depth: 1 services: # Virtual X is needed for analyzer waveform tests - xvfb addons: apt: sources: - ubuntu-toolchain-r-test packages: - libavformat-dev - libchromaprint-dev - libfaad-dev - libflac-dev - libid3tag0-dev - liblilv-dev - libmad0-dev - libmodplug-dev - libmp3lame-dev - libmp4v2-dev - libopus-dev - libopusfile-dev - libportmidi-dev - libprotobuf-dev - libqt5opengl5-dev - libqt5sql5-sqlite - libqt5svg5-dev - libqt5x11extras5-dev - librubberband-dev - libshout3-dev - libsndfile1-dev - libsoundtouch-dev - libsqlite3-dev - libtag1-dev - libupower-glib-dev - libusb-1.0-0-dev - libwavpack-dev - portaudio19-dev - protobuf-compiler - qt5-default - qtscript5-dev - qt5keychain-dev homebrew: update: true packages: - chromaprint - faad2 - ffmpeg - flac - lame - libsndfile - libogg - libvorbis - libshout - libmodplug - libid3tag - libmad - lilv - mp4v2 - opusfile - portaudio - portmidi - protobuf - qt5 - rubberband - sound-touch - taglib - wavpack notifications: webhooks: - https://mixxx.zulipchat.com/api/v1/external/travis?stream=travis&topic=build-status&api_key=$ZULIP_API_KEY