forked from dipy/dipy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
92 lines (82 loc) · 3.22 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# vim ft=yaml
# CI on Windows via appveyor
environment:
global:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script interpreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\tools\\run_with_env.cmd"
DEPENDS: "cython numpy scipy matplotlib h5py"
INSTALL_TYPE: "requirements"
EXTRA_PIP_FLAGS: "--timeout=60"
matrix:
- PYTHON: C:\Python27-x64
- PYTHON: C:\Python35-x64
- PYTHON: C:\Python36
- PYTHON: C:\Python36-x64
- PYTHON: C:\Python36-x64
INSTALL_TYPE: "pip"
COVERAGE: 1
platform:
- x64
init:
- systeminfo
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds.
# credits: JuliaLang developers.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
- "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- ps: $env:PIPI = "pip install $env:EXTRA_PIP_FLAGS"
- echo %PIPI%
# Check that we have the expected version and architecture for Python
- "python --version"
- ps: $env:PYTHON_ARCH = python -c "import struct; print(struct.calcsize('P') * 8)"
- ps: $env:PYTHON_VERSION = python -c "import platform;print(platform.python_version())"
- cmd: echo %PYTHON_VERSION% %PYTHON_ARCH%
- ps: |
if($env:PYTHON -match "conda")
{
conda update -yq conda
Invoke-Expression "conda install -yq pip $env:DEPENDS"
pip install nibabel cvxpy scikit-learn
}
else
{
python -m pip install -U pip
pip --version
if($env:INSTALL_TYPE -match "requirements")
{
Invoke-Expression "$env:PIPI -r requirements.txt"
}
else
{
Invoke-Expression "$env:PIPI $env:DEPENDS"
}
Invoke-Expression "$env:PIPI nibabel matplotlib scikit-learn cvxpy"
}
- "%CMD_IN_ENV% python setup.py build_ext --inplace"
- "%CMD_IN_ENV% %PIPI% --user -e ."
build: false # Not a C# project, build stuff at the test step instead.
test_script:
- pip install nose coverage coveralls codecov
- mkdir for_testing
- cd for_testing
- echo backend:Agg > matplotlibrc
- if exist ../.coveragerc (cp ../.coveragerc .) else (echo no .coveragerc)
- ps: |
if ($env:COVERAGE)
{
$env:COVER_ARGS = "--with-coverage --cover-package dipy"
}
- cmd: echo %COVER_ARGS%
- nosetests --with-doctest --verbose %COVER_ARGS% dipy
cache:
# Avoid re-downloading large packages
- '%APPDATA%\pip\Cache'