forked from numenta/nupic.core-legacy
-
Notifications
You must be signed in to change notification settings - Fork 75
/
appveyor.yml
182 lines (145 loc) · 5.36 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
#---------------------------------#
# general configuration #
#---------------------------------#
image: Visual Studio 2017
configuration: Release
platform: x64
build:
parallel: true
verbosity: minimal
# 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\]/
# Do not build feature branch with open Pull Requests
# prevents two builds when a PR is pushed.
skip_branch_with_pr: true
#---------------------------------#
# 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-cpp
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: MSVC
NUPIC_CORE: "C:\\projects\\nupic-cpp"
ARTIFACTS_DIR: "%NUPIC_CORE%\\build\\artifacts"
## AWS S3 support (pip install boto)
# AWS_ACCESS_KEY_ID:
# secure: /9U0mCHp3k1U8Y5CY/kDqwCKG2gqchG/T/UlVWo8SME=
# AWS_SECRET_ACCESS_KEY:
# secure: /8wO17Gir0XAiecJkHeE3jxOJzvyl0+uWcl7BKCuN0FC795golsL8905VmNuRl1o
## PyPI support (pip install twine)
# PYPI_USERNAME: numenta
# PYPI_PASSWORD:
# secure: UgABryPYZg823OcD1XRosA==
matrix:
# # Win64-gcc
# - NC_CMAKE_GENERATOR: "MinGW Makefiles"
# external_static_subdir: "windows64-gcc"
# wheel_name_suffix: "win_amd64"
# # Win32-gcc
# - NC_CMAKE_GENERATOR: "MinGW Makefiles"
# PYTHON_VERSION: "2.7.9"
# PYTHON_ARCH: "32"
# PYTHONHOME: "C:\\Python27"
# external_static_subdir: "windows32-gcc"
# wheel_name_suffix: "win32"
# Win64-Visual Studio
- NC_CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
PYTHON_VERSION: "3.6.6"
PYTHON_ARCH: "64"
PYTHONHOME: "C:\\Python36-x64"
#PYTHONHOME: "C:\\Users\\appveyor\\AppData\\Roaming\\Python\\Python36"
PYTHONPATH: "%PYTHONHOME%"
PATH: "%PYTHONHOME%\\Scripts;%PYTHONHOME%;%PATH%"
wheel_name_suffix: "win_amd64"
matrix:
fast_finish: true
## Dont know where this goes: skip_branch_with_pr: true
#allow_failures:
# # enable this to prevent CI from failing even if there are errors.
# - NC_CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
#---------------------------------#
# build configuration #
#---------------------------------#
install:
# Dump appveyor build vars for diagnostics
- "ECHO APPVEYOR_FORCED_BUILD: %APPVEYOR_FORCED_BUILD%"
- "ECHO APPVEYOR_RE_BUILD: %APPVEYOR_RE_BUILD%"
- for /f %%i in ('type VERSION') do set BINDINGS_VERSION=%%i
- echo Binding version = %BINDINGS_VERSION%
- python -m pip install --user --upgrade pip setuptools setuptools-scm
- python -m pip install --no-cache-dir --user -r bindings/py/packaging/requirements.txt || exit
- cd %NUPIC_CORE%
- mkdir %NUPIC_CORE%\build\
- mkdir %NUPIC_CORE%\build\scripts
# http://www.cmake.org/Wiki/CmakeMingw
- cd %NUPIC_CORE%\build\scripts
- cmake -G "%NC_CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%configuration% %NUPIC_CORE%
build_script:
- cd %NUPIC_CORE%\build\scripts
# Run build (i.e. make install), 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 install --user
after_build:
# Run unit_tests (C++)
- cd %NUPIC_CORE%
- mkdir %ARTIFACTS_DIR%
- cd %NUPIC_CORE%\build\Release\bin
- 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
## AWS S3 deployment
# - 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
## GitHub
# Deploy to GitHub Releases
# - provider: GitHub
# artifact: '*.whl' # upload all NuGet packages to release assets
# draft: false
# prerelease: false
# on:
# branch: master # release from master branch only
# appveyor_repo_tag: true # deploy on tag push only