Skip to content

Commit

Permalink
Disable compiler checking in linux install script
Browse files Browse the repository at this point in the history
Fix GCC 8 and Clang 7 Travis compilations
  • Loading branch information
h4tr3d committed Dec 4, 2018
1 parent 0be26ee commit 71939ae
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 49 deletions.
43 changes: 19 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,78 @@
# 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"

- os: osx
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:
Expand All @@ -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
Expand Down
50 changes: 25 additions & 25 deletions ci/travis/install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71939ae

Please sign in to comment.