-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #210 from jchodera/master
Add testing for py35
- Loading branch information
Showing
8 changed files
with
117 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,41 @@ | ||
language: c | ||
|
||
branches: | ||
only: | ||
- master | ||
sudo: false | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++ | ||
- gfortran | ||
- valgrind | ||
- csh | ||
- g++-multilib | ||
- gcc-multilib | ||
|
||
install: | ||
- source devtools/ci/install.sh | ||
- source devtools/travis-ci/install.sh | ||
- export PYTHONUNBUFFERED=true | ||
- export CC=gcc | ||
- export CXX=g++ | ||
|
||
script: | ||
# this builds the binary, unpacks it, and runs the tests | ||
- conda config --add channels ${ORGNAME} | ||
- conda build devtools/conda-recipe | ||
|
||
- source activate _test | ||
- conda install --yes --quiet pip nose nose-timer | ||
- cd devtools && nosetests $PACKAGENAME --nocapture --verbosity=2 --with-doctest --with-timer && cd .. | ||
env: | ||
matrix: | ||
- CONDA_PY=2.7 | ||
- CONDA_PY=3.3 | ||
- CONDA_PY=3.4 | ||
- python=2.7 CONDA_PY=27 | ||
- python=3.4 CONDA_PY=34 | ||
- python=3.5 CONDA_PY=35 | ||
|
||
global: | ||
- ORGNAME="omnia" | ||
- PACKAGENAME="pymbar" | ||
# encrypted BINSTAR_TOKEN for push of dev package to binstar | ||
- secure: "lu3EsyPF+woAABbZyctdFUPfTkAUOyC7k7LsDmWBMrV6ctpvYkomDFS65NAElXDOnmPzxMpn4+f0V2+tNqD4sM/9erDfM2MkJH+tRznNkAAZFoxbxeZCmzV4zSzNvAKlopasHSXt2mbhzbDnhrIToAssQZMHp13pNlBMEq86hKc=" | ||
|
||
after_success: | ||
- source devtools/ci/after_sucess.sh | ||
- echo "after_success" | ||
- ./devtools/travis-ci/after_success.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
# Must be invoked with $PACKAGENAME | ||
|
||
echo $TRAVIS_PULL_REQUEST $TRAVIS_BRANCH | ||
PUSH_DOCS_TO_S3=false | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" = true ]; then | ||
echo "This is a pull request. No deployment will be done."; exit 0 | ||
fi | ||
|
||
|
||
if [ "$TRAVIS_BRANCH" != "master" ]; then | ||
echo "No deployment on BRANCH='$TRAVIS_BRANCH'"; exit 0 | ||
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 | ||
|
||
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 install --yes `conda build devtools/conda-recipe --output` | ||
pip install numpydoc s3cmd msmb_theme | ||
conda install --yes `cat docs/requirements.txt | xargs` | ||
|
||
conda list -e | ||
|
||
(cd docs && make html && cd -) | ||
ls -lt docs/_build | ||
pwd | ||
python devtools/ci/push-docs-to-s3.py | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<html><head><meta http-equiv="refresh" content="0;URL='/latest'"/></head></html> |
17 changes: 10 additions & 7 deletions
17
devtools/ci/install.sh → devtools/travis-ci/install.sh
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
#!/bin/bash | ||
pushd . | ||
|
||
# Install Miniconda | ||
cd $HOME | ||
MINICONDA=Miniconda-latest-Linux-x86_64.sh | ||
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 | ||
if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then | ||
echo "Miniconda MD5 mismatch" | ||
exit 1 | ||
fi | ||
bash $MINICONDA -b | ||
PIP_ARGS="-U" | ||
bash $MINICONDA -b -p miniconda | ||
|
||
sudo ln -s /usr/bin/g++ /usr/bin/g++44 | ||
# Configure miniconda | ||
export PATH=$HOME/miniconda/bin:$PATH | ||
conda install --yes conda-build jinja2 anaconda-client pip | ||
conda config --add channels omnia | ||
|
||
conda update --yes conda | ||
conda config --add channels http://conda.binstar.org/omnia | ||
conda install --yes conda-build | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import os | ||
import pip | ||
import tempfile | ||
import subprocess | ||
import pymbar.version | ||
|
||
|
||
BUCKET_NAME = 'pymbar.org' | ||
if not pymbar.version.release: | ||
PREFIX = 'latest' | ||
else: | ||
PREFIX = pymbar.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') | ||
# The secret key is available as a secure environment variable | ||
# on travis-ci to push the build documentation to Amazon S3. | ||
with tempfile.NamedTemporaryFile('w') as f: | ||
f.write('''[default] | ||
access_key = {AWS_ACCESS_KEY_ID} | ||
secret_key = {AWS_SECRET_ACCESS_KEY} | ||
'''.format(**os.environ)) | ||
f.flush() | ||
|
||
template = ('s3cmd --guess-mime-type --config {config} ' | ||
'sync docs/_build/ s3://{bucket}/{prefix}/') | ||
cmd = template.format( | ||
config=f.name, | ||
bucket=BUCKET_NAME, | ||
prefix=PREFIX) | ||
return_val = subprocess.call(cmd.split()) | ||
|
||
# Sync index file. | ||
template = ('s3cmd --guess-mime-type --config {config} ' | ||
'sync devtools/ci/index.html s3://{bucket}/') | ||
cmd = template.format( | ||
config=f.name, | ||
bucket=BUCKET_NAME) | ||
return_val = subprocess.call(cmd.split()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[nosetests] | ||
verbosity=2 | ||
with-doctest=1 | ||
|
||
[metadata] | ||
description-file = README.md |