Implement opening and closing devices in the router
[openal-soft.git] / .travis.yml
blobe0a64c845c92a26c5b6765ec7361c0374ae546ca
1 language: c
2 matrix:
3   include:
4     - os: linux
5       dist: trusty
6     - os: linux
7       dist: trusty
8       env:
9         - BUILD_ANDROID=true
10     - os: osx
11 sudo: required
12 cache:
13   directories:
14     - $HOME/android-ndk-r14
15 install:
16   - >
17     if [[ "${TRAVIS_OS_NAME}" == "linux" && -z "${BUILD_ANDROID}" ]]; then
18       # Install pulseaudio, portaudio, ALSA, JACK dependencies for
19       # corresponding backends.
20       # Install Qt5 dependency for alsoft-config.
21       sudo apt-get install -qq \
22         libpulse-dev \
23         portaudio19-dev \
24         libasound2-dev \
25         libjack-dev \
26         qtbase5-dev
27     fi
28   - >
29     if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD_ANDROID}" == "true" ]]; then
30       if [[ ! -d ~/android-ndk-r14 || -z "$(ls -A ~/android-ndk-r14)" ]]; then
31         curl -o ~/android-ndk.zip https://dl.google.com/android/repository/android-ndk-r14-linux-x86_64.zip
32         unzip -q ~/android-ndk.zip -d ~ \
33           'android-ndk-r14/build/cmake/*' \
34           'android-ndk-r14/platforms/android-9/arch-arm/*' \
35           'android-ndk-r14/source.properties' \
36           'android-ndk-r14/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/*' \
37           'android-ndk-r14/sysroot/*' \
38           'android-ndk-r14/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/*' \
39           'android-ndk-r14/toolchains/llvm/prebuilt/linux-x86_64/*'
40         sed -i -e 's/VERSION 3.6.0/VERSION 3.2/' ~/android-ndk-r14/build/cmake/android.toolchain.cmake
41       fi
42     fi
43 script:
44   - >
45     if [[ "${TRAVIS_OS_NAME}" == "linux" && -z "${BUILD_ANDROID}" ]]; then
46       cmake \
47         -DALSOFT_REQUIRE_ALSA=ON \
48         -DALSOFT_REQUIRE_OSS=ON \
49         -DALSOFT_REQUIRE_PORTAUDIO=ON \
50         -DALSOFT_REQUIRE_PULSEAUDIO=ON \
51         -DALSOFT_REQUIRE_JACK=ON \
52         -DALSOFT_EMBED_HRTF_DATA=YES \
53         .
54     fi
55   - >
56     if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD_ANDROID}" == "true" ]]; then
57       cmake \
58         -DCMAKE_TOOLCHAIN_FILE=~/android-ndk-r14/build/cmake/android.toolchain.cmake \
59         -DALSOFT_REQUIRE_OPENSL=ON \
60         -DALSOFT_EMBED_HRTF_DATA=YES \
61         .
62     fi
63   - >
64     if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
65       cmake \
66         -DALSOFT_REQUIRE_COREAUDIO=ON \
67         -DALSOFT_EMBED_HRTF_DATA=YES \
68         .
69     fi
70   - make -j2