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.
 
 
 
 
 

330 lines
14 KiB

addons:
apt:
packages:
- libgl1-mesa-dev
- g++-4.8
- ninja-build
- lcov
- libsdl2-dev
- libglfw3-dev
- libopenal-dev
- libvulkan-dev
matrix:
# The commented-out jobs are currently handled on Circle CI
include:
#- language: cpp
#os: linux
#dist: xenial
#compiler: gcc
#env:
#- JOBID=linux-gl
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8"
#- CONFIGURATION=Debug
#- language: cpp
#os: linux
#dist: xenial
#compiler: gcc
#env:
#- JOBID=linux-nondeprecated
#- TARGET=desktop
#- BUILD_DEPRECATED=OFF
#- CMAKE_CXX_FLAGS="-DCORRADE_NO_ASSERT"
#- CONFIGURATION=Release
#- language: cpp
#os: linux
#dist: xenial
#compiler: clang
#env:
#- JOBID=linux-sanitizers
#- TARGET=desktop-sanitizers
#- CMAKE_CXX_FLAGS=-fsanitize=address
#- CONFIGURATION=Debug
#addons:
#apt:
#sources:
#- llvm-toolchain-xenial
#packages:
#- libgl1-mesa-dev
#- ninja-build
#- clang-3.8
#- libsdl2-dev
#- libglfw3-dev
#- libopenal-dev
#- libvulkan-dev
#- language: cpp
#os: linux
#dist: xenial
#compiler: clang
#env:
#- JOBID=linux-threadsanitizer
#- TARGET=desktop-sanitizers
#- CMAKE_CXX_FLAGS=-fsanitize=thread
#- CONFIGURATION=Debug
#addons:
#apt:
#sources:
#- llvm-toolchain-xenial
#packages:
#- libgl1-mesa-dev
#- ninja-build
#- clang-3.8
#- libsdl2-dev
#- libglfw3-dev
#- libopenal-dev
#- libvulkan-dev
#- language: cpp
#os: linux
#dist: bionic
#compiler: gcc
#env:
#- JOBID=linux-vulkan
#- TARGET=desktop-vulkan
#- CMAKE_CXX_FLAGS="--coverage"
#addons:
#apt:
#packages:
#- ninja-build
#- lcov
#- libsdl2-dev
#- libglfw3-dev
#- libvulkan-dev
#- language: cpp
#os: linux
#dist: xenial
#compiler: gcc
#env:
#- JOBID=linux-static
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8"
#- BUILD_STATIC=ON
#- CONFIGURATION=Debug
#- language: cpp
#os: linux
#dist: xenial
#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.8"
#addons:
#apt:
#packages:
#- libgl1-mesa-dev
#- g++-4.8
#- ninja-build
#- lcov
#- libsdl2-dev
#- libglfw3-dev
#- libopenal-dev
## We don't need Vulkan here
#- language: cpp
#os: linux
#dist: xenial
#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.8"
#- language: cpp
#os: osx
## This is currently (Sep 2020) the Travis default, 9.3 didn't have
## molten-vk in (non-updated) Homebrew.
#osx_image: xcode9.4
#compiler: clang
#env:
#- JOBID=macos-gl
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- CONFIGURATION=Debug
#- language: cpp
#os: osx
## See above
#osx_image: xcode9.4
#compiler: clang
#env:
#- JOBID=macos-static
#- TARGET=desktop
#- CMAKE_CXX_FLAGS="--coverage"
#- BUILD_STATIC=ON
#- CONFIGURATION=Debug
#- language: cpp
#os: osx
## SwiftShader is built on 10.15 and can't be used on older versions due to
## dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
#osx_image: xcode11.6
#compiler: clang
#env:
#- JOBID=macos-vulkan
#- TARGET=desktop-vulkan
#- CMAKE_CXX_FLAGS="--coverage"
#- CONFIGURATION=Debug
- 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
# TODO: these should be redone on Linux + Docker, like with Corrade
#- language: cpp
#os: osx
## Since August 1st, 2019, tests that iterate over 65536 elements
## (MathHalfTest, MathPackingTest and MathColorTest) are segfaulting on the
## xcode9.3 image. Using whatever image is the default instead.
##osx_image: xcode9.3
#env:
#- JOBID=emscripten-webgl1
#- TARGET=emscripten
#- TARGET_GLES2=ON
#- language: cpp
#os: osx
## Since August 1st, 2019, tests that iterate over 65536 elements
## (MathHalfTest, MathPackingTest and MathColorTest) are segfaulting on the
## xcode9.3 image. Using whatever image is the default instead.
##osx_image: xcode9.3
#env:
#- JOBID=emscripten-webgl2
#- TARGET=emscripten
#- TARGET_GLES2=OFF
- language: android
os: linux
# Setting xenial here will cause it to use 12.04, with GCC 4.6 and other
# prehistoric nightmares. So staying with 14.04 for the time being.
dist: trusty
env:
- JOBID=android-gles2
- TARGET=android-gles
- 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
# Setting xenial here will cause it to use 12.04, with GCC 4.6 and other
# prehistoric nightmares. So staying with 14.04 for the time being.
dist: trusty
env:
- JOBID=android-gles3
- TARGET=android-gles
- TARGET_GLES2=OFF
addons:
apt:
packages:
- ninja-build
android:
components:
- build-tools-22.0.1
- android-22
- sys-img-armeabi-v7a-android-22
- language: android
os: linux
# Setting xenial here will cause it to use 12.04, with GCC 4.6 and other
# prehistoric nightmares. So staying with 14.04 for the time being.
dist: trusty
env:
- JOBID=android-vulkan
- TARGET=android-vulkan
addons:
apt:
packages:
- ninja-build
android:
components:
# Android API level 24 is the first with Vulkan support, but the crap
# emulator doesn't even start, so it's useless. See
# travis-android-vulkan.sh for how it's done instead.
- build-tools-22.0.1
- android-22
- sys-img-armeabi-v7a-android-22
cache:
directories:
- $HOME/sdl2
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-sanitizers" ] && [ ! "$TARGET" == "android-gles" ] && [ ! "$TARGET" == "android-vulkan" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export CXX=g++-4.8; 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 [ "$BUILD_STATIC" != "ON" ]; then export BUILD_STATIC=OFF; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then export PLATFORM_GL_API=GLX; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ]; then export PLATFORM_GL_API=EGL; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "android-gles" ] || [ "$TARGET" == "android-vulkan" ] ); then wget -nc https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip && unzip -q android-*.zip; fi
# Download CMake 3.4.3 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). Android needs CMake 3.7, but
# https://gitlab.kitware.com/cmake/cmake/issues/17253 is fixed in 3.9.2, so
# grab that. FindVulkan is since 3.7, in that case just use the system package.
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ] && [ ! "$TARGET" == "android-gles" ] && [ ! "$TARGET" == "android-vulkan" ] && [ ! -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
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "android-gles" ] || [ "$TARGET" == "android-vulkan" ] ) && [ ! -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" ]; 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 [ "$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" ] || [ "$TARGET" == "desktop-vulkan" ] ); 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" ] || [ "$TARGET" == "desktop-vulkan" ] ); then HOMEBREW_NO_AUTO_UPDATE=1 brew install glfw; fi
# SwiftShader on Linux GLES (16.04) and Vulkan (18.04) (cached). Zip from
# https://github.com/mosra/magnum-ci/tree/swiftshader and self-hosted because
# GH Actions would make it too simple for people if you could just download the
# artifacts directly, right? RIGHT?
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ] && [ ! -e "$HOME/swiftshader/lib/libGLESv2.so" ]; then cd $HOME ; wget https://ci.magnum.graphics/swiftshader-gles-r5464.a6940c8e6e-ubuntu-16.04.zip && mkdir -p swiftshader && cd swiftshader && unzip ../swiftshader-gles-r5464.a6940c8e6e-ubuntu-16.04.zip && cd $TRAVIS_BUILD_DIR ; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-vulkan" ] && [ ! -e "$HOME/swiftshader/lib/libvk_swiftshader.so" ]; then cd $HOME ; wget https://ci.magnum.graphics/swiftshader-vulkan-r5464.a6940c8e6e-ubuntu-18.04.zip && mkdir -p swiftshader && cd swiftshader && unzip ../swiftshader-vulkan-r5464.a6940c8e6e-ubuntu-18.04.zip && cd $TRAVIS_BUILD_DIR ; fi
# MoltenVk on macOS for the general desktop build (we just need to link against
# something as the tests aren't run anyway, desktop-vulkan uses Vulkan-Loader
# so this is an opportunity to test both)
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install molten-vk; fi
# SwiftShader on Mac, also self-hosted from GH Actions. We also need Vulkan
# loader there.
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop-vulkan" ] && [ ! -e "$HOME/swiftshader/lib/libvk_swiftshader.dylib" ]; then cd $HOME ; wget https://ci.magnum.graphics/swiftshader-r5464.a6940c8e6e-macos-10.15.zip && mkdir -p swiftshader && cd swiftshader && unzip ../swiftshader-r5464.a6940c8e6e-macos-10.15.zip && cd $TRAVIS_BUILD_DIR ; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop-vulkan" ] && [ ! -e "$HOME/vulkan-loader/lib/libvulkan.dylib" ]; then cd $HOME ; wget https://ci.magnum.graphics/vulkan-loader-1.2.153-macos-10.15.zip && mkdir -p vulkan-loader && cd vulkan-loader && unzip ../vulkan-loader-1.2.153-macos-10.15.zip && cd $TRAVIS_BUILD_DIR ; fi
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then ./package/ci/travis-desktop.sh; fi
- if [ "$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-gles" ]; then ./package/ci/travis-android-gles.sh; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android-vulkan" ]; then ./package/ci/travis-android-vulkan.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, appveyor-lcov.sh and circleci.yml, 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