From cb86841be60da4323c2a79728e89d2be77cb6af8 Mon Sep 17 00:00:00 2001 From: "John Chodera (MSKCC)" Date: Tue, 8 Nov 2016 20:58:36 -0500 Subject: [PATCH 1/2] Add osx travis branch --- .travis.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index f6dac8e1..dce11afb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,8 @@ -language: c +os: + - osx + - linux + sudo: false -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++ - - gfortran - - valgrind - - csh - - g++-multilib - - gcc-multilib branches: only: From 91ccae2d16d1f62a8d2d61a79a34870a9e99ce44 Mon Sep 17 00:00:00 2001 From: "John Chodera (MSKCC)" Date: Tue, 8 Nov 2016 21:12:32 -0500 Subject: [PATCH 2/2] Update install scripts using mdtraj universal linux/osx scheme --- .travis.yml | 9 +++++++-- devtools/travis-ci/install.sh | 23 ----------------------- devtools/travis-ci/install_miniconda.sh | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 25 deletions(-) delete mode 100755 devtools/travis-ci/install.sh create mode 100644 devtools/travis-ci/install_miniconda.sh diff --git a/.travis.yml b/.travis.yml index dce11afb..63d167b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,12 +9,17 @@ branches: - master install: - - source devtools/travis-ci/install.sh - - export PYTHONUNBUFFERED=true + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install md5sha1sum; fi + - source devtools/travis-ci/install_miniconda.sh + - conda config --add channels omnia # Unpack encrypted OpenEye license file - if [ "$TRAVIS_SECURE_ENV_VARS" == true ]; then openssl aes-256-cbc -K $encrypted_348f443ff0b5_key -iv $encrypted_348f443ff0b5_iv -in "devtools/travis-ci/oe_license.txt.enc" -out "$OE_LICENSE" -d; fi - if [ "$TRAVIS_SECURE_ENV_VARS" == false ]; then echo "OpenEye license will not be installed in forks."; fi +script: + conda build --quiet devtools/conda-recipe + && devtools/travis-ci/build_docs.sh + script: # Create a test environment - conda create --yes -n test python=$python diff --git a/devtools/travis-ci/install.sh b/devtools/travis-ci/install.sh deleted file mode 100755 index cba67836..00000000 --- a/devtools/travis-ci/install.sh +++ /dev/null @@ -1,23 +0,0 @@ -# Temporarily change directory to $HOME to install software -pushd . -cd $HOME - -# Install Miniconda -MINICONDA=Miniconda2-latest-Linux-x86_64.sh -MINICONDA_HOME=$HOME/miniconda -MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *\(.*\)<\/td> */\1/p') -wget -q https://repo.continuum.io/miniconda/$MINICONDA -if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then - echo "Miniconda MD5 mismatch" - exit 1 -fi -bash $MINICONDA -b -p $MINICONDA_HOME - -# Configure miniconda -export PIP_ARGS="-U" -export PATH=$MINICONDA_HOME/bin:$PATH -conda update --yes conda -conda install --yes conda-build jinja2 anaconda-client pip - -# Restore original directory -popd diff --git a/devtools/travis-ci/install_miniconda.sh b/devtools/travis-ci/install_miniconda.sh new file mode 100644 index 00000000..6d905863 --- /dev/null +++ b/devtools/travis-ci/install_miniconda.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh; fi +if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then MINICONDA=Miniconda3-latest-Linux-x86_64.sh; fi + +MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *\(.*\)<\/td> */\1/p') +wget https://repo.continuum.io/miniconda/$MINICONDA +if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then + echo "Miniconda MD5 mismatch" + exit 1 +fi +bash $MINICONDA -b +rm -f $MINICONDA + +export PATH=$HOME/miniconda3/bin:$PATH + +conda update -yq conda +conda install -yq conda-build jinja2