Skip to content

Commit

Permalink
install gfortran on macos on travis (#1437)
Browse files Browse the repository at this point in the history
  • Loading branch information
hainm authored Mar 27, 2018
1 parent 7a582af commit 9307d17
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -31,8 +26,6 @@ addons:
- gcc-6
- g++-6
- gfortran-6
- gfortran-5
- g++
- gfortran
- clang
- libz-dev
Expand All @@ -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

Expand Down
9 changes: 9 additions & 0 deletions devtools/ci/install_gfortran.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions devtools/travis-ci/install_pytraj.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9307d17

Please sign in to comment.