Commit 326b2385 authored by John Chodera (MSKCC)'s avatar John Chodera (MSKCC)
Browse files

Added start of automated conda packaging of openmm-dev.

parent 0ccc5c9e
echo $TRAVIS_PULL_REQUEST $TRAVIS_BRANCH
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
if [[ "2.7 3.3" =~ "$python" ]]; then
conda install --yes binstar
binstar -t $BINSTAR_TOKEN upload --force -u omnia -p repex-dev $HOME/miniconda/conda-bld/linux-64/openmm-dev-*
fi
if [[ "$python" != "2.7" ]]; then
echo "No deploy on PYTHON_VERSION=${python}"; exit 0
fi
sudo apt-get install -qq -y g++ gfortran csh
sudo apt-get install -qq -y g++-multilib gcc-multilib
wget http://repo.continuum.io/miniconda/Miniconda-3.0.5-Linux-x86_64.sh
bash Miniconda-3.0.5-Linux-x86_64.sh -b
PIP_ARGS="-U"
export PATH=$HOME/miniconda/bin:$PATH
conda update --yes conda
conda config --add channels http://conda.binstar.org/omnia
conda create --yes -n ${python} python=${python} --file tools/ci/requirements-conda.txt
source activate $python
$HOME/miniconda/envs/${python}/bin/pip install $PIP_ARGS pymbar==2.0.1-beta nose-exclude
This is a recipe for building the current development package into a conda binary.
The installation on travis-ci is done by building the conda package, installing
it, running the tests, and then if successful pushing the package to binstar
(and the docs to AWS S3). The binstar auth token is an encrypted environment
variable generated using:
binstar auth -n openmm-travis -o omnia --max-age 22896000 -c --scopes api:write
and then saved in the environment variable BINSTAR_TOKEN.
You can set up travis to store an encrypted token via
gem install travis travis encrypt BINSTAR_TOKEN=xx
where xx is the token output by binstar. The final command should print a line (containing 'secure') for inclusion in your .travis.yml file.
#!/bin/bash
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$PREFIX"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# setting the rpath so that libOpenMMPME.so finds the right libfftw3
CMAKE_FLAGS+=" -DCMAKE_INSTALL_RPATH=.."
CMAKE_FLAGS+=" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
CMAKE_FLAGS+=" -DOPENCL_LIBRARY=/opt/AMDAPP/lib/x86_64/libOpenCL.so"
elif [[ "$OSTYPE" == "darwin"* ]]; then
export MACOSX_DEPLOYMENT_TARGET="10.7"
CMAKE_FLAGS+=" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
fi
# Set location for FFTW3 on both linux and mac
CMAKE_FLAGS+=" -DFFTW_INCLUDES=$PREFIX/include"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.so"
CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=$PREFIX/lib/libfftw3f_threads.so"
elif [[ "$OSTYPE" == "darwin"* ]]; then
CMAKE_FLAGS+=" -DFFTW_LIBRARY=$PREFIX/lib/libfftw3f.dylib"
CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=$PREFIX/lib/libfftw3f_threads.dylib"
fi
mkdir build
cd build
cmake .. $CMAKE_FLAGS
make -j4
make install
export OPENMM_INCLUDE_PATH=$PREFIX/include
export OPENMM_LIB_PATH=$PREFIX/lib
cd python
$PYTHON setup.py install
# Remove one random file
rm $PREFIX/bin/TestReferenceHarmonicBondForce
package:
name: openmm
version: !!str dev
source:
url: https://github.com/SimTk/openmm/archive/6.0.tar.gz
fn: 6.0.tar.gz
patches:
- plugin-dir.patch
build:
number: 3
requirements:
build:
- cmake
- python
- fftw3f
run:
- python
- fftw3f
about:
home: https://simtk.org/home/openmm
license: GPL
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment