Skip to content

Commit

Permalink
downloading SRTM data in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Winkel committed Jul 13, 2017
1 parent f41961b commit a64e3ae
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 12 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a64e3ae

Please sign in to comment.