diff --git a/.travis.yml b/.travis.yml index 74c25a6cf..7280a75f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,21 +6,16 @@ matrix: - { os: linux, env: PYTHON_VERSION=2.7 } - { os: linux, env: PYTHON_VERSION=3.6 } - { os: linux, env: PYTHON_VERSION=3.6 USE_OPENMP=false } - # - { os: osx, env: PYTHON_VERSION=3.6 } + - { os: osx, env: PYTHON_VERSION=3.6 } sudo: false before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew tap homebrew/science; - brew update; brew install netcdf fftw; - export CXX=clang++; - export CC=clang; shell_session_update() { echo "Overriding shell_session_update"; }; - else - export CXX=g++-6; - export CC=gcc-6; + sudo bash devtools/ci/install_gfortran.sh; fi addons: @@ -31,8 +26,6 @@ addons: - gcc-6 - g++-6 - gfortran-6 - - gfortran-5 - - g++ - gfortran - clang - libz-dev @@ -50,10 +43,12 @@ install: - source devtools/ci/install_test.sh script: - - which gcc - - gcc -v - - which g++ - - g++ -v + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then + unset CC CXX; + else + export CXX=g++-6; + export CC=gcc-6; + fi - source devtools/travis-ci/install_pytraj.sh - source devtools/ci/run_tests.sh diff --git a/devtools/ci/install_gfortran.sh b/devtools/ci/install_gfortran.sh new file mode 100644 index 000000000..2e9bf47e7 --- /dev/null +++ b/devtools/ci/install_gfortran.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# osx +# add linux too? +gfortran_image=gfortran-6.1-ElCapitan +wget http://coudert.name/software/${gfortran_image}.dmg +hdiutil mount ${gfortran_image}.dmg +installer -pkg /Volumes/${gfortran_image}/${gfortran_image}/gfortran.pkg -target / +which gfortran diff --git a/devtools/travis-ci/install_pytraj.sh b/devtools/travis-ci/install_pytraj.sh index 848c80ccd..e1a321e02 100644 --- a/devtools/travis-ci/install_pytraj.sh +++ b/devtools/travis-ci/install_pytraj.sh @@ -9,7 +9,11 @@ else python=python fi +# FIXME: remove +# git clone https://github.com/Amber-MD/cpptraj +# (cd cpptraj && git checkout d1d762564952d1a7df55126f5550a407b054f118) +# use cpptraj master branch if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then $python setup.py install --disable-openmp else