From a64e3aea098221c261a912567d94d54f512b9a57 Mon Sep 17 00:00:00 2001 From: Benjamin Winkel Date: Thu, 13 Jul 2017 02:12:37 +0200 Subject: [PATCH] downloading SRTM data in CI --- .travis.yml | 11 ++++++++++- appveyor.yml | 13 ++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d56093d57..ca48a240f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,8 @@ env: - PIP_DEPENDENCIES='' - EVENT_TYPE='pull_request push' - - SRTMDATA=${TRAVIS_BUILD_DIR}/pycraf/pathprof/tests/srtm + # - SRTMDATA=${TRAVIS_BUILD_DIR}/pycraf/pathprof/tests/srtm + - SRTMDATA=${TRAVIS_BUILD_DIR}/srtm - OMP_NUM_THREADS=2 - TWINE_USERNAME=bwinkel @@ -128,6 +129,13 @@ before_install: install: + # download SRTM data for tests + - wget -P ${TRAVIS_BUILD_DIR}/srtm/ http://viewfinderpanoramas.org/dem3/M32.zip + - wget -P ${TRAVIS_BUILD_DIR}/srtm/ http://viewfinderpanoramas.org/dem3/N32.zip + - unzip ${TRAVIS_BUILD_DIR}/srtm/M32.zip -d ${TRAVIS_BUILD_DIR}/srtm/ + - unzip ${TRAVIS_BUILD_DIR}/srtm/N32.zip -d ${TRAVIS_BUILD_DIR}/srtm/ + - mv ${TRAVIS_BUILD_DIR}/srtm/{M,N}*/*.hgt ${TRAVIS_BUILD_DIR}/srtm/ + # We now use the ci-helpers package to set up our testing environment. # This is done by using Miniconda and then using conda and pip to install # dependencies. Which dependencies are installed using conda and pip is @@ -142,6 +150,7 @@ install: - git clone git://github.com/astropy/ci-helpers.git - source ci-helpers/travis/setup_conda.sh + # As described above, using ci-helpers, you should be able to set up an # environment with dependencies installed using conda and pip, but in some # cases this may not provide enough flexibility in how to install a diff --git a/appveyor.yml b/appveyor.yml index ff73cb381..629fa13f0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,7 +5,8 @@ environment: # In the Appveyor UI, add your PyPI password as TWINE_PASSWORD (click # Settings > Environment > Add Variable...). Make sure to mark it as private! TWINE_USERNAME: bwinkel - SRTMDATA: "%APPVEYOR_BUILD_FOLDER%\\pycraf\\pathprof\\tests\\srtm" + # SRTMDATA: "%APPVEYOR_BUILD_FOLDER%\\pycraf\\pathprof\\tests\\srtm" + SRTMDATA: "%APPVEYOR_BUILD_FOLDER%\\srtm" global: PYTHON: "C:\\conda" @@ -40,10 +41,16 @@ platform: -x64 install: + # downloading srtm data + - "mkdir %SRTMDATA%" + - "powershell -command \"& { Invoke-WebRequest -Uri 'http://viewfinderpanoramas.org/dem3/M32.zip' -OutFile '%SRTMDATA%\\M32.zip' }\"" + - "powershell -command \"& { Expand-Archive '%SRTMDATA%\\M32.zip' -DestinationPath '%SRTMDATA%\\' }\"" + - "powershell -command \"& { Move-Item '%SRTMDATA%\\*\\*.hgt' '%SRTMDATA%\\' }\"" - "git clone git://github.com/astropy/ci-helpers.git" - "powershell ci-helpers/appveyor/install-miniconda.ps1" - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - "activate test" + # - "powershell -command \"& { (New-Object Net.WebClient).DownloadFile('http://viewfinderpanoramas.org/dem3/M32.zip', '%SRTMDATA%/') }\"" # Not a .NET project, we build the package in the install step instead build: false @@ -57,6 +64,10 @@ after_test: - "%CMD_IN_ENV% python setup.py bdist_wininst" - "%CMD_IN_ENV% python setup.py bdist_msi" +artifacts: + # bdist_wheel puts your built wheel in the dist directory + - path: dist\* + on_success: # You can use this step to upload your artifacts to a public website. # See Appveyor's documentation for more details. Or you can simply