diff --git a/MANIFEST.in b/MANIFEST.in index 9e7299343..d4547dd4e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -16,6 +16,7 @@ recursive-include docs/apiref * recursive-include docs/source * prune misc +prune conf/ci prune conf/conda-recipes prune conf/anaconda prune conf/appveyor diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml new file mode 100644 index 000000000..b0f4d7708 --- /dev/null +++ b/bitbucket-pipelines.yml @@ -0,0 +1,12 @@ +pipelines: + default: + - step: + script: + - source conf/ci/bitbucket.sh + - install-anaconda + - test-package python=2.7 MPI=mpich + - test-package python=3.4 MPI=mpich + - test-package python=3.5 MPI=mpich + - test-package python=2.7 MPI=openmpi + - test-package python=3.4 MPI=openmpi + - test-package python=3.5 MPI=openmpi diff --git a/conf/ci/bitbucket.sh b/conf/ci/bitbucket.sh new file mode 100644 index 000000000..097ecfd1c --- /dev/null +++ b/conf/ci/bitbucket.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Test script running on Bitbucket Pipelines +# https://bitbucket.org/mpi4py/mpi4py/addon/pipelines/home + +RUN() { echo + $@; $@; } +RUN export ANACONDA=/opt/anaconda +RUN export CFLAGS=-O0 + +install-anaconda() { + MINICONDA=Miniconda2-latest-Linux-$(arch).sh + RUN wget --quiet -P ~ http://repo.continuum.io/miniconda/$MINICONDA + RUN bash ~/$MINICONDA -b -f -p $ANACONDA + RUN source $ANACONDA/bin/activate root + RUN conda config --set show_channel_urls yes + RUN conda install --quiet --yes -n root conda-build +} + +test-package() { + for arg in $@; do + case $arg in + python=?*) + PY="${arg#*=}";; + MPI=?*) + MPI="${arg#*=}";; + *) + break + esac + done + PY=${PY-2.7} MPI=${MPI-mpich} + RUN source $ANACONDA/bin/activate root + RUN rm -rf $ANACONDA/envs/test + RUN conda create --quiet --yes -n test --channel mpi4py python=$PY $MPI numpy nomkl cython + RUN source activate test + RUN python setup.py build_src --force + RUN python setup.py install + RUN python setup.py --quiet clean --all + if [[ "$MPI" == "mpich" ]]; then P=2; else P=5; fi + if [[ "$MPI" == "openmpi" ]]; then ARGS=--allow-run-as-root; else ARGS=; fi + RUN mpiexec $ARGS -n 1 python $PWD/test/runtests.py -v -f --exclude=spawn + RUN mpiexec $ARGS -n $P python $PWD/test/runtests.py -v -f --exclude=spawn +}