diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2015-06-01 16:02:55 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-06-06 23:27:58 +0200 |
commit | 634bdcdbcb5cc7f979416541e5e265228985243a (patch) | |
tree | 7158c9585c33e53f376da0c2f1497df1398a76f4 | |
parent | 1e51b62c882b5fc1554efb46cb41c3d54157626c (diff) | |
download | MultiMC-634bdcdbcb5cc7f979416541e5e265228985243a.tar MultiMC-634bdcdbcb5cc7f979416541e5e265228985243a.tar.gz MultiMC-634bdcdbcb5cc7f979416541e5e265228985243a.tar.lz MultiMC-634bdcdbcb5cc7f979416541e5e265228985243a.tar.xz MultiMC-634bdcdbcb5cc7f979416541e5e265228985243a.zip |
GH-1033 Set up travis for C++14 setup
No clang, no OSX, nothing
-rw-r--r-- | .travis.yml | 45 | ||||
-rw-r--r-- | travis/prepare.sh | 42 |
2 files changed, 76 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml index 9ed7a045..e3cdfe02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,45 @@ +# General set up language: cpp +cache: apt +notifications: + email: false + +# Build matrix set up compiler: - gcc - - clang -cache: apt -before_install: - - sudo apt-add-repository -y ppa:beineri/opt-qt532 - - sudo apt-add-repository -y ppa:kalakris/cmake - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update -qq +# - clang +os: + - linux +# - osx +env: + - QT_VERSION=5.4.1 # latest stable +# - QT_VERSION=5.5-beta # latest +matrix: + exclude: + # only use clang on OS X + - os: osx + compiler: gcc + # only use the qt available from homebrew + - os: osx + env: QT_VERSION=5.4.1 + - os: osx + env: QT_VERSION=5.5-beta + + allow_failures: + # Qt 5.5 is not yet released and is therefore allowed to fail + - env: QT_VERSION=5.5-beta + +# Install dependencies install: - - sudo apt-get install -y -qq cmake qt53base qt53svg qt53tools qt53x11extras qt53webkit - - sudo apt-get install -y -qq g++-4.8 - - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi + - source travis/prepare.sh # installs qt and cmake. need to source because some env vars are set from there + +# Actual work before_script: - mkdir build - cd build - - cmake -DCMAKE_PREFIX_PATH=/opt/qt53/lib/cmake .. + - cmake -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH .. script: - make -j4 && make test ARGS="-V" + notifications: email: false diff --git a/travis/prepare.sh b/travis/prepare.sh new file mode 100644 index 00000000..1916f2d7 --- /dev/null +++ b/travis/prepare.sh @@ -0,0 +1,42 @@ +set -e + +if [ "$TRAVIS_OS_NAME" = "linux" ] +then + QT_WITHOUT_DOTS=qt$(echo $QT_VERSION | grep -oP "[^\.]*" | tr -d '\n' | tr '[:upper:]' '[:lower]') + QT_PKG_PREFIX=$(echo $QT_WITHOUT_DOTS | cut -c1-4) + echo $QT_WITHOUT_DOTS + echo $QT_PKG_PREFIX + sudo add-apt-repository -y ppa:beineri/opt-${QT_WITHOUT_DOTS} + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test # for a recent GCC + sudo add-apt-repository "deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.5 main" + + sudo apt-get update -qq + sudo apt-get install ${QT_PKG_PREFIX}base ${QT_PKG_PREFIX}svg ${QT_PKG_PREFIX}tools ${QT_PKG_PREFIX}x11extras ${QT_PKG_PREFIX}webkit + + sudo mkdir -p /opt/cmake-3/ + wget http://www.cmake.org/files/v3.2/cmake-3.2.2-Linux-x86_64.sh + sudo sh cmake-3.2.2-Linux-x86_64.sh --skip-license --prefix=/opt/cmake-3/ + + export CMAKE_PREFIX_PATH=/opt/$QT_PKG_PREFIX/lib/cmake + export PATH=/opt/cmake-3/bin:/opt/$QT_PKG_PREFIX/bin:$PATH + + if [ "$CXX" = "g++" ]; then + sudo apt-get install -y -qq g++-5 + export CXX='g++-5' CC='gcc-5' + fi + if [ "$CXX" = "clang++" ]; then + wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add - + sudo apt-get install -y -qq clang-3.5 liblldb-3.5 libclang1-3.5 libllvm3.5 lldb-3.5 llvm-3.5 llvm-3.5-runtime + export CXX='clang++-3.5' CC='clang-3.5' + fi +else + brew update + brew install qt5 + brew install cmake + export CMAKE_PREFIX_PATH=/usr/local/lib/cmake +fi + +# Output versions +cmake -version +qmake -version +$CXX -v |