forked from quantopian/trading_calendars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
83 lines (66 loc) · 2.9 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
#matrix:
# fast_finish: true
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 intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\appveyor\\run_with_env.cmd"
CONDA_ROOT_PYTHON_VERSION: "2.7"
PYTHON_ARCH: "64"
matrix:
- PYTHON_VERSION: "2.7"
PANDAS_VERSION: "0.18.1"
NUMPY_VERSION: "1.11.3"
- PYTHON_VERSION: "2.7"
PANDAS_VERSION: "0.23.4"
NUMPY_VERSION: "1.15.2"
- PYTHON_VERSION: "3.5"
PANDAS_VERSION: "0.18.1"
NUMPY_VERSION: "1.11.3"
- PYTHON_VERSION: "3.5"
PANDAS_VERSION: "0.23.4"
NUMPY_VERSION: "1.15.2"
# We always use a 64-bit machine, but can build x86 distributions
# with the PYTHON_ARCH variable (which is used by CMD_IN_ENV).
platform:
- x64
cache:
- '%LOCALAPPDATA%\pip\Cache'
# all our python builds have to happen in tests_script...
build: false
init:
- "ECHO %PYTHON_VERSION% %PYTHON_ARCH% %PYTHON%"
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 it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# 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." }
- ps: $PY_VERSION_ARR=$env:PYTHON_VERSION -split '.', 0, 'simplematch'
- ps: $env:CONDA_PY=$PY_VERSION_ARR[0..1] -join ""
- SET PYTHON=C:\Python%CONDA_PY%_64
# Get cygwin's git out of our PATH. See https://github.com/omnia-md/conda-dev-recipes/pull/16/files#diff-180360612c6b8c4ed830919bbb4dd459
- "del C:\\cygwin\\bin\\git.exe"
# this installs the appropriate Miniconda (Py2/Py3, 32/64 bit),
- powershell .\ci\appveyor\install.ps1
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- conda info -a
- conda install conda=4.3.30 conda-build=3.0.28 anaconda-client=1.6.3 --yes -q
- conda list
# https://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/ for 64bit C compilation
- ps: copy .\ci\appveyor\vcvars64.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64"
- conda create -n testenv --yes -q python=%PYTHON_VERSION% numpy=%NUMPY_VERSION% pandas=%PANDAS_VERSION% -c quantopian
- activate testenv
- python -m pip install -r etc/requirements.txt
- python -m pip freeze | sort
test_script:
- flake8 trading_calendars tests
- nosetests tests
branches:
only:
- master