1addons: 2 apt: 3 packages: 4 - libgl1-mesa-dev 5 - g++-4.8 6 - ninja-build 7 - libsdl2-dev 8 - libglfw3-dev 9 - libopenal-dev 10 - libbullet-dev 11 - libbox2d-dev 12 - libglew-dev # needed by the triangle-sokol example 13 14matrix: 15 include: 16 - language: cpp 17 os: linux 18 dist: xenial 19 compiler: gcc 20 env: 21 - JOBID=linux-gl 22 - TARGET=desktop 23 - language: cpp 24 os: linux 25 dist: xenial 26 compiler: gcc 27 env: 28 - JOBID=linux-nondeprecated 29 - TARGET=desktop 30 - BUILD_DEPRECATED=OFF 31 - language: cpp 32 os: linux 33 dist: xenial 34 compiler: gcc 35 env: 36 - JOBID=linux-gles2 37 - TARGET=desktop-gles 38 - TARGET_GLES2=ON 39 - language: cpp 40 os: linux 41 dist: xenial 42 compiler: gcc 43 env: 44 - JOBID=linux-gles3 45 - TARGET=desktop-gles 46 - TARGET_GLES2=OFF 47 - language: cpp 48 os: linux 49 dist: xenial 50 compiler: gcc 51 env: 52 - JOBID=linux-vulkan 53 - TARGET=desktop-vulkan 54 addons: 55 apt: 56 packages: 57 - ninja-build 58 - language: cpp 59 os: osx 60 compiler: clang 61 env: 62 - JOBID=macos-gl 63 - TARGET=desktop 64 #- language: cpp 65 #os: osx 66 #osx_image: xcode7.3 67 #env: 68 #- JOBID=ios-gles2 69 #- TARGET=ios-simulator 70 #- TARGET_GLES2=ON 71 #- language: cpp 72 #os: osx 73 #osx_image: xcode7.3 74 #env: 75 #- JOBID=ios-gles3 76 #- TARGET=ios-simulator 77 #- TARGET_GLES2=OFF 78 - language: cpp 79 os: osx 80 osx_image: xcode9.3 81 env: 82 - JOBID=emscripten-webgl1 83 - TARGET=emscripten 84 - TARGET_GLES2=ON 85 - language: cpp 86 os: osx 87 osx_image: xcode9.3 88 env: 89 - JOBID=emscripten-webgl2 90 - TARGET=emscripten 91 - TARGET_GLES2=OFF 92 #- language: android 93 #os: linux 94 ## Setting xenial here will cause it to use 12.04, with GCC 4.6 and other 95 ## prehistoric nightmares. So staying with 14.04 for the time being. 96 #dist: trusty 97 #env: 98 #- JOBID=android-gles2 99 #- TARGET=android 100 #- TARGET_GLES2=ON 101 #addons: 102 #apt: 103 #packages: 104 #- ninja-build 105 #android: 106 #components: 107 #- build-tools-26.0.2 108 #- android-22 109 #- language: android 110 #os: linux 111 ## Setting xenial here will cause it to use 12.04, with GCC 4.6 and other 112 ## prehistoric nightmares. So staying with 14.04 for the time being. 113 #dist: trusty 114 #env: 115 #- JOBID=android-gles3 116 #- TARGET=android 117 #- TARGET_GLES2=OFF 118 #addons: 119 #apt: 120 #packages: 121 #- ninja-build 122 #android: 123 #components: 124 #- build-tools-26.0.2 125 #- android-22 126 127notifications: 128 webhooks: 129 urls: 130 - https://webhooks.gitter.im/e/00ec7a9066bb0fec98f3 131 on_success: change 132 on_failure: always 133 on_start: never 134 135cache: 136 directories: 137 - $HOME/sdl2 138 - $HOME/cmake 139 - $HOME/imgui 140 141before_install: 142- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then yes | sdkmanager "cmake;3.6.4111459"; fi 143 144install: 145- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "android" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export CXX=g++-4.8; fi 146- if [ "$BUILD_DEPRECATED" != "OFF" ]; then export BUILD_DEPRECATED=ON; fi 147# box2d is not in homebrew anymore: https://github.com/erincatto/Box2D/issues/431 148- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PLATFORM_GL_API=GLX; export WITH_BOX2D=ON; fi 149- if [ ! "$WITH_BOX2D" == "ON" ]; then export WITH_BOX2D=OFF; fi 150- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then wget -nc https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip && unzip -q android-*.zip; fi 151# Download CMake 3.4.3 to ensure we're still compatible with it (Travis has 152# 3.9 since December 2017). Also, the PATH setting can't be cached, so it's 153# separate (bit me two times already). Android needs CMake 3.7, but 154# https://gitlab.kitware.com/cmake/cmake/issues/17253 is fixed in 3.9.2, so 155# grab that. FindVulkan is since 3.7, in that case just use the system package. 156- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ] && [ ! "$TARGET" == "android" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-3.4.3-Linux-x86_64.tar.gz && cd $TRAVIS_BUILD_DIR ; fi 157- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v3.9/cmake-3.9.2-Linux-x86_64.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-3.9.2-Linux-x86_64.tar.gz && cd $TRAVIS_BUILD_DIR ; fi 158- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export PATH=$HOME/cmake/bin:$PATH && cmake --version; fi 159- if [ "$TRAVIS_OS_NAME" == "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja; fi 160- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install glew; fi 161- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then export PLATFORM_GL_API=CGL; fi 162- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then gem install xcpretty; fi 163- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "emscripten" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install emscripten && export LLVM=/usr/local/opt/emscripten/libexec/llvm/bin && emcc; fi 164- if [ "$TARGET_GLES2" == "ON" ]; then export TARGET_GLES3=OFF; fi 165- if [ "$TARGET_GLES2" == "OFF" ]; then export TARGET_GLES3=ON; fi 166- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export WITH_DART=ON; fi 167- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export WITH_DART=OFF; fi 168 169# SDL (cached) 170- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2; fi 171- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then curl -O https://www.libsdl.org/release/SDL2-2.0.4.tar.gz && tar -xzvf SDL2-2.0.4.tar.gz && cd SDL2-2.0.4/Xcode-iOS/SDL && xcodebuild -sdk iphonesimulator9.3 | xcpretty && mkdir -p ../../../sdl2/lib && cp build/Release-iphonesimulator/libSDL2.a ../../../sdl2/lib && mkdir -p ../../../sdl2/include/SDL2 && cp -R ../../include/* ../../../sdl2/include/SDL2 && cd ../../..; fi 172 173# GLFW, Bullet and DART on macOS 174- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install glfw3 bullet dartsim; fi 175 176# ImGui 177- if [ ! -e "$HOME/imgui/imgui.h" ]; then cd $HOME ; wget -nc --no-check-certificate -O imgui.tar.gz https://github.com/ocornut/imgui/archive/v1.72.tar.gz && mkdir -p imgui && cd imgui && tar --strip-components=1 -xzf ../imgui.tar.gz && cd $TRAVIS_BUILD_DIR; fi 178 179script: 180- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop" ]; then ./package/ci/travis-desktop.sh; fi 181- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ]; then ./package/ci/travis-desktop-gles.sh; fi 182# Vulkan needs to be in a separate build, because it needs new CMake (for the 183# Find module) and in the future also C++14. Unfortunately that means we can't 184# apply the sanitizer or non-deprecated build on it. 185- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-vulkan" ]; then ./package/ci/travis-desktop-vulkan.sh; fi 186- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then ./package/ci/travis-android-arm.sh; fi 187- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then ./package/ci/travis-desktop.sh; fi 188- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then ./package/ci/travis-ios-simulator.sh; fi 189- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "emscripten" ]; then ./package/ci/travis-emscripten.sh; fi 190# Travis somehow is not able to gather all output, try to force it using this 191- sync 192