diff --git a/.travis.yml b/.travis.yml index 9be6e2eab..3aef70c4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ language: cpp branches: only: - master + # having another branch lets us force-push tests here without spamming master + - travis-test env: global: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eae5f4437..3a5b668da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,7 +27,7 @@ There are no external dependencies, all libraries/headers needed to build are in ### Linux -Currently linux supports gcc-4.8 and clang-3.5, as these are the compilers used in CI builds. Once the linux port is more mature, more compilers can be supported, although only within reason. Distribution packages should be built with the `Release` CMake build type so that warnings do not trigger errors. To build just run: +Currently linux should work with gcc 5+ and clang 3.4+ as it requires C++14 compiler support. The Travis CI builds with gcc-6.0 and clang-3.5. Within reason other compilers will be supported if the required patches are minimal. Distribution packages should be built with the `Release` CMake build type so that warnings do not trigger errors. To build just run: ``` cmake -DCMAKE_BUILD_TYPE=Debug -Bbuild -H. diff --git a/scripts/travis/linux_compile.sh b/scripts/travis/linux_compile.sh index b445b0712..3e2c21e62 100644 --- a/scripts/travis/linux_compile.sh +++ b/scripts/travis/linux_compile.sh @@ -7,6 +7,12 @@ set +e set -e +# Switch to the gcc version we want +if [ $CC == "gcc" ]; then + export CC=gcc-6; + export CXX=g++-6; +fi + mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Debug .. diff --git a/scripts/travis/linux_setup.sh b/scripts/travis/linux_setup.sh index 76bf97fb4..2b39cf912 100644 --- a/scripts/travis/linux_setup.sh +++ b/scripts/travis/linux_setup.sh @@ -6,7 +6,7 @@ sudo add-apt-repository -y 'ppa:beineri/opt-qt562-trusty' sudo add-apt-repository -y 'deb http://apt.llvm.org/precise/ llvm-toolchain-precise-3.8 main' wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo apt-get update -qq -sudo apt-get install --allow-unauthenticated -y -qq libx11-dev mesa-common-dev libgl1-mesa-dev qt56base qt56x11extras libxcb-keysyms1-dev gdb clang-format-3.8 +sudo apt-get install --allow-unauthenticated -y -qq libx11-dev mesa-common-dev libgl1-mesa-dev qt56base qt56x11extras libxcb-keysyms1-dev gdb clang-format-3.8 g++-6 # check formatting matches clang-format-3.8. Since newer versions can have # changes in formatting even without any rule changes, we have to fix on a