forked from numenta/nupic-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
137 lines (104 loc) · 4.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
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
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 0.1.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
clone_depth: 50
# 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
services:
- mysql
environment:
PYTHON_ARCH: "64"
COMPILER_FAMILY: GCC
MYSQL_PWD: "Password12!"
matrix:
- PYTHON_VERSION: "2.7.9"
PYTHONPATH: "C:\\Python27-x64"
#---------------------------------#
# build configuration #
#---------------------------------#
install:
- set NUPIC_DEPLOYMENT_BUILD=1
- set NUPIC=c:\projects\nupic
- set REPO_DIR=c:\projects\nupic
- cd %REPO_DIR%
# Install Python 2.7.x and support packages (pip, wheel, numpy etc.)
- ps: .\ci\appveyor\install_python_pip.ps1
- set PYTHONPATH=%PYTHONPATH%
- set PATH=%PYTHONPATH%;%PYTHONPATH%\Scripts;%PATH%
- set ARTIFACTS_DIR=%REPO_DIR%\build\artifacts
- for /f %%i in ('python -c "execfile('.nupic_modules'); print NUPIC_CORE_COMMITISH"') do set NUPIC_CORE_COMMITISH=%%i
- for /f %%i in ('python ci\appveyor\get_nupic_bindings_version.py') do set BINDINGS_VERSION=%%i
- for /f %%i in ('type VERSION') do set NUPIC_VERSION=%%i
- echo Core commitish = %NUPIC_CORE_COMMITISH%
- echo Binding version = %BINDINGS_VERSION%
- echo NuPIC version = %NUPIC_VERSION%
- set BINDINGS_LOC="http://s3-us-west-2.amazonaws.com/artifacts.numenta.org/numenta/nupic.core/releases/nupic.bindings"
# Github tagged builds
- ps: >-
If ($env:APPVEYOR_REPO_TAG -eq "true" -or $env:APPVEYOR_REPO_TAG -eq "True") {
pip install $env:BINDINGS_LOC/nupic.bindings-$env:BINDINGS_VERSION-cp27-none-win_amd64.whl
}
Else {
pip install $env:BINDINGS_LOC/nupic.bindings-$env:BINDINGS_VERSION.$env:NUPIC_CORE_COMMITISH-cp27-none-win_amd64.whl
}
# Check all packages installed correctly
- cmd: pip list
build_script:
- cd %REPO_DIR%
- python setup.py bdist_wheel
- ps: ls -l dist
- ps: move .\dist\nupic-$env:NUPIC_VERSION-py2-none-any.whl .\dist\nupic-$env:NUPIC_VERSION-cp27-none-win_amd64.whl
- ps: copy .\dist\nupic-$env:NUPIC_VERSION-cp27-none-win_amd64.whl .
after_build:
- cd %REPO_DIR%
- pip install --user .
# Show nupic installation folder by trying to import nupic, if works, it prints
# the absolute path of nupic.__file__, which the installation folder itself.
- python -c "import sys;import os;import nupic.data;sys.stdout.write(os.path.abspath(os.path.join(nupic.data.__file__, '../..')) + '\n')"
# Setup local USER name
- set USER=appveyor
# Read the nupic-default.XML file and update the passwd entry
- ps: $nupic_site = [xml](Get-Content .\src\nupic\support\nupic-default.xml)
- ps: $passwd_property = $nupic_site.configuration.property | where {$_.Name -eq 'nupic.cluster.database.passwd'}
- ps: $passwd_property.value = "Password12!"
- ps: $nupic_site.Save('c:\projects\nupic\nupic-site.xml')
# Copy it into local USER site-packages directory
- copy .\nupic-site.xml C:\Users\appveyor\AppData\Roaming\Python\Python27\site-packages\nupic\support\nupic-site.xml
# Python unit tests
- py.test tests\unit
# Python integration tests
- py.test tests\integration
artifacts:
- path: '*.whl' # Find all wheel files in project root only (non-recusive)
deploy:
# Amazon S3 deployment provider settings
- 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-$(NUPIC_VERSION)-cp27-none-win_amd64.whl"
folder: "numenta/nupic/$(APPVEYOR_REPO_COMMIT)"
on:
branch: master
test: off