Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis mac #275

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
25 changes: 17 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
sudo: required
os:
- linux
- osx

osx_image: xcode7.1
language: python
- "2.7"

dist: trusty
sudo: false
env:
global:
- TMPDIR=/tmp
cache:
directories:
${HOME}/test_data/uvcmetrics/test/data
${HOME}/anaconda2

before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; fi
- export PATH="$HOME/miniconda/bin:$PATH"
- bash miniconda.sh -b -p $HOME/miniconda
- export UVCDAT_FEATURE=""
- if ! [ -d ${HOME}/anaconda2/bin ] ; then rm -rf ${HOME}/anaconda2 ; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export UVCDAT_FEATURE="-nox"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && ! [ -d ${HOME}/anaconda2 ] ; then wget https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh -O anaconda2.sh ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && ! [ -d ${HOME}/anaconda2 ] ; then wget https://repo.continuum.io/archive/Anaconda2-4.2.0-MacOSX-x86_64.sh -O anaconda2.sh ; fi
- export PATH="$HOME/anaconda2/bin:$PATH"
- if [ ! -d ${HOME}/anaconda2 ]; then bash anaconda2.sh -b -p $HOME/anaconda2 ; fi
- conda config --set always_yes yes --set changeps1 no
- conda update -y conda
- conda install -y --channel conda-forge --channel uvcdat uvcdat-nox
- conda create -p ${HOME}/anaconda2_uvcdat_env --show-channel-urls --yes -c conda-forge -c uvcdat uvcdat${UVCDAT_FEATURE}
- source activate ${HOME}/anaconda2_uvcdat_env
# Useful for debugging any issues with conda
- conda list
- conda info -a
Expand All @@ -30,12 +37,14 @@ install:
- git clean -fd
- df -h .
- export UVCDAT_ANONYMOUS_LOG=False
- source activate ${HOME}/anaconda2_uvcdat_env
- cmake . -DUVCMETRICS_TEST_DATA_DIRECTORY=${HOME}/test_data/uvcmetrics/test/data
- python setup.py install

#before_script:
# - if [ "$TRAVIS_OS_NAME" = "linux" ]; then export DISPLAY=:99.0 ; sh -e /etc/init.d/xvfb start ; sleep 3 ; fi

script:
- export UVCDAT_ANONYMOUS_LOG=False
- ctest -D Experimental -VV -j2
- source activate ${HOME}/anaconda2_uvcdat_env
#- ctest -D Experimental -VV
- mkdir /tmp/tmpem7bfm
- diags --outputdir /tmp/tmpem7bfm/ --no-antialiasing --model path=/Users/travis/test_data/uvcmetrics/test/data/cam_output,climos=no --obs path=/Users/travis/test_data/uvcmetrics/test/data/obs_atmos,filter="f_contains('NCEP')",climos=yes --package AMWG --set 2 --var Ocean_Heat --seasons JAN