|
| 1 | +# Copyright (c) 2016 Ableton. All Rights Reserved. |
| 2 | + |
| 3 | +language: cpp |
| 4 | +sudo: required |
| 5 | +dist: trusty |
| 6 | +branches: |
| 7 | + only: |
| 8 | + - master |
| 9 | + |
| 10 | +matrix: |
| 11 | + include: |
| 12 | + ########################################################################### |
| 13 | + # Build with the main configuration on all the supported compilers |
| 14 | + ########################################################################### |
| 15 | + # Mac OS X / XCode 7.1, 64-bit Debug |
| 16 | + - os: osx |
| 17 | + env: WORDSIZE=64 CONFIGURATION=Debug |
| 18 | + osx_image: xcode7.1 |
| 19 | + compiler: clang |
| 20 | + |
| 21 | + # Mac OS X / XCode 7.1, 64-bit Release |
| 22 | + - os: osx |
| 23 | + env: WORDSIZE=64 CONFIGURATION=Release |
| 24 | + osx_image: xcode7.1 |
| 25 | + compiler: clang |
| 26 | + |
| 27 | + # Linux with Clang 3.6, 64-bit Debug |
| 28 | + - os: linux |
| 29 | + compiler: clang |
| 30 | + addons: |
| 31 | + apt: |
| 32 | + sources: ['ubuntu-toolchain-r-test'] |
| 33 | + packages: ['clang-3.6', 'g++-5', 'valgrind', 'p7zip-full', 'portaudio19-dev', 'cmake', 'cmake-data'] |
| 34 | + env: COMPILER=clang++-3.6 WORDSIZE=64 CONFIGURATION=Debug |
| 35 | + |
| 36 | + # Linux with Clang 3.6, 64-bit Release |
| 37 | + - os: linux |
| 38 | + compiler: clang |
| 39 | + addons: |
| 40 | + apt: |
| 41 | + sources: ['ubuntu-toolchain-r-test'] |
| 42 | + packages: ['clang-3.6', 'g++-5', 'valgrind', 'p7zip-full', 'portaudio19-dev', 'cmake', 'cmake-data'] |
| 43 | + env: COMPILER=clang++-3.6 WORDSIZE=64 CONFIGURATION=Release |
| 44 | + |
| 45 | + # Linux with GCC 5.x, 32-bit Release |
| 46 | +# - os: linux |
| 47 | +# compiler: gcc |
| 48 | +# addons: |
| 49 | +# apt: |
| 50 | +# sources: ['ubuntu-toolchain-r-test'] |
| 51 | +# packages: ['g++-5', 'g++-5-multilib', 'linux-libc-dev:i386', 'valgrind:i386', |
| 52 | +# 'p7zip-full', 'libxext-dev:i386', 'libglapi-mesa:i386', |
| 53 | +# 'libgl1-mesa-glx:i386', 'libgl1-mesa-dev:i386', |
| 54 | +# 'portaudio19-dev:i386', 'libglib2.0-0:i386', 'cmake', 'cmake-data'] |
| 55 | +# env: COMPILER=g++-5 WORDSIZE=32 CONFIGURATION=Release |
| 56 | + |
| 57 | + # Linux with GCC 5.x, 64-bit Release |
| 58 | + - os: linux |
| 59 | + compiler: gcc |
| 60 | + addons: |
| 61 | + apt: |
| 62 | + sources: ['ubuntu-toolchain-r-test', 'george-edison55-precise-backports'] |
| 63 | + packages: ['g++-5', 'valgrind', 'p7zip-full', 'portaudio19-dev', 'cmake', 'cmake-data'] |
| 64 | + env: COMPILER=g++-5 WORDSIZE=64 CONFIGURATION=Release |
| 65 | + |
| 66 | + # Code formatting verification |
| 67 | + - os: linux |
| 68 | + compiler: clang |
| 69 | + env: CONFIGURATION=Formatting LLVM_VERSION=3.8.0 |
| 70 | + |
| 71 | +before_install: |
| 72 | + # Do indentation check |
| 73 | + - | |
| 74 | + if [ "$CONFIGURATION" = "Formatting" ]; then |
| 75 | + wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - |
| 76 | + echo deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.8 main | sudo tee --append /etc/apt/sources.list |
| 77 | + sudo apt-get update && sudo apt-get -y install clang-format-3.8 |
| 78 | + python ci/check-formatting.py -c $(which clang-format-3.8) |
| 79 | + exit $? |
| 80 | + fi |
| 81 | +
|
| 82 | + # Override Travis' CXX Flag |
| 83 | + - CXX=$COMPILER |
| 84 | + |
| 85 | + # Install homebrew packages for Mac OS X |
| 86 | + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install cmake ninja qt5; fi |
| 87 | + |
| 88 | + # Install QT for Linux manually, since the QT packages are not whitelisted by Travis |
| 89 | + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./ci/install-qt-5.sh $WORDSIZE; fi |
| 90 | + |
| 91 | +install: |
| 92 | + - git submodule update --init --recursive |
| 93 | + |
| 94 | +script: |
| 95 | + - | |
| 96 | + set -e |
| 97 | + if [ "$TRAVIS_OS_NAME" = "osx" ]; then |
| 98 | + PATH=`brew --prefix qt5`/bin:${PATH} |
| 99 | + python ci/configure.py --configuration $CONFIGURATION --generator Ninja --with-qt |
| 100 | + python ci/build.py --configuration $CONFIGURATION --arguments "all -v" |
| 101 | + else |
| 102 | + if [ "$WORDSIZE" -eq 64 ]; then |
| 103 | + PATH=$PWD/5.5/gcc_64:${PATH} |
| 104 | + python ci/configure.py --configuration $CONFIGURATION --wordsize $WORDSIZE --with-qt |
| 105 | + else |
| 106 | + PATH=$PWD/5.5/gcc:${PATH} |
| 107 | + python ci/configure.py --configuration $CONFIGURATION --wordsize $WORDSIZE --with-qt |
| 108 | + fi |
| 109 | + python ci/build.py --configuration $CONFIGURATION --arguments "VERBOSE=1 -j8" |
| 110 | + fi |
| 111 | +
|
| 112 | + # Build Tests and run with Valgrind (Linux 64-bit only). Mac OSX supports |
| 113 | + # valgrind via homebrew, but there is no bottle formula, so it must be |
| 114 | + # compiled by brew and this takes way too much time on the build server. |
| 115 | + - | |
| 116 | + set -e |
| 117 | + if [ "$TRAVIS_OS_NAME" = "linux" ]; then |
| 118 | + python ci/run-tests.py --target LinkCoreTest --valgrind |
| 119 | + python ci/run-tests.py --target LinkDiscoveryTest --valgrind |
| 120 | + else |
| 121 | + python ci/run-tests.py --target LinkCoreTest |
| 122 | + python ci/run-tests.py --target LinkDiscoveryTest |
| 123 | + fi |
0 commit comments