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.
 
 
 
 
 

240 lines
10 KiB

# kate: indent-width 2;
addons:
apt:
packages:
- libgl1-mesa-dev
- g++-4.7
- ninja-build
- lcov
- "libc6:i386" # CMake 2.8.12 is 32bit
- 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-gl
- TARGET=desktop
- CMAKE_CXX_FLAGS="--coverage"
- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.7"
- language: cpp
os: linux
dist: trusty
compiler: gcc
env:
- JOBID=linux-nondeprecated
- TARGET=desktop
- BUILD_DEPRECATED=OFF
- language: cpp
os: linux
dist: trusty
compiler: clang
env:
- JOBID=linux-sanitizers
- TARGET=desktop-sanitizers
- CMAKE_CXX_FLAGS=-fsanitize=address
addons:
apt:
sources:
- llvm-toolchain-trusty
packages:
- libgl1-mesa-dev
- ninja-build
- 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-vulkan
- TARGET=desktop-vulkan
- CMAKE_CXX_FLAGS="--coverage"
addons:
apt:
packages:
- ninja-build
- lcov
- language: cpp
os: linux
dist: trusty
compiler: gcc
env:
- JOBID=linux-gles2
- TARGET=desktop-gles
- TARGET_GLES2=ON
- CMAKE_CXX_FLAGS="--coverage"
- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.7"
- language: cpp
os: linux
dist: trusty
compiler: gcc
env:
- JOBID=linux-gles3
- TARGET=desktop-gles
- TARGET_GLES2=OFF
- CMAKE_CXX_FLAGS="--coverage"
- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.7"
- language: cpp
os: osx
# The new plugin testing workflow is dynamically loading and unloading them
# in the tests. When that's combined with coverage and LLVM < 5.0.1, all
# such tests crash on exit: https://bugs.llvm.org/show_bug.cgi?id=27224
# But only in some cases (for example not at all in tests for Corrade
# PluginManager itself). The commit fixing it is from Jan 3 2018 and all
# Xcode versions before Xcode 9.3 beta (released on Jan 24) are affected.
# https://github.com/llvm-mirror/compiler-rt/commit/860d7953a6f36980f406bfbff76f3c00f15eed57
osx_image: xcode9.3beta
compiler: clang
env:
- JOBID=macos-gl
- TARGET=desktop
- CMAKE_CXX_FLAGS="--coverage"
- language: cpp
os: osx
osx_image: xcode7.3
env:
- JOBID=ios-gles2
- TARGET=ios-simulator
- TARGET_GLES2=ON
- language: cpp
os: osx
osx_image: xcode7.3
env:
- JOBID=ios-gles3
- TARGET=ios-simulator
- TARGET_GLES2=OFF
- language: cpp
os: osx
osx_image: xcode9.3
env:
- JOBID=emscripten-webgl1
- TARGET=emscripten
- TARGET_GLES2=ON
- language: cpp
os: osx
osx_image: xcode9.3
env:
- JOBID=emscripten-webgl2
- TARGET=emscripten
- TARGET_GLES2=OFF
- language: android
os: linux
dist: trusty
env:
- JOBID=android-gles2
- TARGET=android
- TARGET_GLES2=ON
addons:
apt:
packages:
- ninja-build
android:
components:
- build-tools-22.0.1
- android-22
- sys-img-armeabi-v7a-android-22
- language: android
os: linux
dist: trusty
env:
- JOBID=android-gles3
- TARGET=android
- TARGET_GLES2=OFF
addons:
apt:
packages:
- ninja-build
android:
components:
- build-tools-22.0.1
- android-22
- sys-img-armeabi-v7a-android-22
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-sanitizers" ] && [ ! "$TARGET" == "android" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export CXX=g++-4.7; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-sanitizers" ]; then export CXX=clang++-3.8; fi
- if [ "$BUILD_DEPRECATED" != "OFF" ]; then export BUILD_DEPRECATED=ON; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop" ] && [ "$BUILD_DEPRECATED" == "ON" ]; then export WITH_GLUTAPPLICATION=ON; fi
- if [ "$WITH_GLUTAPPLICATION" != "ON" ]; then export WITH_GLUTAPPLICATION=OFF; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export PLATFORM_GL_API=GLX; fi
- 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
# Download CMake 2.8.12 to ensure we're still compatible with it (Travis has
# 3.9 since December 2017). Also, the PATH setting can't be cached, so it's
# separate (bit me two times already). ASan doesn't like when 32bit libraries
# are running, so for it we use the preinstalled CMake. Android needs CMake
# 3.7, but https://gitlab.kitware.com/cmake/cmake/issues/17253 is fixed in
# 3.9.2, so grab that.
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-sanitizers" ] && [ ! "$TARGET" == "android" ] && [ ! "$TARGET" == "desktop-vulkan" ] && [ ! -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 -xzf ../cmake-2.8.12.2-Linux-i386.tar.gz && cd $TRAVIS_BUILD_DIR ; fi
- 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
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ] && [ ! "$TARGET" == "desktop-sanitizers" ]; then export PATH=$HOME/cmake/bin:$PATH && cmake --version; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install lcov; 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 HOMEBREW_NO_AUTO_UPDATE=1 brew install emscripten && export LLVM=/usr/local/opt/emscripten/libexec/llvm/bin && emcc; 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 HOMEBREW_NO_AUTO_UPDATE=1 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 HOMEBREW_NO_AUTO_UPDATE=1 brew install glfw; fi
# Keeping GLFW 3.1 because that's what is on 16.04 and we want to keep
# supporting that. Latest GLFW is tested on macOS.
- 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
# Vulkan needs to be in a separate build, because it needs new CMake (for the
# Find module) and in the future also C++14. Unfortunately that means we can't
# apply the sanitizer or non-deprecated build on it.
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-vulkan" ]; then ./package/ci/travis-desktop-vulkan.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:
# Keep in sync with PKBUILD-coverage, please
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --directory . --capture --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --extract coverage.info "*/src/Magnum*/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/MagnumExternal/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/Test/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/build/src/*" --output-file coverage.info > /dev/null; fi
- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.info; fi