# thanks to http://stackoverflow.com/questions/29312015/building-with-more-than-one-version-of-a-compiler for the template language: cpp dist: trusty sudo: required # for Qt libraries. Additionally, the virtualization builds are more stable and have better single core performance. matrix: include: - os: linux compiler: gcc addons: apt: sources: ['ubuntu-toolchain-r-test'] packages: ['g++-4.9', 'build-essential', 'cmake3', 'libfreetype6-dev', 'libgl1-mesa-dev', 'libglew-dev', 'libgtk-3-dev', 'libjpeg-dev', 'libpng-dev', 'libsdl2-dev', 'libupnp-dev', 'libxrandr-dev', 'x11proto-core-dev', 'zlib1g-dev', 'libalut0', 'libgtest-dev'] env: - CCOMPILER=gcc-4.9 - CXXCOMPILER=g++-4.9 - TYPE=Debug # somehow, the linking fails for release builds. If someone could fix that, that would be great. - BSYS="Unix Makefiles#make -k" - os: linux compiler: gcc addons: apt: sources: - ubuntu-toolchain-r-test - sourceline: ppa:beineri/opt-qt596-trusty packages: ['g++-5', 'build-essential', 'cmake3', 'libpng-dev', 'libjpeg-dev', 'libfreetype6-dev', 'libglew-dev', 'libreadline-dev', 'libsdl2-dev', 'qt59base', 'libalut-dev', 'libvorbis-dev', 'libopenal-dev', 'libdw-dev', 'libgtest-dev', 'ninja-build'] env: - CCOMPILER=gcc-5 - CXXCOMPILER=g++-5 - TYPE=RelWithDebInfo - CXX_FLAGS="-fdiagnostics-color -I/usr/include/AL" - BSYS="Ninja#ninja -k30" PCH=on - UPLOAD_SNAPSHOT=1 - CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=/usr -DWITH_AUTOMATIC_UPDATE=ON -DWITH_APPDIR_INSTALLATION=ON" - os: linux compiler: clang addons: apt: sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8'] packages: ['clang-3.8', 'build-essential', 'cmake3', 'libfreetype6-dev', 'libgl1-mesa-dev', 'libglew-dev', 'libgtk-3-dev', 'libjpeg-dev', 'libpng-dev', 'libsdl2-dev', 'libupnp-dev', 'libxrandr-dev', 'x11proto-core-dev', 'zlib1g-dev', 'libalut0', 'ninja-build', 'libc++-dev', 'libc++1', 'libgtest-dev'] env: - CCOMPILER=clang-3.8 - CXXCOMPILER=clang++-3.8 - CXX_FLAGS="-stdlib=libc++ -fcolor-diagnostics" - TYPE=Debug - BSYS="Ninja#ninja -k30" before_install: - for t in test mock; do wget https://github.com/google/google$t/archive/release-1.7.0.tar.gz -Og$t.tgz && tar xvf g$t.tgz; done install: - '[ -e /opt/qt59/bin/qt59-env.sh ] && source /opt/qt59/bin/qt59-env.sh || echo building without Qt' before_script: - export CXX="$CXXCOMPILER" CC="$CCOMPILER" - export C4REVISION_BRANCH="$TRAVIS_BRANCH" - > cmake -G"${BSYS/\#*/}" -DCMAKE_BUILD_TYPE="$TYPE" -DCMAKE_CXX_FLAGS="$CXX_FLAGS" -DUSE_GCC_PCH=${PCH:-off} -DGTEST_ROOT=$PWD/googletest-release-1.7.0 -DGMOCK_ROOT=$PWD/googlemock-release-1.7.0 $CMAKE_FLAGS . script: - ${BSYS/*#/} all netpuncher tests aul_test # TODO: Remove SKIP_IPV6_TEST once Travis generally adds ::1 as loopback address. - SKIP_IPV6_TEST=1 ./tests/tests - ./tests/aul_test after_success: - > [ "$UPLOAD_SNAPSHOT" = 1 ] && echo "Creating AppImage..." && tools/create_appimage.sh && echo "Uploading snapshot..." && tools/upload_snapshot.sh OpenClonk-x86_64.AppImage OpenClonk-x86_64.AppImage.zsync || echo "Snapshot creation has failed"