From 1327b5bc4bfc98eaaf04ea04c936d5bbf62a41d8 Mon Sep 17 00:00:00 2001 From: Jonathan Barnoud Date: Mon, 7 Dec 2015 19:26:54 +0100 Subject: [PATCH 1/6] Travis run the test in minimal and full config This commit asks Travis to run the tests twice: once with all the requirements installed (SETUP=='full'), and once with none of the optional dependencies installed (SETUP=='minimal'). Note that the minimal setup, runs without the MKL as the conda mkl package pulls scipy with it. --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 147b0ab5f2f..273666d62eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,9 +17,11 @@ before_install: - export PATH=/home/travis/miniconda/bin:$PATH - conda update --yes conda install: - - conda create --yes -q -n pyenv mkl python=2.7 numpy=1.9.1 scipy=0.14.0 nose=1.3.7 sphinx=1.3 + - if [[ $SETUP == 'full' ]]; then conda create --yes -q -n pyenv mkl python=2.7 numpy=1.9.1 scipy=0.14.0 nose=1.3.7 sphinx=1.3; fi + - if [[ $SETUP == 'minimal' ]]; then conda create --yes -q -n pyenv python=2.7 numpy=1.9.1 nose=1.3.7 sphinx=1.3; fi - source activate pyenv - - conda install --yes python=$TRAVIS_PYTHON_VERSION cython biopython matplotlib networkx netcdf4 + - if [[ $SETUP == 'full' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION cython biopython matplotlib networkx netcdf4; fi + - if [[ $SETUP == 'minimal' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION cython biopython networkx; fi - if [[ $CYTHONIZE == 'true' ]]; then find . -name '*.pyx' -exec touch '{}' \; ;fi - pip install -v package/ - pip install testsuite/ @@ -54,3 +56,5 @@ env: matrix: - CYTHONIZE=true - CYTHONIZE=false + - SETUP=full + - SETUP=minimal From 90188bf9dabc088a7688b5df90ec18348d036364 Mon Sep 17 00:00:00 2001 From: Jonathan Barnoud Date: Mon, 7 Dec 2015 21:28:01 +0100 Subject: [PATCH 2/6] Increase test timeout on Travis Tests often fail in ways that seem related to timeout issue. Indeed, Travis can be slow sometime. This commit increases the timeout for tests from 120 seconds to 300 seconds. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 273666d62eb..666e461af1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ install: - chmod +x testsuite/MDAnalysisTests/mda_nosetests # command to run tests script: - - ./testsuite/MDAnalysisTests/mda_nosetests -v --with-coverage --cover-package MDAnalysis --processes=2 --process-timeout=120 --with-memleak + - ./testsuite/MDAnalysisTests/mda_nosetests -v --with-coverage --cover-package MDAnalysis --processes=2 --process-timeout=300 --with-memleak - | test ${TRAVIS_PULL_REQUEST} == "false" && \ test ${TRAVIS_BRANCH} == ${GH_DOC_BRANCH} && \ From 0e21c10d76c2155411d44a17ed4f3f502681e57e Mon Sep 17 00:00:00 2001 From: Jonathan Barnoud Date: Tue, 8 Dec 2015 08:26:24 +0100 Subject: [PATCH 3/6] Cleanup the build matrix Build the full setup with and without cythonize; build the minimal setup only without cythonize. --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 666e461af1e..a75f155fb4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +54,6 @@ env: - GIT_CI_EMAIL: TravisCI@mdanalysis.org - MDA_DOCDIR: package/doc/html matrix: - - CYTHONIZE=true - - CYTHONIZE=false - - SETUP=full - - SETUP=minimal + - SETUP=full CYTHONIZE=true + - SETUP=full CYTHONIZE=false + - SETUP=minimal CYTHONIZE=false From d6a017cdeebb172e9e85359a183135e609df0d4d Mon Sep 17 00:00:00 2001 From: Jonathan Barnoud Date: Tue, 8 Dec 2015 08:32:33 +0100 Subject: [PATCH 4/6] Travis do not install cython for the minimal setup --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a75f155fb4a..51c666b8101 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ install: - if [[ $SETUP == 'minimal' ]]; then conda create --yes -q -n pyenv python=2.7 numpy=1.9.1 nose=1.3.7 sphinx=1.3; fi - source activate pyenv - if [[ $SETUP == 'full' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION cython biopython matplotlib networkx netcdf4; fi - - if [[ $SETUP == 'minimal' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION cython biopython networkx; fi + - if [[ $SETUP == 'minimal' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION biopython networkx; fi - if [[ $CYTHONIZE == 'true' ]]; then find . -name '*.pyx' -exec touch '{}' \; ;fi - pip install -v package/ - pip install testsuite/ From ec83083e59dac592b41bc54f660355631d6fe5ae Mon Sep 17 00:00:00 2001 From: Jonathan Barnoud Date: Tue, 8 Dec 2015 08:56:20 +0100 Subject: [PATCH 5/6] Move env section to the top of travis.yml This makes the file easier to understand as a reader see where the variable come from before they are used. --- .travis.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 51c666b8101..651dd575025 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,15 @@ +env: + global: + - secure: "HIj3p+p2PV8DBVg/KGUx6n83KwB0ASE5FwOn0SMB9zxnzAqe8sapwdBQdMdq0sXB7xT1spJqRxuxOMVEVn35BNLu7bxMLfa4287C8YXcomnvmv9xruxAsjsIewnNQ80vtPVbQddBPxa4jKbqgPby5QhhAP8KANAqYe44pIV70fY=" + - GH_DOC_BRANCH: develop + - GH_REPOSITORY: github.com/MDAnalysis/mdanalysis.git + - GIT_CI_USER: TravisCI + - GIT_CI_EMAIL: TravisCI@mdanalysis.org + - MDA_DOCDIR: package/doc/html + matrix: + - SETUP=full CYTHONIZE=true + - SETUP=full CYTHONIZE=false + - SETUP=minimal CYTHONIZE=false language: python python: - "2.7" @@ -44,16 +56,3 @@ after_success: test ${TRAVIS_BRANCH} == ${GH_DOC_BRANCH} && \ test "${TRAVIS_BUILD_NUMBER}.1" == "${TRAVIS_JOB_NUMBER}" && \ bash ./maintainer/deploy_docs.sh - -env: - global: - - secure: "HIj3p+p2PV8DBVg/KGUx6n83KwB0ASE5FwOn0SMB9zxnzAqe8sapwdBQdMdq0sXB7xT1spJqRxuxOMVEVn35BNLu7bxMLfa4287C8YXcomnvmv9xruxAsjsIewnNQ80vtPVbQddBPxa4jKbqgPby5QhhAP8KANAqYe44pIV70fY=" - - GH_DOC_BRANCH: develop - - GH_REPOSITORY: github.com/MDAnalysis/mdanalysis.git - - GIT_CI_USER: TravisCI - - GIT_CI_EMAIL: TravisCI@mdanalysis.org - - MDA_DOCDIR: package/doc/html - matrix: - - SETUP=full CYTHONIZE=true - - SETUP=full CYTHONIZE=false - - SETUP=minimal CYTHONIZE=false From 935d36c990f7182b47692620e4bade6a6636680e Mon Sep 17 00:00:00 2001 From: Jonathan Barnoud Date: Tue, 8 Dec 2015 17:20:52 +0100 Subject: [PATCH 6/6] Reduce the travis matrix Remove the build with full install and no cythonize as suggested by @kain88-de in #570. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 651dd575025..a2814f960bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ env: - MDA_DOCDIR: package/doc/html matrix: - SETUP=full CYTHONIZE=true - - SETUP=full CYTHONIZE=false - SETUP=minimal CYTHONIZE=false language: python python: