|
|
|
|
# kate: indent-width 2;
|
|
|
|
|
|
|
|
|
|
addons:
|
|
|
|
|
apt:
|
|
|
|
|
packages:
|
|
|
|
|
- libgl1-mesa-dev
|
|
|
|
|
- g++-4.7
|
|
|
|
|
- libsdl2-dev
|
|
|
|
|
- freeglut3-dev
|
|
|
|
|
- libopenal-dev
|
|
|
|
|
# GLFW dependencies, libxi-dev will be needed in the future
|
|
|
|
|
- libxrandr-dev
|
|
|
|
|
- libxinerama-dev
|
|
|
|
|
- libxcursor-dev
|
|
|
|
|
#- libxi-dev
|
|
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
|
include:
|
|
|
|
|
- language: cpp
|
|
|
|
|
os: linux
|
|
|
|
|
dist: trusty
|
|
|
|
|
compiler: gcc
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=linux-desktop
|
|
|
|
|
- TARGET=desktop
|
|
|
|
|
- language: cpp
|
|
|
|
|
os: linux
|
|
|
|
|
dist: trusty
|
|
|
|
|
compiler: gcc
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=linux-desktop-nondeprecated
|
|
|
|
|
- TARGET=desktop
|
|
|
|
|
- BUILD_DEPRECATED=OFF
|
|
|
|
|
- language: cpp
|
|
|
|
|
os: linux
|
|
|
|
|
dist: trusty
|
|
|
|
|
compiler: clang
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=linux-desktop-sanitizers
|
|
|
|
|
- TARGET=desktop-sanitizers
|
|
|
|
|
- CMAKE_CXX_FLAGS=-fsanitize=address
|
|
|
|
|
addons:
|
|
|
|
|
apt:
|
|
|
|
|
sources:
|
|
|
|
|
- llvm-toolchain-trusty
|
|
|
|
|
packages:
|
|
|
|
|
- libgl1-mesa-dev
|
|
|
|
|
- clang-3.8
|
|
|
|
|
- libsdl2-dev
|
|
|
|
|
- libopenal-dev
|
|
|
|
|
# GLFW dependencies, libxi-dev will be needed in the future
|
|
|
|
|
- libxrandr-dev
|
|
|
|
|
- libxinerama-dev
|
|
|
|
|
- libxcursor-dev
|
|
|
|
|
#- libxi-dev
|
|
|
|
|
- language: cpp
|
|
|
|
|
os: linux
|
|
|
|
|
dist: trusty
|
|
|
|
|
compiler: gcc
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=linux-es2
|
|
|
|
|
- TARGET=desktop-gles
|
|
|
|
|
- TARGET_GLES2=ON
|
|
|
|
|
- language: cpp
|
|
|
|
|
os: linux
|
|
|
|
|
dist: trusty
|
|
|
|
|
compiler: gcc
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=linux-es3
|
|
|
|
|
- TARGET=desktop-gles
|
|
|
|
|
- TARGET_GLES2=OFF
|
|
|
|
|
- language: cpp
|
|
|
|
|
os: osx
|
|
|
|
|
compiler: clang
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=macos-desktop
|
|
|
|
|
- TARGET=desktop
|
|
|
|
|
- language: cpp
|
|
|
|
|
os: osx
|
|
|
|
|
osx_image: xcode7.3
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=ios-es2
|
|
|
|
|
- TARGET=ios-simulator
|
|
|
|
|
- TARGET_GLES2=ON
|
|
|
|
|
- language: cpp
|
|
|
|
|
os: osx
|
|
|
|
|
osx_image: xcode7.3
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=ios-es3
|
|
|
|
|
- TARGET=ios-simulator
|
|
|
|
|
- TARGET_GLES2=OFF
|
|
|
|
|
- language: cpp
|
|
|
|
|
os: osx
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=emscripten-webgl1
|
|
|
|
|
- TARGET=emscripten
|
|
|
|
|
- TARGET_GLES2=ON
|
|
|
|
|
- language: cpp
|
|
|
|
|
os: osx
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=emscripten-webgl2
|
|
|
|
|
- TARGET=emscripten
|
|
|
|
|
- TARGET_GLES2=OFF
|
|
|
|
|
- language: android
|
|
|
|
|
os: linux
|
|
|
|
|
# 14.04 doesn't know Android yet so we have to use 12.04 with all the
|
|
|
|
|
# annoyances: https://github.com/travis-ci/travis-ci/issues/5370
|
|
|
|
|
dist: precise
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=android-es2
|
|
|
|
|
- TARGET=android
|
|
|
|
|
- TARGET_GLES2=ON
|
|
|
|
|
addons:
|
|
|
|
|
apt:
|
|
|
|
|
sources:
|
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
|
packages:
|
|
|
|
|
- g++-4.7
|
|
|
|
|
android:
|
|
|
|
|
components:
|
|
|
|
|
- build-tools-19.0.0
|
|
|
|
|
- android-19
|
|
|
|
|
- sys-img-armeabi-v7a-android-19
|
|
|
|
|
- language: android
|
|
|
|
|
os: linux
|
|
|
|
|
# 14.04 doesn't know Android yet so we have to use 12.04 with all the
|
|
|
|
|
# annoyances: https://github.com/travis-ci/travis-ci/issues/5370
|
|
|
|
|
dist: precise
|
|
|
|
|
env:
|
|
|
|
|
- JOBID=android-es3
|
|
|
|
|
- TARGET=android
|
|
|
|
|
- TARGET_GLES2=OFF
|
|
|
|
|
addons:
|
|
|
|
|
apt:
|
|
|
|
|
sources:
|
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
|
packages:
|
|
|
|
|
- g++-4.7
|
|
|
|
|
android:
|
|
|
|
|
components:
|
|
|
|
|
- build-tools-19.0.0
|
|
|
|
|
- android-19
|
|
|
|
|
- sys-img-armeabi-v7a-android-19
|
|
|
|
|
|
|
|
|
|
notifications:
|
|
|
|
|
webhooks:
|
|
|
|
|
urls:
|
|
|
|
|
- https://webhooks.gitter.im/e/00ec7a9066bb0fec98f3
|
|
|
|
|
on_success: change
|
|
|
|
|
on_failure: always
|
|
|
|
|
on_start: never
|
|
|
|
|
|
|
|
|
|
cache:
|
|
|
|
|
directories:
|
|
|
|
|
- $HOME/sdl2
|
|
|
|
|
- $HOME/glfw
|
|
|
|
|
- $HOME/cmake
|
|
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop" ] && [ "$BUILD_DEPRECATED" != "OFF" ]; then pip install --user urllib3[secure] && pip install --user cpp-coveralls && export CMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS --coverage"; fi
|
|
|
|
|
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-sanitizers" ]; then export CXX=g++-4.7; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-sanitizers" ]; then export CXX=clang++-3.8; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop" ]; then export WITH_GLUTAPPLICATION=ON; fi
|
|
|
|
|
- if [ "$WITH_GLUTAPPLICATION" != "ON" ]; then export WITH_GLUTAPPLICATION=OFF; fi
|
|
|
|
|
- if [ "$BUILD_DEPRECATED" != "OFF" ]; then export BUILD_DEPRECATED=ON; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PLATFORM_GL_API=GLX; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then wget -nc http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin && chmod +x android-*.bin && ./android-*.bin -y | grep -v Extracting; fi
|
|
|
|
|
# Because Android build has to use 12.04 and CMake 2.8.12 stopped working there
|
|
|
|
|
# since May 2017, I have to manually download a prebuilt version. Also, the
|
|
|
|
|
# PATH setting can't be cached, so it's separate (bit me two times already)
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v2.8/cmake-2.8.12.2-Linux-i386.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzvf ../cmake-2.8.12.2-Linux-i386.tar.gz && cd $TRAVIS_BUILD_DIR ; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then export PATH=$HOME/cmake/bin:$PATH; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then export PLATFORM_GL_API=CGL; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then gem install xcpretty; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "emscripten" ]; then brew install emscripten && export LLVM=/usr/local/opt/emscripten/libexec/llvm/bin && emcc; fi
|
|
|
|
|
# Workaround for "Symbol not found: _futimens", found here:
|
|
|
|
|
# https://github.com/kripken/emscripten/issues/5418#issuecomment-333247709
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "emscripten" ]; then brew install llvm && rm /usr/local/opt/emscripten/libexec/llvm/bin/llvm-ar && ln -s /usr/local/opt/llvm/bin/llvm-ar /usr/local/opt/emscripten/libexec/llvm/bin/llvm-ar; fi
|
|
|
|
|
- if [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] || [ "$TARGET" == "desktop-gles" ]; then printf "[General]\ndrivers=null" > ~/.alsoftrc; fi
|
|
|
|
|
|
|
|
|
|
# SDL on macOS and iOS (cached)
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then brew install sdl2; fi
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
|
|
# GLFW (cached)
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then brew install homebrew/versions/glfw3; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ) && [ ! -e "$HOME/glfw/include" ]; then wget https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip && unzip glfw-3.1.2.zip && cd glfw-3.1.2 && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/glfw -DCMAKE_BUILD_TYPE=Release -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DBUILD_SHARED_LIBS=ON && cmake --build . --target install && cd ../..; fi
|
|
|
|
|
|
|
|
|
|
script:
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then ./package/ci/travis-desktop.sh; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ]; then ./package/ci/travis-desktop-gles.sh; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then ./package/ci/travis-android-arm.sh; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then ./package/ci/travis-desktop.sh; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then ./package/ci/travis-ios-simulator.sh; fi
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "emscripten" ]; then ./package/ci/travis-emscripten.sh; fi
|
|
|
|
|
# Travis somehow is not able to gather all output, try to force it using this
|
|
|
|
|
- sync
|
|
|
|
|
|
|
|
|
|
after_success:
|
|
|
|
|
# Ignoring all stuff that needs GL context and thus can't be run on Travis
|
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop" ] && [ "$BUILD_DEPRECATED" != "OFF" ]; then coveralls --gcov /usr/bin/gcov-4.7 -i src/ -E "(.*/(Test|MagnumExternal|Shaders|Platform)/.*|.*/src/Magnum/(AbstractFramebuffer|AbstractObject|AbstractQuery|AbstractShaderProgram|AbstractTexture|Buffer|BufferImage|BufferTexture|Context|CubeMapTexture|CubeMapTextureArray|DebugOutput|DefaultFramebuffer|Framebuffer|Mesh|MeshView|MultisampleTexture|OpenGL|PixelStorage|PrimitiveQuery|RectangleTexture|Renderbuffer|Renderer|SampleQuery|Sampler|Shader|Texture|TextureArray|TimeQuery|TransformFeedback|Implementation/BufferState|Implementation/DebugState|Implementation/driverSpecific|Implementation/FramebufferState|Implementation/maxTextureSize|Implementation/MeshState|Implementation/QueryState|Implementation/RendererState|Implementation/ShaderProgramState|Implementation/ShaderState|Implementation/State|Implementation/TextureState|Implementation/TransformFeedbackState)\\.(cpp|h))" --gcov-options '\-lp' > /dev/null; fi
|