SirVer has proposed merging lp:~widelands-dev/widelands/travis_clang into lp:widelands.
Commit message: - Move travis build script into a bash file. Just simpler to read and modify than YML. - Adds travis config for building with clang 3.4, 3.5, 3.6 and 3.7 in Debug and Release. Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/travis_clang/+merge/282123 Travis configuration to also build on Clang, not only gcc. -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/travis_clang into lp:widelands.
=== added file '.travis.sh' --- .travis.sh 1970-01-01 00:00:00 +0000 +++ .travis.sh 2016-01-10 19:03:21 +0000 @@ -0,0 +1,49 @@ +set -ex + +# NOCOM(#sirver): remove +echo "CXX: $CXX" +echo "CLANG_VERSION: $CLANG_VERSION" +echo "GCC_VERSION: $GCC_VERSION" + +# Some of these commands fail transiently. We keep retrying them until they +# succeed. +if [ "$CXX" = "g++" ]; then + until sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y; do sleep 10; done +fi +if [ "$CXX" = "clang++" ]; then + until sudo add-apt-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-$CLANG_VERSION main"; do sleep 10; done; + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - +fi +until sudo add-apt-repository ppa:zoogie/sdl2-snapshots -y; do sleep 10; done +until sudo apt-get update -qq; do sleep 10; done + +if [ "$CXX" = "g++" ]; then + sudo apt-get install -qq g++-$GCC_VERSION; + export CXX="g++-$GCC_VERSION" CC="gcc-$GCC_VERSION"; +fi +if [ "$CXX" = "clang++" ]; then + sudo apt-get install -qq clang-$CLANG_VERSION; + export CXX="clang++-$CLANG_VERSION" CC="clang-$CLANG_VERSION"; +fi + +until sudo apt-get install -qq \ + cmake \ + libboost-all-dev \ + libglew-dev \ + libicu-dev \ + libpng-dev \ + libxml2-dev \ + libyajl-dev \ + zlib1g-dev \ + libsdl2-dev \ + libsdl2-image-dev \ + libsdl2-mixer-dev \ + libsdl2-net-dev \ + libsdl2-ttf-dev \ +; do sleep 10; done + +# Start the actual build. +mkdir build +cd build +cmake .. -DCMAKE_BUILD_TYPE:STRING="$BUILD_TYPE" +make -j1 === modified file '.travis.yml' --- .travis.yml 2015-12-28 16:06:10 +0000 +++ .travis.yml 2016-01-10 19:03:21 +0000 @@ -1,47 +1,39 @@ language: cpp +script: bash -e .travis.sh sudo: required dist: trusty -# TODO(sirver): figure out how to install a modern clang matrix: include: - - compiler: gcc - env: GCC_VERSION="4.7" BUILD_TYPE="Debug" - - compiler: gcc - env: GCC_VERSION="4.8" BUILD_TYPE="Debug" - - compiler: gcc - env: GCC_VERSION="4.9" BUILD_TYPE="Debug" - - compiler: gcc - env: GCC_VERSION="5" BUILD_TYPE="Debug" - - compiler: gcc - env: GCC_VERSION="4.7" BUILD_TYPE="Release" - - compiler: gcc - env: GCC_VERSION="4.8" BUILD_TYPE="Release" - - compiler: gcc - env: GCC_VERSION="4.9" BUILD_TYPE="Release" - - compiler: gcc - env: GCC_VERSION="5" BUILD_TYPE="Release" - -install: - # Some of these commands fail transiently. We keep retrying them until they succeed. - - until sudo add-apt-repository ppa:zoogie/sdl2-snapshots -y; do sleep 10; done - - until sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y; do sleep 10; done - - until sudo apt-get update -qq; do sleep 10; done - - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi - - until sudo apt-get install -qq cmake libboost-all-dev libglew-dev libicu-dev libpng-dev libxml2-dev libyajl-dev zlib1g-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev ; do sleep 10; done - - if [ "$CXX" = "g++" ]; then export CXX="g++-$GCC_VERSION" CC="gcc-$GCC_VERSION"; fi - -script: - - mkdir build - - cd build - - cmake .. -DCMAKE_BUILD_TYPE:STRING="$BUILD_TYPE" - - make -j1 - -# TODO(sirver): This will be useful in the future. -# notifications: -# email: -# recipients: -# - [email protected] -# - [email protected] -# on_success: [always|never|change] # default: change -# on_failure: [always|never|change] # default: always + - compiler: clang + env: CLANG_VERSION="3.4" BUILD_TYPE="Debug" + - compiler: clang + env: CLANG_VERSION="3.5" BUILD_TYPE="Debug" + - compiler: clang + env: CLANG_VERSION="3.6" BUILD_TYPE="Debug" + - compiler: clang + env: CLANG_VERSION="3.7" BUILD_TYPE="Debug" + - compiler: clang + env: CLANG_VERSION="3.4" BUILD_TYPE="Release" + - compiler: clang + env: CLANG_VERSION="3.5" BUILD_TYPE="Release" + - compiler: clang + env: CLANG_VERSION="3.6" BUILD_TYPE="Release" + - compiler: clang + env: CLANG_VERSION="3.7" BUILD_TYPE="Release" + - compiler: gcc + env: GCC_VERSION="4.7" BUILD_TYPE="Debug" + - compiler: gcc + env: GCC_VERSION="4.8" BUILD_TYPE="Debug" + - compiler: gcc + env: GCC_VERSION="4.9" BUILD_TYPE="Debug" + - compiler: gcc + env: GCC_VERSION="5" BUILD_TYPE="Debug" + - compiler: gcc + env: GCC_VERSION="4.7" BUILD_TYPE="Release" + - compiler: gcc + env: GCC_VERSION="4.8" BUILD_TYPE="Release" + - compiler: gcc + env: GCC_VERSION="4.9" BUILD_TYPE="Release" + - compiler: gcc + env: GCC_VERSION="5" BUILD_TYPE="Release"
_______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp

