forked from brian-team/brian2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
130 lines (114 loc) · 4.21 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# CI configuration for Windows tests on appveyor
# Based on Olivier Grisel's python-appveyor-demo
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 .\\dev\\continuous-integration\\appveyor\\run_with_env.cmd"
BINSTAR_TOKEN:
secure: haSplg2ccSWy75ajN104ThiOv2LQv95O/yb35ZzJewFb+hKxpJj8slJF7j1HAUdW
matrix:
- PYTHON: "C:\\Python27-conda32"
PYTHON_VERSION: "2.7.8"
PYTHON_ARCH: "32"
STANDALONE: "FALSE"
CONDA_PY: "27"
CONDA_NPY: "19"
CONDA_BUILD: "TRUE"
SPLIT_RUN: "1"
- PYTHON: "C:\\Python27-conda32"
PYTHON_VERSION: "2.7.8"
PYTHON_ARCH: "32"
STANDALONE: "FALSE"
CONDA_PY: "27"
CONDA_NPY: "19"
CONDA_BUILD: "FALSE"
SPLIT_RUN: "2"
- PYTHON: "C:\\Python27-conda64"
PYTHON_VERSION: "2.7.8"
PYTHON_ARCH: "64"
STANDALONE: "FALSE"
CONDA_PY: "27"
CONDA_NPY: "19"
CONDA_BUILD: "TRUE"
SPLIT_RUN: "1"
- PYTHON: "C:\\Python27-conda64"
PYTHON_VERSION: "2.7.8"
PYTHON_ARCH: "64"
STANDALONE: "FALSE"
CONDA_PY: "27"
CONDA_NPY: "19"
CONDA_BUILD: "FALSE"
SPLIT_RUN: "2"
- PYTHON: "C:\\Python34-conda32"
PYTHON_VERSION: "3.4.1"
PYTHON_ARCH: "32"
STANDALONE: "FALSE"
CONDA_PY: "34"
CONDA_NPY: "19"
CONDA_BUILD: "TRUE"
SPLIT_RUN: "FALSE"
- PYTHON: "C:\\Python34-conda64"
PYTHON_VERSION: "3.4.1"
PYTHON_ARCH: "64"
STANDALONE: "FALSE"
CONDA_PY: "34"
CONDA_NPY: "19"
CONDA_BUILD: "TRUE"
SPLIT_RUN: "FALSE"
- PYTHON: "C:\\Python27-conda32"
PYTHON_VERSION: "2.7.8"
PYTHON_ARCH: "32"
STANDALONE: "TRUE"
- PYTHON: "C:\\Python27-conda64"
PYTHON_VERSION: "2.7.8"
PYTHON_ARCH: "64"
STANDALONE: "TRUE"
install:
# Install Python and miniconda
- 'powershell .\dev\continuous-integration\appveyor\install_python.ps1'
# Add the paths
- 'set PATH=%PYTHON%;%PYTHON%/Scripts;%PATH%'
# Check that we have the expected version and architecture for Python
- 'python --version'
- 'python -c "import struct; print(struct.calcsize(''P'') * 8)"'
# Install the build dependencies of the project via conda
- 'conda install --yes --quiet numpy scipy nose sphinx sympy pyparsing jinja2 ipython setuptools cython'
- 'pip install py-cpuinfo'
- 'IF "%CONDA_BUILD%" == "TRUE" (conda install --yes --quiet conda-build anaconda-client pip)'
build: false # Not a C# project, build stuff at the test step instead.
test_script:
# Run the test suite
- '%CMD_IN_ENV% python -c "import sys; print(sys.executable)"'
- 'IF "%CONDA_BUILD%" == "TRUE" (
%CMD_IN_ENV% conda build dev\conda-recipe --quiet &
%CMD_IN_ENV% python dev\continuous-integration\move-conda-package.py dev\conda-recipe
)'
- '%CMD_IN_ENV% python setup.py install'
- 'set SRC_DIR=%CD%'
- 'cd \'
# Since "CMD_IN_ENV" assumes we are in the source directory we cannot use it
# here. We therefore copy its content and use the correct path
- 'cmd /E:ON /V:ON /C %SRC_DIR%\dev\continuous-integration\appveyor\run_with_env.cmd python %SRC_DIR%\dev\continuous-integration\appveyor\run_test_suite.py'
after_test:
- 'IF "%CONDA_BUILD%" == "TRUE" (
pip install wheel &
cd %SRC_DIR% &
%CMD_IN_ENV% python setup.py bdist_wheel &
%CMD_IN_ENV% python setup.py bdist_wininst
)'
artifacts:
# Archive the generated conda package in the ci.appveyor.com build report.
- path: '*.tar.bz2'
name: conda package
- path: dist\*
name: PyPI binaries
on_success:
# Upload built binaries to binstar.org. The globbing and handling of the
# exit-status code is tricky in cmd.exe or powershell, so we're just using
# a python script.
#
# We only upload to binstar for commits merged into the master branch
- 'cd %SRC_DIR%'
- 'if "%CONDA_BUILD%" == "TRUE" if "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" if "%APPVEYOR_REPO_NAME%" == "brian-team/brian2" if "%APPVEYOR_REPO_BRANCH%" == "master" python dev\continuous-integration\conda-server-push.py'