Use fmt in relevant examples
[openal-soft.git] / .travis.yml
blobf85da59354b92877df9548eb218c7a27bbb2ad08
1 language: cpp
2 matrix:
3   include:
4     - os: linux
5       dist: xenial
6     - os: linux
7       dist: trusty
8       env:
9         - BUILD_ANDROID=true
10     - os: freebsd
11       compiler: clang
12     - os: osx
13     - os: osx
14       osx_image: xcode11
15       env:
16         - BUILD_IOS=true
17 sudo: required
18 install:
19   - >
20     if [[ "${TRAVIS_OS_NAME}" == "linux" && -z "${BUILD_ANDROID}" ]]; then
21       # Install pulseaudio, portaudio, ALSA, JACK dependencies for
22       # corresponding backends.
23       # Install Qt5 dependency for alsoft-config.
24       sudo apt-get install -qq \
25         libpulse-dev \
26         portaudio19-dev \
27         libasound2-dev \
28         libjack-dev \
29         qtbase5-dev \
30         libdbus-1-dev
31     fi
32   - >
33     if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD_ANDROID}" == "true" ]]; then
34       curl -o ~/android-ndk.zip https://dl.google.com/android/repository/android-ndk-r21-linux-x86_64.zip
35       unzip -q ~/android-ndk.zip -d ~ \
36         'android-ndk-r21/build/cmake/*' \
37         'android-ndk-r21/build/core/toolchains/arm-linux-androideabi-*/*' \
38         'android-ndk-r21/platforms/android-16/arch-arm/*' \
39         'android-ndk-r21/source.properties' \
40         'android-ndk-r21/sources/android/support/include/*' \
41         'android-ndk-r21/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/*' \
42         'android-ndk-r21/sources/cxx-stl/llvm-libc++/include/*' \
43         'android-ndk-r21/sysroot/*' \
44         'android-ndk-r21/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/*' \
45         'android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/*'
46       export OBOE_LOC=~/oboe
47       git clone --depth 1 -b 1.3-stable https://github.com/google/oboe "$OBOE_LOC"
48     fi
49   - >
50     if [[ "${TRAVIS_OS_NAME}" == "freebsd" ]]; then
51       # Install Ninja as it's used downstream.
52       # Install dependencies for all supported backends.
53       # Install Qt5 dependency for alsoft-config.
54       # Install ffmpeg for examples.
55       sudo pkg install -y \
56         alsa-lib \
57         ffmpeg \
58         jackit \
59         libmysofa \
60         ninja \
61         portaudio \
62         pulseaudio \
63         qt5-buildtools \
64         qt5-qmake \
65         qt5-widgets \
66         sdl2 \
67         sndio \
68         $NULL
69     fi
70 script:
71   - cmake --version
72   - >
73     if [[ "${TRAVIS_OS_NAME}" == "linux" && -z "${BUILD_ANDROID}" ]]; then
74       cmake \
75         -DALSOFT_REQUIRE_ALSA=ON \
76         -DALSOFT_REQUIRE_OSS=ON \
77         -DALSOFT_REQUIRE_PORTAUDIO=ON \
78         -DALSOFT_REQUIRE_PULSEAUDIO=ON \
79         -DALSOFT_REQUIRE_JACK=ON \
80         -DALSOFT_EMBED_HRTF_DATA=YES \
81         .
82     fi
83   - >
84     if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD_ANDROID}" == "true" ]]; then
85       cmake \
86         -DANDROID_STL=c++_shared \
87         -DCMAKE_TOOLCHAIN_FILE=~/android-ndk-r21/build/cmake/android.toolchain.cmake \
88         -DOBOE_SOURCE="$OBOE_LOC" \
89         -DALSOFT_REQUIRE_OBOE=ON \
90         -DALSOFT_REQUIRE_OPENSL=ON \
91         -DALSOFT_EMBED_HRTF_DATA=YES \
92         .
93     fi
94   - >
95     if [[ "${TRAVIS_OS_NAME}" == "freebsd" ]]; then
96       cmake -GNinja \
97         -DALSOFT_REQUIRE_ALSA=ON \
98         -DALSOFT_REQUIRE_JACK=ON \
99         -DALSOFT_REQUIRE_OSS=ON \
100         -DALSOFT_REQUIRE_PORTAUDIO=ON \
101         -DALSOFT_REQUIRE_PULSEAUDIO=ON \
102         -DALSOFT_REQUIRE_SDL2=ON \
103         -DALSOFT_REQUIRE_SNDIO=ON \
104         -DALSOFT_EMBED_HRTF_DATA=YES \
105         .
106     fi
107   - >
108     if [[ "${TRAVIS_OS_NAME}" == "osx" && -z "${BUILD_IOS}" ]]; then
109       cmake \
110         -DALSOFT_REQUIRE_COREAUDIO=ON \
111         -DALSOFT_EMBED_HRTF_DATA=YES \
112         .
113     fi
114   - >
115     if [[ "${TRAVIS_OS_NAME}" == "osx" && "${BUILD_IOS}" == "true" ]]; then
116       cmake \
117         -GXcode \
118         -DCMAKE_SYSTEM_NAME=iOS \
119         -DALSOFT_OSX_FRAMEWORK=ON \
120         -DALSOFT_REQUIRE_COREAUDIO=ON \
121         -DALSOFT_EMBED_HRTF_DATA=YES \
122         "-DCMAKE_OSX_ARCHITECTURES=armv7;arm64" \
123         .
124     fi
125   - cmake --build . --clean-first