Skip to content

Commit

Permalink
Merge pull request #1310 from clinssen/travis_gcc8
Browse files Browse the repository at this point in the history
Switch to GCC8 as default in continuous integration tests on Travis
  • Loading branch information
terhorstd committed Oct 28, 2019
2 parents 082b4ff + e0e29d6 commit f28b138
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 12 deletions.
49 changes: 40 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stages:
- Staticcheck
- MPI-Threading-Python
- Python-Full-build
- GCC8Clang7
- Clang7
- OsX

# list of build stages to run. Stages with the same name get run in parallel.
Expand Down Expand Up @@ -63,10 +63,7 @@ jobs:
- stage: Python-Full-build
python: 2.7.13
env: xTHREADING=1 xMPI=1 xGSL=1 xLIBNEUROSIM=1 xLTDL=1 xREADLINE=1 xPYTHON=1 xMUSIC=1 xSTATIC_ANALYSIS=0 xRUN_BUILD_AND_TESTSUITE=1 CACHE_NAME=JOB # full
- stage: GCC8Clang7
language: cpp
env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" xRUN_BUILD_AND_TESTSUITE=1
- stage: GCC8Clang7
- stage: Clang7
language: cpp
env: MATRIX_EVAL="CC=clang-7 && CXX=clang++-7" xRUN_BUILD_AND_TESTSUITE=1
- stage: OsX
Expand Down Expand Up @@ -116,6 +113,25 @@ cache:

before_install:
- export SOURCEDIR=$PWD
# select the right C++ compiler version (gcc8) -- note that update-alternatives is not available on MacOS
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
ls -lh /usr/bin/g++*
ls -lh /usr/bin/gcc*
ls -lh /usr/bin/c++*
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10
sudo update-alternatives --auto g++
sudo update-alternatives --list g++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10
sudo update-alternatives --auto gcc
sudo update-alternatives --list gcc
sudo update-alternatives --list c++
sudo update-alternatives --auto c++
g++ --version
/usr/bin/c++ --version
fi
- |
if [ "$xRUN_BUILD_AND_TESTSUITE" = "1" ]; then
echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"
Expand All @@ -127,10 +143,25 @@ before_install:
cd $HOME/build
echo $PATH
# Upgrade pip and setuptools
if [ $TRAVIS_BUILD_STAGE_NAME = "Gcc8clang7" ]; then pyenv global 3.6.7; fi
if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew --version; brew update; brew tap brewsci/science; brew tap brewsci/bio; brew install coreutils gsl open-mpi automake autoconf libtool; fi
pip install -U pip
pip install -U setuptools
if [ $TRAVIS_BUILD_STAGE_NAME = "Clang7" ]; then
pyenv install --list
pyenv global 3.6.7
fi
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew --version
brew update
brew tap brewsci/science
brew tap brewsci/bio
brew install coreutils gsl open-mpi automake autoconf libtool
brew unlink gcc
brew install gcc@8
brew link gcc@8
brew list
brew leaves
brew cask list
fi
pip install --upgrade pip
pip install --upgrade setuptools
# Installing additional packages using pip as they only have
# outdated versions in the Travis package whitelist.
# terminaltables is required by parse_travis_log.py to create
Expand Down
7 changes: 4 additions & 3 deletions doc/installation/install_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ For more detailed information please see below: ``Python3 Binding (PyNEST)``
Choice of compiler
------------------

The default compiler for NEST is GNU gcc/g++, but NEST has also successfully
been compiled with other compilers, including Intel icc/icpc, Pathscale,
Portland and IBM compilers.
The default compiler for NEST is GNU gcc/g++. Version 7 or higher is required
due to the presence of bugs in earlier versions that prevent the compilation
from succeeding. NEST has also successfully been compiled with Clang 7 and the
IBM XL C++ compiler.

To select a specific compiler, please add the following flags to your ``cmake``
line::
Expand Down

0 comments on commit f28b138

Please sign in to comment.