Browse Source

Changed compilers in travis

tempestpy_adaptions
Matthias Volk 7 years ago
parent
commit
bc0e432e11
  1. 74
      .travis.yml
  2. 51
      travis/build-helper.sh
  3. 6
      travis/generate_travis.py
  4. 2
      travis/install_linux.sh
  5. 19
      travis/install_osx.sh

74
.travis.yml

@ -7,6 +7,7 @@ branches:
only:
- master
- stable
sudo: required
dist: trusty
language: cpp
@ -20,7 +21,6 @@ cache:
# Enable docker support
services:
- docker
sudo: required
notifications:
email:
@ -42,8 +42,8 @@ jobs:
# osx
- stage: Build (1st run)
os: osx
compiler: clang
env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultDebug COMPILER=apple-clang STL=libc++
install:
- rm -rf build
- travis/install_osx.sh
@ -53,8 +53,8 @@ jobs:
- find build -iname '*err*.log' -type f -print -exec cat {} \;
- stage: Build (1st run)
os: osx
compiler: clang
env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultRelease COMPILER=apple-clang STL=libc++
install:
- rm -rf build
- travis/install_osx.sh
@ -66,7 +66,7 @@ jobs:
- stage: Build (1st run)
os: linux
compiler: gcc
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc
install:
- rm -rf build
- travis/install_linux.sh
@ -79,7 +79,7 @@ jobs:
- stage: Build (1st run)
os: linux
compiler: gcc
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc
install:
- rm -rf build
- travis/install_linux.sh
@ -97,8 +97,8 @@ jobs:
# osx
- stage: Build (2nd run)
os: osx
compiler: clang
env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultDebug COMPILER=apple-clang STL=libc++
install:
- travis/install_osx.sh
script:
@ -107,8 +107,8 @@ jobs:
- find build -iname '*err*.log' -type f -print -exec cat {} \;
- stage: Build (2nd run)
os: osx
compiler: clang
env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultRelease COMPILER=apple-clang STL=libc++
install:
- travis/install_osx.sh
script:
@ -119,7 +119,7 @@ jobs:
- stage: Build (2nd run)
os: linux
compiler: gcc
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc
install:
- travis/install_linux.sh
script:
@ -131,7 +131,7 @@ jobs:
- stage: Build (2nd run)
os: linux
compiler: gcc
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc
install:
- travis/install_linux.sh
script:
@ -148,8 +148,8 @@ jobs:
# osx
- stage: Build (3rd run)
os: osx
compiler: clang
env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultDebug COMPILER=apple-clang STL=libc++
install:
- travis/install_osx.sh
script:
@ -158,8 +158,8 @@ jobs:
- find build -iname '*err*.log' -type f -print -exec cat {} \;
- stage: Build (3rd run)
os: osx
compiler: clang
env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultRelease COMPILER=apple-clang STL=libc++
install:
- travis/install_osx.sh
script:
@ -170,7 +170,7 @@ jobs:
- stage: Build (3rd run)
os: linux
compiler: gcc
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc
install:
- travis/install_linux.sh
script:
@ -182,7 +182,7 @@ jobs:
- stage: Build (3rd run)
os: linux
compiler: gcc
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc
install:
- travis/install_linux.sh
script:
@ -199,8 +199,8 @@ jobs:
# osx
- stage: Build (4th run)
os: osx
compiler: clang
env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultDebug COMPILER=apple-clang STL=libc++
install:
- travis/install_osx.sh
script:
@ -209,8 +209,8 @@ jobs:
- find build -iname '*err*.log' -type f -print -exec cat {} \;
- stage: Build (4th run)
os: osx
compiler: clang
env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultRelease COMPILER=apple-clang STL=libc++
install:
- travis/install_osx.sh
script:
@ -221,7 +221,7 @@ jobs:
- stage: Build (4th run)
os: linux
compiler: gcc
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc
install:
- travis/install_linux.sh
script:
@ -233,7 +233,7 @@ jobs:
- stage: Build (4th run)
os: linux
compiler: gcc
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc
install:
- travis/install_linux.sh
script:
@ -250,8 +250,8 @@ jobs:
# osx
- stage: Build (5th run)
os: osx
compiler: clang
env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultDebug COMPILER=apple-clang STL=libc++
install:
- travis/install_osx.sh
script:
@ -260,8 +260,8 @@ jobs:
- find build -iname '*err*.log' -type f -print -exec cat {} \;
- stage: Build (5th run)
os: osx
compiler: clang
env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultRelease COMPILER=apple-clang STL=libc++
install:
- travis/install_osx.sh
script:
@ -272,7 +272,7 @@ jobs:
- stage: Build (5th run)
os: linux
compiler: gcc
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc
install:
- travis/install_linux.sh
script:
@ -284,7 +284,7 @@ jobs:
- stage: Build (5th run)
os: linux
compiler: gcc
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc
install:
- travis/install_linux.sh
script:
@ -301,8 +301,8 @@ jobs:
# osx
- stage: Test all
os: osx
compiler: clang
env: CONFIG=DefaultDebug COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultDebug COMPILER=apple-clang STL=libc++
install:
- travis/install_osx.sh
script:
@ -311,8 +311,8 @@ jobs:
- find build -iname '*err*.log' -type f -print -exec cat {} \;
- stage: Test all
os: osx
compiler: clang
env: CONFIG=DefaultRelease COMPILER=clang-4.0 STL=libc++
compiler: apple-clang
env: CONFIG=DefaultRelease COMPILER=apple-clang STL=libc++
install:
- travis/install_osx.sh
script:
@ -323,7 +323,7 @@ jobs:
- stage: Test all
os: linux
compiler: gcc
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultDebug LINUX=ubuntu-16.10 COMPILER=gcc
install:
- travis/install_linux.sh
script:
@ -335,7 +335,7 @@ jobs:
- stage: Test all
os: linux
compiler: gcc
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc-6
env: CONFIG=DefaultRelease LINUX=ubuntu-16.10 COMPILER=gcc
install:
- travis/install_linux.sh
script:

