From 71939ae1312b7bab0bfaf8de24dab95c6110fce0 Mon Sep 17 00:00:00 2001 From: Alexander Drozdov Date: Tue, 4 Dec 2018 12:55:47 +1000 Subject: [PATCH] Disable compiler checking in linux install script Fix GCC 8 and Clang 7 Travis compilations --- .travis.yml | 43 +++++++++++++++----------------- ci/travis/install-linux.sh | 50 +++++++++++++++++++------------------- 2 files changed, 44 insertions(+), 49 deletions(-) diff --git a/.travis.yml b/.travis.yml index c626215f..78a8c164 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,69 +1,66 @@ # Based on https://habrahabr.ru/post/329264/ # Additional GCC / clang versions: # - https://docs.travis-ci.com/user/languages/cpp/ +# - https://gist.github.com/nabijaczleweli/e53219d037c4ccb34f3c dist: xenial sudo: required language: cpp +cache: + apt: true + +addons: + apt: + sources: &apt_sources + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-7 + packages: + - g++-5 + # Is there any way to avoid duplication for combination of BUILD_CONFIGURATION and COMPILER? # in case, when non-default compiler is used? matrix: include: # GCC 8 / Debug - os: linux - compiler: gcc - addons: + addons: &gcc8 apt: - sources: - - ubuntu-toolchain-r-test + sources: *apt_sources packages: - - gcc-8 - g++-8 + compiler: gcc env: - - HELLO_WORLD="GCC 8 / Debug" - MATRIX_EVAL="BUILD_TYPE=Debug && CC=gcc-8 && CXX=g++-8" # GCC 8 / Release - os: linux + addons: *gcc8 compiler: gcc - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-8 - - g++-8 env: - - HELLO_WORLD="GCC 8 / Release" - MATRIX_EVAL="BUILD_TYPE=Release && CC=gcc-8 && CXX=g++-8" # GCC 5 / Debug - os: linux compiler: gcc env: - - HELLO_WORLD="GCC 5 / Debug" - MATRIX_EVAL="BUILD_TYPE=Debug && CC=gcc-5 && CXX=g++-5" # GCC 5 / Release - os: linux compiler: gcc env: - - HELLO_WORLD="GCC 5 / Release" - MATRIX_EVAL="BUILD_TYPE=Release && CC=gcc-5 && CXX=g++-5" # CLANG 7 / Release - os: linux - compiler: clang addons: apt: - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-xenial-7 + sources: *apt_sources packages: - - clang-7 - clang++-7 + compiler: clang env: - MATRIX_EVAL="BUILD_TYPE=Release CC=clang-7 && CXX=clang++-7" @@ -71,13 +68,11 @@ matrix: compiler: clang env: - MATRIX_EVAL="BUILD_TYPE=Debug" - - MATRIX2="TEST1" - os: osx compiler: clang env: - MATRIX_EVAL="BUILD_TYPE=Release" - - MATRIX2="TEST2" # exclude: # exclude some elements from build matrix: @@ -96,9 +91,9 @@ matrix: install: # setup env: - source ci/travis/install-$TRAVIS_OS_NAME.sh - - eval "${MATRIX_EVAL}" script: + - eval "${MATRIX_EVAL}" # build and test project: - mkdir build - cd build diff --git a/ci/travis/install-linux.sh b/ci/travis/install-linux.sh index 81610a20..54be8301 100755 --- a/ci/travis/install-linux.sh +++ b/ci/travis/install-linux.sh @@ -30,31 +30,31 @@ build_cmake() build_cmake # Newer GCC -if [ -n "$MATRIX_EVAL" ]; then - echo "Prepare GCC" - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - sudo apt-get -qq update - ( - eval "${MATRIX_EVAL}" - case "${CXX}" in - g++-5) - pkg='g\+\+-5' - ;; - g++-6) - pkg='g\+\+-6' - ;; - g++-7) - pkg='g\+\+-7' - ;; - *) - echo "Unknown compiler: ${CXX}" - exit 1 - ;; - esac - #sudo apt-get install -y 'g\+\+-5' 'g\+\+-6' 'g\+\+-7' - sudo apt-get install -y "${pkg}" - ) -fi +#if [ -n "$MATRIX_EVAL" ]; then +# echo "Prepare GCC" +# sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y +# sudo apt-get -qq update +# ( +# eval "${MATRIX_EVAL}" +# case "${CXX}" in +# g++-5) +# pkg='g\+\+-5' +# ;; +# g++-6) +# pkg='g\+\+-6' +# ;; +# g++-7) +# pkg='g\+\+-7' +# ;; +# *) +# echo "Unknown compiler: ${CXX}" +# exit 1 +# ;; +# esac +# #sudo apt-get install -y 'g\+\+-5' 'g\+\+-6' 'g\+\+-7' +# sudo apt-get install -y "${pkg}" +# ) +#fi # FFmpeg # - https://launchpad.net/~jonathonf/+archive/ubuntu/ffmpeg-3