Skip to content

Commit

Permalink
Travis gcc6 (#44)
Browse files Browse the repository at this point in the history
Test Python 3.4, 3.5, and 3.6 using GCC 6 on Linux.
  • Loading branch information
molpopgen committed Oct 21, 2017
1 parent e196c26 commit 47c22ad
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 5 deletions.
57 changes: 56 additions & 1 deletion .travis.yml
Expand Up @@ -4,25 +4,80 @@ matrix:
include:
- os: linux
dist: trusty
env: USECONDA=1
env:
- USECONDA=1
- CC=gcc
- CXX=g++
- os: linux
dist: trusty
python: 3.4
addons:
apt_packages:
- pandoc
env:
- CC=gcc
- CXX=g++
- os: linux
dist: trusty
python: 3.5
addons:
apt_packages:
- pandoc
env:
- CC=gcc
- CXX=g++
- os: linux
dist: trusty
python: 3.6
addons:
apt_packages:
- pandoc
env:
- CC=gcc
- CXX=g++

- os: linux
dist: trusty
python: 3.4
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- pandoc
env:
- CC=gcc-6
- CXX=g++-6

- os: linux
dist: trusty
python: 3.5
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- pandoc
env:
- CC=gcc-6
- CXX=g++-6

- os: linux
dist: trusty
python: 3.6
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- pandoc
env:
- CC=gcc-6
- CXX=g++-6

# - os: osx
# osx_image: xcode8.3
# env: OSXGCC=1 # Test build with conda's gcc on OS X
Expand Down
9 changes: 5 additions & 4 deletions travis_scripts/build_script.sh
Expand Up @@ -12,8 +12,8 @@ then
if [ "$TRAVIS_OS_NAME" == "osx" ]; then export DYLD_FALLBACK_LIBRARY_PATH=$HOME/miniconda/lib; fi;
export CPPFLAGS="-I$HOME/miniconda/include $CPPFLAGS"
export LDFLAGS="-L$HOME/miniconda/lib $LDFLAGS"
if [ "$TRAVIS_OS_NAME" == "linux" ]; then python setup.py build_ext -i; fi
if [ "$TRAVIS_OS_NAME" == "linux" ];then python -m unittest discover -v tests; fi
if [ "$TRAVIS_OS_NAME" == "linux" ]; then CC=$CC CXX=$CXX python setup.py build_ext -i; fi
if [ "$TRAVIS_OS_NAME" == "linux" ];then CC=$CC CXX=$CXX python -m unittest discover -v tests; fi
if [ "$TRAVIS_OS_NAME" == "linux" ];then cd doc && make doctest; fi
if [ "$TRAVIS_OS_NAME" == "osx" -a "$OSXGCC" == "0" ]; then python setup.py build_ext -i; fi
if [ "$TRAVIS_OS_NAME" == "osx" -a "$OSXGCC" == "1" ]; then CC=gcc CXX=g++ python setup.py build_ext -i --gcc; fi
Expand All @@ -24,12 +24,13 @@ then
exit 1
fi
else
python setup.py build_ext -i
echo "compilers are $CC $CXX"
CC=$CC CXX=$CXX python setup.py build_ext -i
if [ "$?" != "0" ];
then
exit 1
fi
python -m unittest discover tests
CC=$CC CXX=$CXX python -m unittest discover tests
if [ "$?" != "0" ];
then
exit 1
Expand Down

0 comments on commit 47c22ad

Please sign in to comment.