51
travis/build-helper.sh

@ -66,57 +66,17 @@ run() {
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
case $COMPILER in
gcc-4.8)
export CC=gcc-4.8
export CXX=g++-4.8
;;
gcc-4.9)
export CC=gcc-4.9
export CXX=g++-4.9
;;
gcc-5)
export CC=gcc-5
export CXX=g++-5
;;
gcc-6)
export CC=gcc-6
export CXX=g++-6
;;
gcc-default)
gcc)
export CC=gcc
export CXX=g++
;;
clang-3.5)
export CC=clang-3.5
export CXX=clang++-3.5
;;
clang-3.6)
export CC=clang-3.6
export CXX=clang++-3.6
;;
clang-3.7)
export CC=clang-3.7
export CXX=clang++-3.7
;;
clang-3.8)
export CC=clang-3.8
export CXX=clang++-3.8
;;
clang-3.9)
export CC=clang-3.9
export CXX=clang++-3.9
;;
clang-4.0)
clang-4)
case "$OS" in
linux)
export CC=clang-4.0
@ -130,7 +90,12 @@ clang-4.0)
esac
;;
clang-default)
clang)
export CC=clang
export CXX=clang++
;;
apple-clang)
export CC=clang
export CXX=clang++
;;

6
travis/generate_travis.py

@ -2,14 +2,14 @@
# Configuration for Linux
configs_linux = [
# OS, compiler
("ubuntu-16.10", "gcc", "-6"),
("ubuntu-16.10", "gcc", ""),
#("debian-9", "gcc", "-6"),
]
# Configurations for Mac
configs_mac = [
# OS, compiler
("osx", "clang", "-4.0"),
("osx", "apple-clang", ""),
]
# Build types
@ -41,6 +41,7 @@ if __name__ == "__main__":
s += " only:\n"
s += " - master\n"
s += " - stable\n"
s += "sudo: required\n"
s += "dist: trusty\n"
s += "language: cpp\n"
s += "\n"
@ -54,7 +55,6 @@ if __name__ == "__main__":
s += "# Enable docker support\n"
s += "services:\n"
s += "- docker\n"
s += "sudo: required\n"
s += "\n"
s += "notifications:\n"

2
travis/install_linux.sh

@ -8,4 +8,4 @@ then
exit 0
fi
sudo apt-get install -qq -y docker
#sudo apt-get install -qq -y docker

19
travis/install_osx.sh

@ -18,8 +18,7 @@ install_brew_package() {
brew outdated "$1" || brew upgrade "$@"
else
# Package not installed yet, install.
# If there are conflicts, try overwriting the files (these are in /usr/local anyway so it should be ok).
brew install "$@" || brew link --overwrite gcc49
brew install "$@" || brew link --overwrite "$@"
fi
}
@ -40,19 +39,15 @@ install_brew_package md5sha1sum
# For `timeout'
install_brew_package coreutils
which cmake &>/dev/null || install_brew_package cmake
install_brew_package cmake
# Install compiler
case "${COMPILER}" in
gcc-4.8) install_brew_package gcc@4.8 ;;
gcc-4.9) install_brew_package gcc@4.9 ;;
gcc-5) install_brew_package gcc@5 ;;
gcc-6) install_brew_package gcc@6 ;;
clang-default) ;;
clang-3.7) install_brew_package llvm@3.7 --with-clang --with-libcxx;;
clang-3.8) install_brew_package llvm@3.8 --with-clang --with-libcxx;;
clang-3.9) install_brew_package llvm@3.9 --with-clang --with-libcxx;;
clang-4.0) install_brew_package llvm --with-clang --with-libcxx;;
gcc) install_brew_package gcc ;;
gcc-6) install_brew_package gcc@6 ;;
clang) install_brew_package llvm --with-clang --with-libcxx;;
clang-4) install_brew_package llvm@4 --with-clang --with-libcxx;;
apple-clang) ;;
*) echo "Compiler not supported: ${COMPILER}. See travis/install_osx.sh"; exit 1 ;;
esac
travis_fold end brew_install_util

Loading…
Cancel
Save