-
Notifications
You must be signed in to change notification settings - Fork 279
/
appveyor.yml
241 lines (191 loc) · 7.67 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
#---------------------------------#
# general configuration #
#---------------------------------#
image: Visual Studio 2015
# version format
version: 0.3.0.{build}
branches:
except:
- gh-pages
skip_commits:
# Add [av skip] to commit messages to skip AppVeyor building
# Add [ci skip] to skip Travis and AppVeyor building
message: /\[av skip\]/
#---------------------------------#
# environment configuration #
#---------------------------------#
# http://www.appveyor.com/docs/environment-variables
# http://www.appveyor.com/docs/installed-software
init:
- git config --global core.autocrlf input
clone_folder: c:\projects\nupic-core
clone_depth: 1
# Can't have a shallow clone because the CMake process will be
# calling into git to write the current SHA into the binaries.
shallow_clone: false
environment:
COMPILER_FAMILY: GCC
AWS_ACCESS_KEY_ID:
secure: /9U0mCHp3k1U8Y5CY/kDqwCKG2gqchG/T/UlVWo8SME=
AWS_SECRET_ACCESS_KEY:
secure: /8wO17Gir0XAiecJkHeE3jxOJzvyl0+uWcl7BKCuN0FC795golsL8905VmNuRl1o
PYPI_USERNAME: numenta
PYPI_PASSWORD:
secure: UgABryPYZg823OcD1XRosA==
matrix:
# Win64-gcc
- PYTHON_VERSION: "2.7.9"
PYTHON_ARCH: "64"
PYTHONHOME: "C:\\Python27-x64"
NC_CMAKE_GENERATOR: "MinGW Makefiles"
external_static_subdir: "windows64-gcc"
wheel_name_suffix: "win_amd64"
# Win32-gcc
# - PYTHON_VERSION: "2.7.9"
# PYTHON_ARCH: "32"
# PYTHONHOME: "C:\\Python27"
# NC_CMAKE_GENERATOR: "MinGW Makefiles"
# external_static_subdir: "windows32-gcc"
# wheel_name_suffix: "win32"
# # Win64-Visual Studio
# - PYTHON_VERSION: "2.7.9"
# PYTHON_ARCH: "64"
# PYTHONHOME: "C:\\Python27-x64"
# NC_CMAKE_GENERATOR: "Visual Studio 14 2015 Win64"
# external_static_subdir: "windows64"
# wheel_name_suffix: "win_amd64"
matrix:
allow_failures:
# Checking if Visual Studio build is possible
- NC_CMAKE_GENERATOR: "Visual Studio 14 2015 Win64"
#---------------------------------#
# build configuration #
#---------------------------------#
# configuration values must be compatible with CMAKE_BUILD_TYPE: Debug or Release
configuration: Release
install:
# Dump appveyor build vars for diagnostics
- "ECHO APPVEYOR_FORCED_BUILD: %APPVEYOR_FORCED_BUILD%"
- "ECHO APPVEYOR_RE_BUILD: %APPVEYOR_RE_BUILD%"
- set NUPIC_CORE=c:\projects\nupic-core
- set EXTERNAL_WINDOWS_DIR=%NUPIC_CORE%\external\%external_static_subdir%
- set ARTIFACTS_DIR=%NUPIC_CORE%\build\artifacts
- for /f %%i in ('type VERSION') do set BINDINGS_VERSION=%%i
- echo Binding version = %BINDINGS_VERSION%
- set PYTHONPATH=%PYTHONHOME%
- set PATH=%PYTHONHOME%\Scripts;%PYTHONHOME%;%PATH%
# Make unix-compatible patch.exe available to the build by copying it from
# Git\usr\bin (that we remove from PATH) to another directory and adding it to
# PATH; the reason we copy it is that logic below removes
# C:\Program Files\Git\usr\bin from Path to avoid build issue resulting from
# sh.exe being on the path.
- mkdir "C:\Program Files\PatchFromGit"
- ps: copy "C:\Program Files\Git\usr\bin\patch.exe" "C:\Program Files\PatchFromGit"
- ps: copy "C:\Program Files\Git\usr\bin\msys*.dll" "C:\Program Files\PatchFromGit"
- set PATH=C:\Program Files\PatchFromGit;%PATH%
- echo %PATH%
#
# Install Python 2.7.x, Pip, Wheel, and NumPy
#
- cd %NUPIC_CORE%\ci\appveyor
- ps: .\install_python_pip.ps1
#
# Install mingwpy toolchain
#
- ECHO "Installing MinGW toolchain for Python"
# Install the version of mingwpy toolchain that generates targets compatible
# with the installed python (Win32 vs. Win64). The compiler tools are
# installed into %PYTHONHOME%/Scripts/
- cmd: "%PYTHONHOME%\\Scripts\\pip.exe install -i https://pypi.anaconda.org/carlkl/simple mingwpy==0.1.0b3"
- cmd: "where g++"
- cmd: "g++ --version"
- cmd: "dir %PYTHONHOME%\\share\\mingwpy"
# Setup MinGW GCC as a valid distutils compiler
- cp %EXTERNAL_WINDOWS_DIR%\bin\distutils.cfg %PYTHONHOME%\Lib\distutils\distutils.cfg
# Display the version and architecture for Python to help with diagnostics
- "python --version"
- "where python"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
# It's useful to know our cmake version
- cmd: where cmake
- cmd: cmake --version
# Check NumPy, etc. installed correctly
- cmd: pip list
- cd %NUPIC_CORE%
- mkdir %NUPIC_CORE%\build\
- mkdir %NUPIC_CORE%\build\release
- mkdir %NUPIC_CORE%\build\scripts
# Remove sh.exe from the paths (CMake doesn't like it)
- set PATH=%PATH:C:\Program Files (x86)\Git\bin;=%
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- set PATH=%PATH:C:\MinGW\msys\1.0\bin;=%
# Verify that patch command is available
- "where patch"
# Fake KJ-Async and Capnp-RPC libs, not needed in Lite mode
# http://www.cmake.org/Wiki/CmakeMingw
- cd %NUPIC_CORE%\build\scripts
- cmake -G "%NC_CMAKE_GENERATOR%"
-DCMAKE_BUILD_TYPE=%configuration%
-DCMAKE_INSTALL_PREFIX=%NUPIC_CORE%\build\release
-DPY_EXTENSIONS_DIR=%NUPIC_CORE%\bindings\py\src\nupic\bindings
%NUPIC_CORE%
build_script:
- cd %NUPIC_CORE%\build\scripts
# Run build, using portable, toolchain-agnostic mechanism to start it
- cmake.exe --build "%NUPIC_CORE%\build\scripts" --target install --config %configuration%
- cd %NUPIC_CORE%
- python setup.py sdist bdist bdist_wheel
- set NUPIC_BINDINGS_WHEEL_NAME=nupic.bindings-%BINDINGS_VERSION%-cp27-none-%wheel_name_suffix%.whl
# Copy final wheel to NUPIC_CORE, so that AppVeyor can see it as an artifact
- ps: copy .\bindings\py\dist\$env:NUPIC_BINDINGS_WHEEL_NAME .
# Copy final wheel, to appropriately named wheel for use with NuPIC
# iterative builds (via nupic\.nupic_modules long-SHA reference).
# Ties in with this Pip regex;
# https://github.com/pypa/pip/blob/develop/pip/wheel.py#L616
- ps: copy .\$env:NUPIC_BINDINGS_WHEEL_NAME .\nupic.bindings-$env:APPVEYOR_REPO_COMMIT-cp27-none-$env:wheel_name_suffix.whl
after_build:
# Install nupic.bindings first, because py_region_test.exe depends on it.
- pip install .\%NUPIC_BINDINGS_WHEEL_NAME%
# Run legacy binary tests
- mkdir %ARTIFACTS_DIR%
- cd %NUPIC_CORE%\build\release\bin
- py_region_test.exe
- connections_performance_test.exe
- cpp_region_test.exe
- helloregion.exe
- hello_sp_tp.exe
- prototest.exe
- unit_tests.exe --gtest_output=xml:%ARTIFACTS_DIR%\unit_tests_report.xml
# Run python tests
- cd %NUPIC_CORE%
- python setup.py test
# Disable automatic tests
test: off
artifacts:
# Non-recursive search in build folder for Wheels
- path: '*.whl'
# NOTE: This is turned off and will likely be removed once deployments of
# releases are controlled from a central authority. -- Matt
# -----------------------------------------------------------------------
# on_success:
# # Github tagged builds
# - cmd: echo "executing on_success"
# - ps: >-
# If ($env:APPVEYOR_REPO_TAG -eq "true" -or $env:APPVEYOR_REPO_TAG -eq "True") {
# Write-Host "Uploading bindings to PYPI"
# pip install httplib requests twine --upgrade
# twine upload -u $env:PYPI_USERNAME -p $env:PYPI_PASSWORD -r pypi $env:NUPIC_CORE\bindings\py\dist\nupic.bindings-$env:BINDINGS_VERSION-cp27-none-$env:wheel_name_suffix.whl
# }
deploy:
# Iterative builds
- provider: S3
access_key_id: AKIAIGHYSEHV3WFKOWNQ
secret_access_key:
secure: /8wO17Gir0XAiecJkHeE3jxOJzvyl0+uWcl7BKCuN0FC795golsL8905VmNuRl1o
bucket: "artifacts.numenta.org"
region: us-west-2
set_public: true
artifact: "nupic.bindings-$(APPVEYOR_REPO_COMMIT)-cp27-none-$(wheel_name_suffix).whl"
folder: "numenta/nupic.core/releases/nupic.bindings"
on:
branch: master