|
| 1 | +# AppVeyor config for GridDataFormats |
| 2 | +# |
| 3 | +# config based on MDAnalysis, which was based on |
| 4 | +# examples from SciPy & NumPy repositories, which |
| 5 | +# themselves credit an original example by Olivier Grisel at |
| 6 | +# https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml |
| 7 | +clone_depth: 50 |
| 8 | +max_jobs: 100 |
| 9 | + |
| 10 | +cache: |
| 11 | + - '%LOCALAPPDATA%\pip\Cache' |
| 12 | + |
| 13 | +image: |
| 14 | + - Visual Studio 2015 |
| 15 | + |
| 16 | +environment: |
| 17 | + global: |
| 18 | + CONDA_CHANNELS: conda-forge |
| 19 | + CONDA_DEPENDENCIES: pip setuptools wheel six scipy vs2015_runtime pytest pytest-cov codecov |
| 20 | + DEBUG: "False" |
| 21 | + MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin |
| 22 | + OPENBLAS_64: https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-5f998ef_gcc7_1_0_win64.zip |
| 23 | + APPVEYOR_SAVE_CACHE_ON_ERROR: true |
| 24 | + APPVEYOR_SKIP_FINALIZE_ON_EXIT: true |
| 25 | + TEST_TIMEOUT: 1000 |
| 26 | + PYTHON: "C:\\conda" |
| 27 | + MINICONDA_VERSION: "latest" |
| 28 | + |
| 29 | + matrix: |
| 30 | + - PYTHON_VERSION: 3.6 |
| 31 | + PYTHON_ARCH: 64 |
| 32 | + MSVC_VERSION: "Visual Studio 10 Win64" |
| 33 | + |
| 34 | +init: |
| 35 | + - ps: Write-Host ${env:PYTHON} ${env:PYTHON_VERSION} ${env:PYTHON_ARCH} |
| 36 | + - ps: Write-Host ${env:APPVEYOR_SCHEDULED_BUILD} |
| 37 | + # cancel build if newer one is submitted; complicated |
| 38 | + # details for getting this to work are credited to JuliaLang |
| 39 | + # developers |
| 40 | + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` |
| 41 | + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` |
| 42 | + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` |
| 43 | + raise "There are newer queued builds for this pull request, skipping build." |
| 44 | + } |
| 45 | + |
| 46 | +install: |
| 47 | + # set up a conda env |
| 48 | + - ps: git clone -q --depth 1 git://github.com/astropy/ci-helpers.git |
| 49 | + - ps: ci-helpers/appveyor/install-miniconda.ps1 |
| 50 | + - ps: $env:PATH = "${env:PYTHON};${env:PYTHON}\Scripts;" + $env:PATH |
| 51 | + # deal with missing stdint.h as previously described |
| 52 | + # see https://github.com/swistakm/pyimgui/blob/master/.appveyor.yml |
| 53 | + - ps: cp "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h" "C:\Users\appveyor\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\stdint.h" |
| 54 | + - ps: activate test |
| 55 | + |
| 56 | +build_script: |
| 57 | + - cmd: C:\conda\envs\test\python.exe setup.py develop --no-deps --user 3>&1 |
| 58 | + |
| 59 | +test_script: |
| 60 | + - cmd: C:\conda\envs\test\python.exe setup.py develop --no-deps --user 3>&1 |
| 61 | + - cmd: C:\conda\envs\test\Scripts\pytest.exe --cov=gridData 3>&1 |
| 62 | + - cmd: codecov |
| 63 | + |
| 64 | +after_build: |
| 65 | + # cache cleanup |
| 66 | + - C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -mtime +360 -delete |
| 67 | + - C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -size +10M -delete |
| 68 | + - C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -empty -delete |
| 69 | + # Show size of cache |
| 70 | + - C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache" |
0 commit comments