Skip to content

Commit

Permalink
Merge pull request #218 from jchodera/master
Browse files Browse the repository at this point in the history
Update pymbar-dev builds with newer devtools framework
  • Loading branch information
jchodera committed Mar 22, 2016
2 parents a60ca61 + def7809 commit 3d442a2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 24 deletions.
14 changes: 3 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,11 @@ addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++
- gfortran
- valgrind
- csh
- g++-multilib
- gcc-multilib

install:
- source devtools/travis-ci/install.sh
- bash -x devtools/travis-ci/install.sh
- export PYTHONUNBUFFERED=true
- export CC=gcc
- export CXX=g++
- export PATH=$HOME/miniconda/bin:$PATH

script:
- conda config --add channels ${ORGNAME}
Expand All @@ -38,4 +30,4 @@ env:

after_success:
- echo "after_success"
- ./devtools/travis-ci/after_success.sh
- if [ "$TRAVIS_SECURE_ENV_VARS" == true ]; then source devtools/travis-ci/after_success.sh; fi
11 changes: 9 additions & 2 deletions devtools/travis-ci/after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ fi

# Deploy to binstar
conda install --yes anaconda-client jinja2
binstar -t $BINSTAR_TOKEN upload --force -u ${ORGNAME} -p ${PACKAGENAME}-dev $HOME/miniconda/conda-bld/*/${PACKAGENAME}-dev-*.tar.bz2
pushd .
cd $HOME/miniconda/conda-bld
FILES=*/${PACKAGENAME}-dev-*.tar.bz2
for filename in $FILES; do
anaconda -t $BINSTAR_TOKEN remove --force ${ORGNAME}/${PACKAGENAME}-dev/${filename}
anaconda -t $BINSTAR_TOKEN upload --force -u ${ORGNAME} -p ${PACKAGENAME}-dev ${filename}
done
popd

if [ $PUSH_DOCS_TO_S3 = true ]; then
# Create the docs and push them to S3
# -----------------------------------
conda install --yes pip
conda config --add channels http://conda.binstar.org/omnia
conda config --add channels $ORGNAME
conda install --yes `conda build devtools/conda-recipe --output`
pip install numpydoc s3cmd msmb_theme
conda install --yes `cat docs/requirements.txt | xargs`
Expand Down
17 changes: 10 additions & 7 deletions devtools/travis-ci/install.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
#!/bin/bash
# Temporarily change directory to $HOME to install software
pushd .
cd $HOME

# Install Miniconda
cd $HOME
MINICONDA=Miniconda-latest-Linux-x86_64.sh
MINICONDA_HOME=$HOME/miniconda
MINICONDA_MD5=$(curl -s http://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *<td>\(.*\)<\/td> */\1/p')
wget http://repo.continuum.io/miniconda/$MINICONDA
wget -q http://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
bash $MINICONDA -b -p $MINICONDA_HOME

# Configure miniconda
export PATH=$HOME/miniconda/bin:$PATH
export PIP_ARGS="-U"
export PATH=$MINICONDA_HOME/bin:$PATH
conda update --yes conda
conda install --yes conda-build jinja2 anaconda-client pip
conda config --add channels omnia

popd
# Restore original directory
popd
17 changes: 13 additions & 4 deletions devtools/travis-ci/push-docs-to-s3.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
#!/usr/bin/env python

"""
Must have the vollowing environment variables defined:
* BUCKET_NAME : AWS bucket name
* PREFIX : 'latest' or other version number
"""

import os
import pip
import tempfile
import subprocess
import pymbar.version
import thermopyl.version


BUCKET_NAME = 'pymbar.org'
if not pymbar.version.release:
BUCKET_NAME = 'thermopyl.org'
if not thermopyl.version.release:
PREFIX = 'latest'
else:
PREFIX = pymbar.version.short_version
PREFIX = thermopyl.version.short_version

if not any(d.project_name == 's3cmd' for d in pip.get_installed_distributions()):
raise ImportError('The s3cmd pacakge is required. try $ pip install s3cmd')
Expand Down

0 comments on commit 3d442a2

Please sign in to comment.