From 0cfb96e823d0de1eca37d5de909ac77a10ba5291 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Prinz Date: Fri, 4 Nov 2016 22:26:12 +0100 Subject: [PATCH 1/7] fix travis.yml --- devtools/ci/install.sh | 1 + devtools/conda-recipe/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/devtools/ci/install.sh b/devtools/ci/install.sh index 680130c..1fa46f2 100644 --- a/devtools/ci/install.sh +++ b/devtools/ci/install.sh @@ -7,6 +7,7 @@ echo travis_fold:start:install.conda echo Install conda MINICONDA=Miniconda2-latest-Linux-x86_64.sh +MINICONDA=Miniconda2-4.2.12-Linux-x86_64.sh MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *\(.*\)<\/td> */\1/p') wget https://repo.continuum.io/miniconda/$MINICONDA if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then diff --git a/devtools/conda-recipe/meta.yaml b/devtools/conda-recipe/meta.yaml index ec999dd..e088f69 100644 --- a/devtools/conda-recipe/meta.yaml +++ b/devtools/conda-recipe/meta.yaml @@ -27,7 +27,7 @@ test: requires: - matplotlib source_files: - - ipynbtest/examples + - ipynbtest/examples/ipynbtest_tutorial.ipynb about: home: https://github.com/jhprinz/ipynb-test From 6c13a538d050d484c3963ef853b43cc591ce0d1d Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Prinz Date: Fri, 4 Nov 2016 22:42:24 +0100 Subject: [PATCH 2/7] fix travis.yml --- .travis.yml | 2 ++ devtools/ci/install.sh | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4b502b5..4036726 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ language: python python: # We don't actually use the Travis Python, but this keeps it organized. - "2.7" + - "3.4" + - "3.5" install: - deactivate diff --git a/devtools/ci/install.sh b/devtools/ci/install.sh index 1fa46f2..d62c7a2 100644 --- a/devtools/ci/install.sh +++ b/devtools/ci/install.sh @@ -7,7 +7,13 @@ echo travis_fold:start:install.conda echo Install conda MINICONDA=Miniconda2-latest-Linux-x86_64.sh -MINICONDA=Miniconda2-4.2.12-Linux-x86_64.sh + +if [[ "$CONDA_PY" == "27" ]]; then + MINICONDA=Miniconda2-4.2.12-Linux-x86_64.sh +else + MINICONDA=Miniconda3-4.2.12-Linux-x86_64.sh +fi + MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *\(.*\)<\/td> */\1/p') wget https://repo.continuum.io/miniconda/$MINICONDA if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then @@ -16,12 +22,21 @@ if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then echo "Found: $(md5sum $MINICONDA | cut -d ' ' -f 1)" exit 1 fi -bash $MINICONDA -b -export PATH=$HOME/miniconda2/bin:$PATH +bash $MINICONDA -b -p $HOME/miniconda + +export PATH=$HOME/miniconda/bin:$PATH +hash -r # add omnia and update conda config --add channels http://conda.anaconda.org/omnia conda update --yes conda +conda info -a + echo travis_fold:end:install.conda + + # Replace dep1 dep2 ... with your dependencies + - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION dep1 dep2 ... + - source activate test-environment + - python setup.py install \ No newline at end of file From 72228d9261bd44157ca3026cde9b408dd4e679c4 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Prinz Date: Fri, 4 Nov 2016 23:15:43 +0100 Subject: [PATCH 3/7] update travis and conda stuff --- .travis.yml | 27 ++++++++---------------- devtools/ci/after_sucess.sh | 22 -------------------- devtools/ci/install.sh | 33 ++++++++---------------------- devtools/ci/requirements-conda.txt | 5 ----- devtools/ci/requirements.txt | 5 ----- 5 files changed, 17 insertions(+), 75 deletions(-) delete mode 100755 devtools/ci/after_sucess.sh delete mode 100644 devtools/ci/requirements-conda.txt delete mode 100644 devtools/ci/requirements.txt diff --git a/.travis.yml b/.travis.yml index 4036726..cd0446c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,9 @@ -language: python - -python: - # We don't actually use the Travis Python, but this keeps it organized. - - "2.7" - - "3.4" - - "3.5" +language: c +sudo: false install: - - deactivate + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install md5sha1sum; fi + - source devtools/travis-ci/install_miniconda.sh # Sets up a MINIConda enviroment in the name of the selected python version - source devtools/ci/install.sh # Do not buffer output of python outputs but flush them directly to the terminal @@ -16,7 +12,6 @@ install: script: # testing is done by running run_test.sh automatically during build - echo travis_fold:start:conda.build.package - - conda install --yes conda-build - conda build devtools/conda-recipe - echo travis_fold:end:conda.build.package @@ -24,13 +19,7 @@ script: - bash -x devtools/ci/after_sucess.sh env: - matrix: - - python=2.7 CONDA_PY=27 CONDA_NPY=110 - - python=3.4 CONDA_PY=34 CONDA_NPY=110 - - python=3.5 CONDA_PY=35 CONDA_NPY=110 - - global: - - secure: "NJvoSrLNd2ZR3HluJjEqI36gD5lsucwIvgnYjNmM4cwnnA77aLV9FRYTwlLRZn3XY9FL8KOzL5l0amNzMD7sQrf7bWwWv7iCUBddH549q9RSgiuOugtodYJ6VaXi76hk1rOgcJpDoCj9wTCIlMtWibPUzr1QHmdihfdM2iA2kkE=" - - secure: "l9NJkZDD0ALhkErUvhRrreLsrcWErd+CXpWv8dxHGtkjemNx6CwVtyL+a30jz/QwMANSZbKll/cPK5yJQvuwDaWxja6UPLLKVNGtma+CmwKcIC/wwTwbMoxcS62fyLJ3kS0qR8oCQz2nCPKiYyRGADtPLWVMZckY1SJfNYcKuCM=" - - - secure: kb37xmsSV3pEnESnINzwlW2Cju/UFzA/G+m+NsihAwO8RMPZwKCrZK/rptgkUDACXJxom5M690WEukQkHnOt+OTrWhu7WKZgYeVuWUs2++RohYv/m5npaOHMMn+uYmF328v4PvPmXxbD02zzg5Tgdn82x8oa6J8BKX8ohOQ6Xpg= + - CONDA_PY=2.7 CONDA_NPY=1.7 + - CONDA_PY=2.7 CONDA_NPY=1.11 + - CONDA_PY=3.4 CONDA_NPY=1.10 + - CONDA_PY=3.5 CONDA_NPY=1.11 diff --git a/devtools/ci/after_sucess.sh b/devtools/ci/after_sucess.sh deleted file mode 100755 index c4f142a..0000000 --- a/devtools/ci/after_sucess.sh +++ /dev/null @@ -1,22 +0,0 @@ -echo $TRAVIS_PULL_REQUEST $TRAVIS_BRANCH - -if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; 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 - -conda install --yes anaconda-client - -echo $python - -if [[ "2.7" =~ "$python" ]]; then - conda convert -p all ~/miniconda2/conda-bld/linux-64/ipynbtest*.tar.bz2 -o ~/miniconda2/conda-bld/ - anaconda -t ${BINSTAR_TOKEN} upload --force --user omnia --package ipynbtest $HOME/miniconda2/conda-bld/*/ipynbtest*.tar.bz2 -fi - -if [[ "$python" != "2.7" ]]; then - echo "No deploy on PYTHON_VERSION=${python}"; exit 0 -fi \ No newline at end of file diff --git a/devtools/ci/install.sh b/devtools/ci/install.sh index d62c7a2..496c305 100644 --- a/devtools/ci/install.sh +++ b/devtools/ci/install.sh @@ -6,37 +6,22 @@ echo travis_fold:start:install.conda echo Install conda -MINICONDA=Miniconda2-latest-Linux-x86_64.sh - -if [[ "$CONDA_PY" == "27" ]]; then - MINICONDA=Miniconda2-4.2.12-Linux-x86_64.sh -else - MINICONDA=Miniconda3-4.2.12-Linux-x86_64.sh -fi +if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh; fi +if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then MINICONDA=Miniconda3-latest-Linux-x86_64.sh; fi MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *\(.*\)<\/td> */\1/p') + wget https://repo.continuum.io/miniconda/$MINICONDA + if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then echo "Miniconda MD5 mismatch" - echo "Expected: $MINICONDA_MD5" - echo "Found: $(md5sum $MINICONDA | cut -d ' ' -f 1)" exit 1 fi -bash $MINICONDA -b -p $HOME/miniconda - -export PATH=$HOME/miniconda/bin:$PATH -hash -r - -# add omnia and update -conda config --add channels http://conda.anaconda.org/omnia -conda update --yes conda - -conda info -a +bash $MINICONDA -b +rm -f $MINICONDA -echo travis_fold:end:install.conda +export PATH=$HOME/miniconda3/bin:$PATH - # Replace dep1 dep2 ... with your dependencies - - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION dep1 dep2 ... - - source activate test-environment - - python setup.py install \ No newline at end of file +conda update -yq conda +conda install -yq conda-build jinja2 diff --git a/devtools/ci/requirements-conda.txt b/devtools/ci/requirements-conda.txt deleted file mode 100644 index 0e7da67..0000000 --- a/devtools/ci/requirements-conda.txt +++ /dev/null @@ -1,5 +0,0 @@ -jupyter -ipython -ipython-notebook -pip -nose \ No newline at end of file diff --git a/devtools/ci/requirements.txt b/devtools/ci/requirements.txt deleted file mode 100644 index d27f71e..0000000 --- a/devtools/ci/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -pyflakes -scripttest -nose-exclude -coverage -coveralls \ No newline at end of file From 009c0b06544f3dc6d14dea418f9c9e68868fbef2 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Prinz Date: Fri, 4 Nov 2016 23:17:20 +0100 Subject: [PATCH 4/7] update travis and conda stuff --- devtools/ci/{install.sh => install_miniconda.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename devtools/ci/{install.sh => install_miniconda.sh} (100%) diff --git a/devtools/ci/install.sh b/devtools/ci/install_miniconda.sh similarity index 100% rename from devtools/ci/install.sh rename to devtools/ci/install_miniconda.sh From 4e51ae490409bdde42188e21493e078406eaaa00 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Prinz Date: Fri, 4 Nov 2016 23:18:31 +0100 Subject: [PATCH 5/7] update travis and conda stuff --- devtools/{ci => travis-ci}/install_miniconda.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename devtools/{ci => travis-ci}/install_miniconda.sh (100%) diff --git a/devtools/ci/install_miniconda.sh b/devtools/travis-ci/install_miniconda.sh similarity index 100% rename from devtools/ci/install_miniconda.sh rename to devtools/travis-ci/install_miniconda.sh From 39d1cc5e49f50e487d25fb17b31c595729580aa5 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Prinz Date: Fri, 4 Nov 2016 23:20:20 +0100 Subject: [PATCH 6/7] update travis and conda stuff --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd0446c..eb2b1a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,20 +4,12 @@ sudo: false install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install md5sha1sum; fi - source devtools/travis-ci/install_miniconda.sh - # Sets up a MINIConda enviroment in the name of the selected python version - - source devtools/ci/install.sh - # Do not buffer output of python outputs but flush them directly to the terminal - - export PYTHONUNBUFFERED=true script: - # testing is done by running run_test.sh automatically during build - echo travis_fold:start:conda.build.package - conda build devtools/conda-recipe - echo travis_fold:end:conda.build.package - # Upload new docs - - bash -x devtools/ci/after_sucess.sh - env: - CONDA_PY=2.7 CONDA_NPY=1.7 - CONDA_PY=2.7 CONDA_NPY=1.11 From 469d9e7c05ba9449c53f30c40efd86b8545632c5 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Prinz Date: Fri, 4 Nov 2016 23:23:10 +0100 Subject: [PATCH 7/7] fix conda --- devtools/conda-recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/conda-recipe/meta.yaml b/devtools/conda-recipe/meta.yaml index e088f69..ec999dd 100644 --- a/devtools/conda-recipe/meta.yaml +++ b/devtools/conda-recipe/meta.yaml @@ -27,7 +27,7 @@ test: requires: - matplotlib source_files: - - ipynbtest/examples/ipynbtest_tutorial.ipynb + - ipynbtest/examples about: home: https://github.com/jhprinz/ipynb-test