You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

88 lines
4.7 KiB

# kate: indent-width 2;
language: cpp
matrix:
include:
- os: linux
compiler: gcc
env:
- TARGET=desktop
# Otherwise the job gets killed (probably because using too much memory)
- JOBS_LIMIT=4
- os: osx
compiler: clang
env: TARGET=desktop
- os: osx
osx_image: xcode7.3
env:
- TARGET=ios-simulator
- TARGET_GLES2=ON
- os: osx
osx_image: xcode7.3
env:
- TARGET=ios-simulator
- TARGET_GLES2=OFF
- os: osx
env:
- TARGET=emscripten
- TARGET_GLES2=ON
- os: osx
env:
- TARGET=emscripten
- TARGET_GLES2=OFF
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- kubuntu-backports
packages:
- g++-4.7
- cmake
- libopenal-dev
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/00ec7a9066bb0fec98f3
on_success: change
on_failure: always
on_start: never
cache:
directories:
- $HOME/sdl2
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then pip install --user cpp-coveralls; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export CXX=g++-4.7; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PLATFORM_GL_API=GLX; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export COVERAGE="--coverage"; 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
- if [ "$TARGET" == "desktop" ]; then printf "[General]\ndrivers=null" > ~/.alsoftrc; fi
# SDL (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
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! -e "$HOME/sdl2/include" ]; then curl -O http://www.libsdl.org/release/SDL2-2.0.4.tar.gz && tar -xzvf SDL2-2.0.4.tar.gz && cd SDL2-2.0.4 && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/sdl2 -DCMAKE_BUILD_TYPE=Release && cmake --build . --target install && cd ../..; fi
# GLFW (cached)
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then brew install homebrew/versions/glfw3; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! -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 && cmake --build . --target install && cd ../..; fi
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./package/ci/travis-desktop.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" ]; then coveralls --gcov /usr/bin/gcov-4.7 -E "(.*/(Test|magnum/build|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'; fi