1addons: 2 apt: 3 packages: 4 - g++-4.8 5 - ninja-build 6 7matrix: 8 include: 9 - language: cpp 10 os: linux 11 dist: xenial 12 compiler: gcc 13 env: 14 - JOBID=linux 15 - TARGET=desktop 16 - CMAKE_CXX_FLAGS="--coverage" 17 - LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8" 18 - CONFIGURATION=Debug 19 addons: 20 apt: 21 packages: 22 - g++-4.8 23 - ninja-build 24 - lcov 25 - language: cpp 26 os: linux 27 compiler: gcc 28 dist: xenial 29 env: 30 - JOBID=linux-nondeprecated 31 - TARGET=desktop 32 - BUILD_DEPRECATED=OFF 33 - CMAKE_CXX_FLAGS="-DCORRADE_NO_ASSERT" 34 - CONFIGURATION=Release 35 - language: cpp 36 os: linux 37 compiler: gcc 38 dist: xenial 39 env: 40 - JOBID=linux-static 41 - TARGET=desktop 42 - CMAKE_CXX_FLAGS="--coverage" 43 - LCOV_EXTRA_OPTS="--gcov-tool /usr/bin/gcov-4.8" 44 - BUILD_STATIC=ON 45 - CONFIGURATION=Debug 46 - language: cpp 47 os: linux 48 compiler: clang 49 dist: xenial 50 env: 51 - JOBID=linux-sanitizers 52 - TARGET=desktop-sanitizers 53 - CMAKE_CXX_FLAGS="-fsanitize=address" 54 - CONFIGURATION=Debug 55 addons: 56 apt: 57 sources: 58 - llvm-toolchain-xenial 59 packages: 60 - ninja-build 61 - clang-3.8 62 - language: cpp 63 os: linux 64 compiler: clang 65 dist: xenial 66 env: 67 - JOBID=linux-threadsanitizer 68 - TARGET=desktop-sanitizers 69 - CMAKE_CXX_FLAGS="-fsanitize=thread" 70 - CONFIGURATION=Debug 71 addons: 72 apt: 73 sources: 74 - llvm-toolchain-xenial 75 packages: 76 - ninja-build 77 - clang-3.8 78 - language: cpp 79 os: osx 80 compiler: clang 81 env: 82 - JOBID=macos 83 - TARGET=desktop 84 - CMAKE_CXX_FLAGS="--coverage" 85 - CONFIGURATION=Debug 86 - language: cpp 87 os: osx 88 compiler: clang 89 env: 90 - JOBID=macos-static 91 - TARGET=desktop 92 - CMAKE_CXX_FLAGS="--coverage" 93 - BUILD_STATIC=ON 94 - CONFIGURATION=Debug 95 - language: cpp 96 os: osx 97 osx_image: xcode7.3 98 env: 99 - JOBID=ios 100 - TARGET=ios-simulator 101 - language: cpp 102 os: osx 103 # Using whatever is the default, since that could be hopefully most 104 # up-to-date 105 env: 106 - JOBID=emscripten 107 - TARGET=emscripten 108 - language: android 109 os: linux 110 # Setting xenial here will cause it to use 12.04, with GCC 4.6 and other 111 # prehistoric nightmares. So staying with 14.04 for the time being. 112 dist: trusty 113 env: 114 - JOBID=android 115 - TARGET=android 116 addons: 117 apt: 118 packages: 119 - ninja-build 120 android: 121 components: 122 - build-tools-22.0.1 123 - android-22 124 - sys-img-armeabi-v7a-android-22 125 # python preprocessor for magnum-singles, for a lack of better name 126 - language: python 127 python: 3.6 128 env: 129 - TARGET=acme 130 - JOBID=acme 131 addons: 132 apt: 133 packages: #none 134 135notifications: 136 webhooks: 137 urls: 138 - https://webhooks.gitter.im/e/00ec7a9066bb0fec98f3 139 on_success: change 140 on_failure: always 141 on_start: never 142 143cache: 144 directories: 145 - $HOME/cmake 146 147install: 148- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-sanitizers" ] && [ ! "$TARGET" == "android" ]; then export CXX=g++-4.8; fi 149- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-sanitizers" ]; then export CXX=clang++-3.8; fi 150- if [ "$BUILD_STATIC" != "ON" ]; then export BUILD_STATIC=OFF; fi 151- if [ "$BUILD_DEPRECATED" != "OFF" ]; then export BUILD_DEPRECATED=ON; fi 152# so the directory tests pass (and then some workaround for crazy filesystem issues) 153- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then mkdir -p ~/.config/autostart; fi 154- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then mkdir -p ~/.local; fi 155- 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 156# Download CMake 3.4.3 to ensure we're still compatible with it (Travis has 157# 3.9 since December 2017). Also, the PATH setting can't be cached, so it's 158# separate (bit me two times already). Android needs CMake 3.7, but 159# https://gitlab.kitware.com/cmake/cmake/issues/17253 is fixed in 3.9.2, so 160# grab that. 161- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$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 162- 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 163- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$HOME/cmake/bin:$PATH && cmake --version; fi 164- if [ "$TRAVIS_OS_NAME" == "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja; fi 165- if [ "$TRAVIS_OS_NAME" == "osx" ] && [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install lcov; fi 166- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then gem install xcpretty; fi 167# binaryen is a dependency for wasm targets, but homebrew devs don't give a 168# shit: https://github.com/Homebrew/homebrew-core/issues/47869 Also the 169# generated .emscripten doesn't have a newline at EOL so the workaround listed 170# in the issue doesn't work and one has to add explicit \n there to make it 171# work. EVERYTHING SUCKS NOWADAYS. 172- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "emscripten" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install emscripten binaryen && export LLVM=/usr/local/opt/emscripten/libexec/llvm/bin && emcc && echo -e "\nBINARYEN_ROOT = '/usr/local'\n" >> ~/.emscripten; fi 173 174# for python preprocessor for magnum-singles, for a lack of better name 175- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "acme" ]; then pip install coverage codecov; fi 176 177script: 178- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then ./package/ci/travis-desktop.sh; fi 179- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then ./package/ci/travis-android-arm.sh; fi 180- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then ./package/ci/travis-desktop.sh; fi 181- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "ios-simulator" ]; then ./package/ci/travis-ios-simulator.sh; fi 182- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "emscripten" ]; then ./package/ci/travis-emscripten.sh; fi 183# Travis somehow is not able to gather all output, try to force it using this 184- sync 185 186# python preprocessor for magnum-singles, for a lack of better name 187- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "acme" ]; then cd $TRAVIS_BUILD_DIR/src/acme && coverage run -m unittest; fi 188 189after_success: 190# Keep in sync with PKBUILD-coverage and appveyor-lcov.sh, please 191- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --directory . --capture --output-file coverage.info > /dev/null; fi 192- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --extract coverage.info "*/src/Corrade/*" --output-file coverage.info > /dev/null; fi 193- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/Test/*" --output-file coverage.info > /dev/null; fi 194- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then lcov $LCOV_EXTRA_OPTS --remove coverage.info "*/build/src/Corrade/*" --output-file coverage.info > /dev/null; fi 195- if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.info; fi 196 197# python preprocessor for magnum-singles, for a lack of better name 198- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "acme" ]; then cd $TRAVIS_BUILD_DIR/src/acme && codecov; fi 199