This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathappveyor.yml
137 lines (112 loc) · 4.57 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 #
#---------------------------------#
image: Visual Studio 2017
# version format
version: '{build}'
branches:
except:
- gh-pages
#---------------------------------#
# environment configuration #
#---------------------------------#
# http://www.appveyor.com/docs/environment-variables
# http://www.appveyor.com/docs/installed-software
init:
- git config --global core.autocrlf input
# 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
clone_folder: c:\projects\htmresearch-core
clone_depth: 1
environment:
COMPILER_FAMILY: GCC
EXTERNAL_WINDOWS_DIR: "%APPVEYOR_BUILD_FOLDER%\\external\\%EXTERNAL_STATIC_SUBDIR%"
PYTHONPATH: "%PYTHONHOME%"
PATH: "%PYTHONHOME%\\Scripts;%PYTHONHOME%;%PATH%"
matrix:
# Win64-gcc
- PYTHON_VERSION: "2.7.13"
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.13"
# PYTHON_ARCH: "32"
# PYTHONHOME: "C:\\Python27"
# NC_CMAKE_GENERATOR: "MinGW Makefiles"
# EXTERNAL_STATIC_SUBDIR: "windows32-gcc"
# WHEEL_NAME_SUFFIX: "win32"
#---------------------------------#
# build configuration #
#---------------------------------#
# configuration values must be compatible with CMAKE_BUILD_TYPE: Debug or Release
configuration: Release
install:
- python -m pip install --upgrade pip
- python -m pip install --upgrade setuptools wheel
- python -m pip install -r bindings/py/requirements.txt
# 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/
- python -m pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy==0.1.0b3
# Setup MinGW GCC as a valid distutils compiler
- copy %EXTERNAL_WINDOWS_DIR%\bin\distutils.cfg %PYTHONHOME%\Lib\distutils\distutils.cfg
# Remove sh.exe from the paths (CMake doesn't like it)
- ren "C:\Program Files\Git\usr\bin\sh.exe" "git_sh.exe"
before_build:
# Configure cmake for the current configuration
- cmd: |
cmake --version
mkdir %APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%
mkdir %APPVEYOR_BUILD_FOLDER%\build\scripts
cd %APPVEYOR_BUILD_FOLDER%\build\scripts
cmake -G "%NC_CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION% -DPY_EXTENSIONS_DIR=%APPVEYOR_BUILD_FOLDER%\bindings\py\src\htmresearch_core %APPVEYOR_BUILD_FOLDER%
build_script:
# Build C++ library
- cmd: |
cd %APPVEYOR_BUILD_FOLDER%\build\scripts
cmake.exe --build "%APPVEYOR_BUILD_FOLDER%\build\scripts" --target install --config %configuration%
# Build python wheel
- cmd: |
cd %APPVEYOR_BUILD_FOLDER%
python setup.py bdist_wheel
before_test:
- pip install --no-index --find-links=%APPVEYOR_BUILD_FOLDER%\bindings\py\dist htmresearch-core
test_script:
# C++ tests
- ps: |
cd build\$env:CONFIGURATION\bin\
.\unit_tests.exe --gtest_output=xml:unit_tests_report.xml
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path unit_tests_report.xml))
# python tests
- ps: |
cd $env:APPVEYOR_BUILD_FOLDER
py.test --junitxml=py_test_report.xml bindings/py/tests
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path py_test_report.xml))
after_test:
- cmd: |
for /f %%i in ('type VERSION') do set VERSION=%%i
copy %APPVEYOR_BUILD_FOLDER%\bindings\py\dist\htmresearch_core-%VERSION%-cp27-cp27m-%WHEEL_NAME_SUFFIX%.whl %APPVEYOR_BUILD_FOLDER%\htmresearch_core-%APPVEYOR_REPO_COMMIT%-cp27-none-%WHEEL_NAME_SUFFIX%.whl
artifacts:
- path: '*.whl'
name: htmresearch_core
deploy:
- provider: S3
access_key_id:
secure: /9U0mCHp3k1U8Y5CY/kDqwCKG2gqchG/T/UlVWo8SME=
secret_access_key:
secure: /8wO17Gir0XAiecJkHeE3jxOJzvyl0+uWcl7BKCuN0FC795golsL8905VmNuRl1o
bucket: artifacts.numenta.org
region: us-west-2
set_public: true
artifact: htmresearch_core
folder: numenta/htmresearch-core/appveyor
on:
# Deploy only from master of the main repo. Ignore forks and branches
appveyor_repo_name: numenta/htmresearch-core
branch: master