From 7d4c9d22e431fce0fad6d45fb155d79fc29a72bb Mon Sep 17 00:00:00 2001 From: Tobias Megies Date: Sun, 16 Jul 2017 15:49:13 +0200 Subject: [PATCH 1/7] only install obspy packages, run obspy tests to see if env is working and list/export pacakge list --- .travis.yml | 61 ++++++++++++++++++++++------------------------------ appveyor.yml | 58 +++++++++++++++---------------------------------- 2 files changed, 43 insertions(+), 76 deletions(-) diff --git a/.travis.yml b/.travis.yml index 32e1c8d..6636a61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,16 +3,15 @@ language: c env: global: - OBSPY_VERSION=1.0.3 - - PYTHON_VERSION=3.6 sudo: false matrix: include: - os: linux - env: CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py27 + env: PYTHON_VERSION=2.7 CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py27 - os: linux - env: CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py27 ARCHITECTURE_32BIT="True" + env: PYTHON_VERSION=2.7 CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py27 ARCHITECTURE_32BIT="True" addons: apt: packages: @@ -20,12 +19,12 @@ matrix: - libstdc++6:i386 - gcc-multilib - os: osx - env: CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py27 + env: PYTHON_VERSION=2.7 CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py27 - os: linux - env: CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py35 + env: PYTHON_VERSION=3.5 CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py35 - os: linux - env: CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py35 ARCHITECTURE_32BIT="True" + env: PYTHON_VERSION=3.5 CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py35 ARCHITECTURE_32BIT="True" addons: apt: packages: @@ -33,7 +32,7 @@ matrix: - libstdc++6:i386 - gcc-multilib - os: osx - env: CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py35 + env: PYTHON_VERSION=3.5 CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py35 install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then @@ -47,49 +46,41 @@ install: else export ARCH="_64" fi - - wget https://repo.continuum.io/miniconda/Miniconda3-latest-${OS}-x86${ARCH}.sh -O miniconda.sh; + - if [[ "$PYTHON_VERSION" == "2.7" ]]; then + export MINICONDA="Miniconda2-latest"; + elif [[ "$PYTHON_VERSION" == "3.5" ]]; then + export MINICONDA="Miniconda3-3.5.5"; + else + export MINICONDA=""; + fi + - wget https://repo.continuum.io/miniconda/${MINICONDA}-${OS}-x86${ARCH}.sh -O miniconda.sh; - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - hash -r - conda config --set always_yes yes --set changeps1 no - conda update -q conda + - conda config --add channels conda-forge + - conda config --add channels conda-forge + - | + if [[ "$ARCHITECTURE_32BIT" == "True" ]]; then + conda config --add channels obspy + fi + - conda create -q -n test python=$PYTHON_VERSION + - source activate test # Useful for debugging any issues with conda - conda info -a - # Install constructor - - conda install -q --yes constructor + - conda install obspy==${OBSPY_VERSION} # list package versions - - conda list - # try to fix build problems on osx by adding conda-forge channel with top priority - - conda config --add channels conda-forge - - conda config --add channels conda-forge - # build installer - - constructor --verbose --platform=${CONDA_PLATFORM} ${OBSPY_VERSION}_${CONDA_PYSUFFIX} + - conda env export + - conda list --explicit script: # We change directories to make sure that python won't find the copy # of obspy in the source directory, see # https://github.com/numpy/numpy/blob/master/.travis.yml#L44 - - ls -la ObsPy*.sh - mkdir empty - cd empty - - bash ../ObsPy*.sh -b -p $HOME/obspy-anaconda - - $HOME/obspy-anaconda/bin/python -m obspy.scripts.runtests --no-flake8 -n anaconda-installers -r - - cd .. + - python -m obspy.scripts.runtests --no-flake8 -n anaconda-installers -r notifications: email: false - -deploy: - provider: releases - api_key: - secure: r3IIcaiBrVGGGzmn8WpZ5MYehLIKNzwpq8jVwlVrmjVxqbDLbeM2sC1zyGGzmrzcYf7BLQpb1hDZ/E8cod9tDmmuqqjwn5dx9/FtCFF/02aMacD7UmND8J3xEJPChu9gHkmgwSQlih/WELH/qDvKvg8mgWThHtX3Klpre42EJGv2btGFkxTr1zELwBZM9Omn0QNs6eHdnncW12iRYGwpw8jSIZtqZ3X/Mp2EcfspJKqqV0TL322480yU6EGAZq7ZvtZTjj+tor0zx3S2HVLcZlzYmUS9EjJLOMWsGrXYOXxyZxSqYiXye00nNgHeSGxXpejjc3Ipf8rZzw4q5zEooURiIAZ8DPjKLdvnTdRnGi5FVFVUnjYDiO6j6WQliUlGna/9N9C2+UfflAhoOSl96vZDKfcNThJkaa/4gdDB9Z5OGkoGlksaY7tYuyBOs9sZP9B55vgJULEsJRFaa+FtkUfwywtvDWAUzzzJTkh0/uKATXiCJXk6t4GKGuhj5WoV/Vp8bxVQBPofHEEepd4lK3V49XJGInYtJ+2YG5oUvQDGIMxqJQNWcxJaPjWdxCPi9iawOIf7fL6OOgB4uLtSIqPgevXKf5VPDSTMM+DssJa5M0iRlgPUNCBKEJB/+w5eBNCE4x/RZhxBMQb5FznJ3vQfaq3v10qen2jeSY0IUJk= - file_glob: true - file: "ObsPy*.sh" - skip_cleanup: true - on: - tags: true - repo: obspy/anaconda-installers - # try to upload all binaries to one spot.. - name: "${OBSPY_VERSION}" - draft: false - prerelease: false diff --git a/appveyor.yml b/appveyor.yml index 17461b2..34f6ce5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,29 +10,32 @@ environment: # See: http://stackoverflow.com/a/13751649/163740 CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\misc\\appveyor\\run_with_env.cmd" OBSPY_VERSION: "1.0.3" - PYTHON_VERSION: "3.6" matrix: # Pre-installed Python versions, which Appveyor may upgrade to # a later point release. # See: http://www.appveyor.com/docs/installed-software#python - - PYTHON: "C:\\Miniconda36-x64" + - PYTHON: "C:\\Miniconda-x64" + PYTHON_VERSION: "2.7" PYTHON_ARCH: "64" CONDA_PLATFORM: "win-64" CONDA_PYSUFFIX: "py27" - - PYTHON: "C:\\Miniconda36" + - PYTHON: "C:\\Miniconda" + PYTHON_VERSION: "2.7" PYTHON_ARCH: "32" CONDA_PLATFORM: "win-32" CONDA_PYSUFFIX: "py27" - - PYTHON: "C:\\Miniconda36-x64" + - PYTHON: "C:\\Miniconda35-x64" + PYTHON_VERSION: "3.5" PYTHON_ARCH: "64" CONDA_PLATFORM: "win-64" CONDA_PYSUFFIX: "py35" - - PYTHON: "C:\\Miniconda36" + - PYTHON: "C:\\Miniconda35" + PYTHON_VERSION: "3.5" PYTHON_ARCH: "32" CONDA_PLATFORM: "win-32" CONDA_PYSUFFIX: "py35" @@ -59,47 +62,20 @@ install: - "python -c \"import sys; print(sys.version)\"" # Install the build and runtime dependencies of the project. - "conda update -q --yes conda" - # Install constructor - - "conda install -q --yes constructor" + - "conda config --add channels conda-forge" + - "conda config --add channels conda-forge" + - "conda info -a" + - "conda create -q --yes -n test python=%PYTHON_VERSION%" + - "activate test" + - "conda install --yes obspy==%OBSPY_VERSION%" # list package versions - - "conda list" - # patch constructor's makensis call to maximum verbosity, see conda/constructor#94 - - "python patch_makensis_verbosity.py" - # build installer - - "constructor --verbose --platform=%CONDA_PLATFORM% %OBSPY_VERSION%_%CONDA_PYSUFFIX%" + - "conda env export" + - "conda list --explicit" # Not a .NET project, we build ObsPy in the install step instead build: false test_script: - - ps: "ls ObsPy*.exe" - - "for %%# in (ObsPy*.exe) do set \"file_name=%%~nx#\"" - - "echo %file_name%" - # instructions for silent installation of Anaconda installer: https://conda.io/docs/help/silent.html - - "start /wait \"\" %file_name% /InstallationType=JustMe /RegisterPython=0 /AddToPath=1 /S /D=C:\\ObsPy-Anaconda" # XXX - "C:\\ObsPy-Anaconda\\python -m obspy.scripts.runtests --no-flake8 -n anaconda-installers -r" # XXX for now only test core, to get passing tests, should be reverted! - - "C:\\ObsPy-Anaconda\\python -m obspy.scripts.runtests --no-flake8 -n anaconda-installers -r core" - -on_success: - - ps: "ls ObsPy*.exe" - -artifacts: - - path: 'ObsPy*.exe' - -# Deploying binary installer as a release attachment seems to not work across -# repositories, i.e. we can't automatically deploy to obspy/obspy from -# obspy/anconda-installers, so rely on manually attaching installers to github -# releases.. -deploy: - release: $(OBSPY_VERSION) - description: 'Anaconda ObsPy installers' - provider: GitHub - auth_token: - secure: PAE+Y4BDSdConf033yv0vKhmeIevni93HJAX1qg/FpV+IU9eeUTDCTdbHjP0lblY - artifact: /ObsPy*.exe/ - draft: false - prerelease: false - force_update: true - on: - appveyor_repo_tag: true # deploy on tag push only + - "python -m obspy.scripts.runtests --no-flake8 -n anaconda-installers -r core" From 45f8bdae8f3e857898b4d1ad2ef5690c342c4833 Mon Sep 17 00:00:00 2001 From: Tobias Megies Date: Sun, 16 Jul 2017 21:43:32 +0200 Subject: [PATCH 2/7] install all optional dependencies and additional stuff we're interested in to have in anaconda installer.. --- .travis.yml | 11 ++++++++++- appveyor.yml | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6636a61..e672a07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,16 @@ install: - source activate test # Useful for debugging any issues with conda - conda info -a - - conda install obspy==${OBSPY_VERSION} + - | + if [[ "$ARCHITECTURE_32BIT" == "True" ]]; then + # linux32 doesnt have basemap-data-hires + conda install obspy==${OBSPY_VERSION} ipython jupyter basemap nomkl sqlalchemy gdal + elif [[ "$OS" == "Linux" ]]; then + # only linux64 has geographiclib + conda install obspy==${OBSPY_VERSION} ipython jupyter basemap nomkl sqlalchemy gdal basemap-data-hires geographiclib + else + conda install obspy==${OBSPY_VERSION} ipython jupyter basemap nomkl sqlalchemy gdal basemap-data-hires + fi # list package versions - conda env export - conda list --explicit diff --git a/appveyor.yml b/appveyor.yml index 34f6ce5..e6d30f5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -67,7 +67,7 @@ install: - "conda info -a" - "conda create -q --yes -n test python=%PYTHON_VERSION%" - "activate test" - - "conda install --yes obspy==%OBSPY_VERSION%" + - "conda install --yes obspy==%OBSPY_VERSION% ipython jupyter basemap basemap-data-hires sqlalchemy gdal mkl" # list package versions - "conda env export" - "conda list --explicit" From 84b06e4b83a60330030b0992a9e4b06c92aa07fe Mon Sep 17 00:00:00 2001 From: Tobias Megies Date: Mon, 24 Jul 2017 10:45:39 +0200 Subject: [PATCH 3/7] empty dummy commit to trigger CI From 97105e9ce445691e99087f6019f698311ebc51b1 Mon Sep 17 00:00:00 2001 From: Tobias Megies Date: Wed, 1 Nov 2017 12:34:09 +0100 Subject: [PATCH 4/7] try to get working conda installations in CI for obspy 1.1.0 --- .travis.yml | 22 ++++++++++------------ appveyor.yml | 16 ++++++++++------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index e672a07..ac75053 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: c env: global: - - OBSPY_VERSION=1.0.3 + - OBSPY_VERSION=1.1.0 sudo: false @@ -22,7 +22,7 @@ matrix: env: PYTHON_VERSION=2.7 CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py27 - os: linux - env: PYTHON_VERSION=3.5 CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py35 + env: PYTHON_VERSION=3.6 CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py36 - os: linux env: PYTHON_VERSION=3.5 CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py35 ARCHITECTURE_32BIT="True" addons: @@ -32,7 +32,7 @@ matrix: - libstdc++6:i386 - gcc-multilib - os: osx - env: PYTHON_VERSION=3.5 CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py35 + env: PYTHON_VERSION=3.6 CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py36 install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then @@ -48,10 +48,8 @@ install: fi - if [[ "$PYTHON_VERSION" == "2.7" ]]; then export MINICONDA="Miniconda2-latest"; - elif [[ "$PYTHON_VERSION" == "3.5" ]]; then - export MINICONDA="Miniconda3-3.5.5"; else - export MINICONDA=""; + export MINICONDA="Miniconda3-3.5.5"; fi - wget https://repo.continuum.io/miniconda/${MINICONDA}-${OS}-x86${ARCH}.sh -O miniconda.sh; - bash miniconda.sh -b -p $HOME/miniconda @@ -69,15 +67,15 @@ install: - source activate test # Useful for debugging any issues with conda - conda info -a + - if [[ "$PYTHON_VERSION" == "2.7" ]]; then + conda install mock; + fi - | if [[ "$ARCHITECTURE_32BIT" == "True" ]]; then - # linux32 doesnt have basemap-data-hires - conda install obspy==${OBSPY_VERSION} ipython jupyter basemap nomkl sqlalchemy gdal - elif [[ "$OS" == "Linux" ]]; then - # only linux64 has geographiclib - conda install obspy==${OBSPY_VERSION} ipython jupyter basemap nomkl sqlalchemy gdal basemap-data-hires geographiclib + # linux32 doesnt have basemap-data-hires and also no geographiclib + conda install obspy==${OBSPY_VERSION} ipython jupyter basemap nomkl sqlalchemy pyshp cryptography else - conda install obspy==${OBSPY_VERSION} ipython jupyter basemap nomkl sqlalchemy gdal basemap-data-hires + conda install obspy==${OBSPY_VERSION} ipython jupyter basemap nomkl sqlalchemy pyshp cryptography basemap-data-hires geographiclib fi # list package versions - conda env export diff --git a/appveyor.yml b/appveyor.yml index e6d30f5..bfb840d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ environment: # /E:ON and /V:ON options are not enabled in the batch script intepreter # See: http://stackoverflow.com/a/13751649/163740 CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\misc\\appveyor\\run_with_env.cmd" - OBSPY_VERSION: "1.0.3" + OBSPY_VERSION: "1.1.0" matrix: # Pre-installed Python versions, which Appveyor may upgrade to @@ -29,16 +29,16 @@ environment: CONDA_PYSUFFIX: "py27" - PYTHON: "C:\\Miniconda35-x64" - PYTHON_VERSION: "3.5" + PYTHON_VERSION: "3.6" PYTHON_ARCH: "64" CONDA_PLATFORM: "win-64" - CONDA_PYSUFFIX: "py35" + CONDA_PYSUFFIX: "py36" - PYTHON: "C:\\Miniconda35" - PYTHON_VERSION: "3.5" + PYTHON_VERSION: "3.6" PYTHON_ARCH: "32" CONDA_PLATFORM: "win-32" - CONDA_PYSUFFIX: "py35" + CONDA_PYSUFFIX: "py36" platform: - x64 @@ -67,7 +67,11 @@ install: - "conda info -a" - "conda create -q --yes -n test python=%PYTHON_VERSION%" - "activate test" - - "conda install --yes obspy==%OBSPY_VERSION% ipython jupyter basemap basemap-data-hires sqlalchemy gdal mkl" + - ps: | + If ($env:PYTHON_VERSION -eq "2.7") { + conda install --yes mock + } + - "conda install --yes obspy==%OBSPY_VERSION% ipython jupyter basemap basemap-data-hires sqlalchemy pyshp mkl geographiclib cryptography" # list package versions - "conda env export" - "conda list --explicit" From f58d94cf48a2a7e72b89eff5b2114d9c01d6a700 Mon Sep 17 00:00:00 2001 From: Tobias Megies Date: Wed, 1 Nov 2017 13:52:19 +0100 Subject: [PATCH 5/7] fix 32bit installation in Travis --- .travis.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index ac75053..0c3e4f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,12 +12,6 @@ matrix: env: PYTHON_VERSION=2.7 CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py27 - os: linux env: PYTHON_VERSION=2.7 CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py27 ARCHITECTURE_32BIT="True" - addons: - apt: - packages: - # https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise - - libstdc++6:i386 - - gcc-multilib - os: osx env: PYTHON_VERSION=2.7 CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py27 @@ -25,15 +19,23 @@ matrix: env: PYTHON_VERSION=3.6 CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py36 - os: linux env: PYTHON_VERSION=3.5 CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py35 ARCHITECTURE_32BIT="True" - addons: - apt: - packages: - # https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise - - libstdc++6:i386 - - gcc-multilib - os: osx env: PYTHON_VERSION=3.6 CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py36 +# it seems Travis is now ignoring addons/apt/packages when nested into +# matrix/includes, so manually install those packages: +# $ travis lint .travis.yml +# Warnings for .travis.yml: +# [x] in matrix.include section: unexpected key addons, dropping +# See also +# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise +before_install: + - | + if [[ "$ARCHITECTURE_32BIT" == "True" ]]; then + sudo apt-get -qq update; + sudo apt-get install -y libstdc++6:i386 gcc-multilib; + fi + install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export OS="MacOSX"; From 606c49e696419838f31b5053c7e5a3cbc98bec86 Mon Sep 17 00:00:00 2001 From: Tobias Megies Date: Thu, 2 Nov 2017 14:18:49 +0100 Subject: [PATCH 6/7] try to get miniconda installed on py35 32bit in Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0c3e4f1..fc14531 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +54,7 @@ install: export MINICONDA="Miniconda3-3.5.5"; fi - wget https://repo.continuum.io/miniconda/${MINICONDA}-${OS}-x86${ARCH}.sh -O miniconda.sh; - - bash miniconda.sh -b -p $HOME/miniconda + - yes yes | bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - hash -r - conda config --set always_yes yes --set changeps1 no From 8202f7d92f957bf98d1a8947c7ce602f808ddc66 Mon Sep 17 00:00:00 2001 From: Tobias Megies Date: Wed, 8 Nov 2017 19:21:30 +0100 Subject: [PATCH 7/7] empty dummy commit