-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
136 lines (122 loc) · 5.19 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
os: Visual Studio 2015
environment:
# See README for information on the token
ANACONDA_TOKEN:
secure: AaDohlZ5kwkG4ymSAkUVvTIzL1SDr1WMl/0A/07mnOWqcxOTDMqaMTSeDSvlOEZV
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 .\\ci\\appveyor\\run_with_env.cmd"
matrix:
- PYTHON: "C:\\Python27_32"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
CONDA_PY: "27"
- PYTHON: "C:\\Python27_64"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "64"
CONDA_PY: "27"
#- PYTHON: "C:\\Python34_32"
# PYTHON_VERSION: "3.4"
# PYTHON_ARCH: "32"
# CONDA_PY: "34"
# - PYTHON: "C:\\Python34_64"
# PYTHON_VERSION: "3.4"
# PYTHON_ARCH: "64"
# CONDA_PY: "34"
#- PYTHON: "C:\\Python35_32"
# PYTHON_VERSION: "3.5"
# PYTHON_ARCH: "32"
# CONDA_PY: "35"
# - PYTHON: "C:\\Python35_64"
# PYTHON_VERSION: "3.5"
# PYTHON_ARCH: "64"
# CONDA_PY: "35"
install:
# https://www.appveyor.com/docs/installed-software#python
- if "%PYTHON_VERSION%" == "3.4" set "BASE_PYTHON_VERSION=3"
- if "%PYTHON_VERSION%" == "3.5" set "BASE_PYTHON_VERSION=35"
- if "%PYTHON_ARCH%" == "64" set "ARCH_LABEL=-x64"
# These are already installed on appveyor. Update them.
- set "CONDA_ROOT=C:\Miniconda%BASE_PYTHON_VERSION%%ARCH_LABEL%"
- set "PATH=%CONDA_ROOT%;%CONDA_ROOT%\Scripts;%CONDA_ROOT%\Library\bin;%PATH%"
# - set "PATH=C:\MinGW\bin;%PATH%"
- conda config --set always_yes yes
- conda update -q conda
- conda info
- conda update -q --all
- python -c "import sys; print(sys.version)"
- python -c "import sys; print(sys.executable)"
- python -c "import sys; print(sys.prefix)"
- conda create --yes --name oddt_env python=%PYTHON_VERSION%
- activate oddt_env
- conda install -q git
- conda install -q -c conda-forge mingwpy
# ODDT Dependencies
- conda install -q numpy scipy scikit-learn joblib six
- conda install -q -c openbabel openbabel
- conda install -q -c rdkit rdkit
- pip install --no-deps git+https://github.com/oddt/oddt.git@experimental-windows
- set ODDT_VER=
# - FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "from __future__ import print_function; import oddt; print(oddt.__version__)`) DO (
# SET ODDT_VER=%%F
# )
# ECHO %ODDT_VER%
# Use commit pre-MKL
- pip install git+https://github.com/pyinstaller/pyinstaller.git@feb0d271263ca884b91033fd588b79fadf3a3a7f
# Remove buggy numpy hook instead of @feb0d271263ca884b91033fd588b79fadf3a3a7f
- python -c "import PyInstaller;print(PyInstaller.__file__)"
#- del /F %CONDA_PREFIX%\Lib\site-packages\PyInstaller\hooks\hook-numpy.core.py
# compiledtrees
# - pip install git+https://github.com/mwojcikowski/sklearn-compiledtrees.git@windows-compilation
- git clone -b windows-compilation https://github.com/mwojcikowski/sklearn-compiledtrees.git
- cd sklearn-compiledtrees
# - curl -L -o dlfcn-win32.tar.gz https://github.com/dlfcn-win32/dlfcn-win32/releases/download/v1.0.0/dlfcn-win32-static-1.0.0.tar.gz
# - 7z e dlfcn-win32.tar.gz && 7z x dlfcn-win32.tar
# - copy include\dlfcn.h compiledtrees
- python setup.py build_ext --inplace
- python setup.py install
- cd ..
# UPXs
- curl -L -o upx.zip http://libgd.blob.core.windows.net/upx/upx391w.zip && 7z e upx.zip *.exe -r
build: false
test_script:
- 'pyinstaller --clean ^
--additional-hooks-dir . ^
--hidden-import="sklearn.tree._utils" ^
--hidden-import=six ^
--hidden-import=compiledtrees ^
--hidden-import=rdkit ^
--runtime-hook pyi_rth_obdata.py ^
--runtime-hook pyi_rth_rdkit.py ^
--add-binary "%CONDA_PREFIX%\Library\bin\mkl_def.dll;." ^
--add-binary "%CONDA_PREFIX%\Library\bin\formats_*.obf;." ^
--add-binary "%CONDA_PREFIX%\Library\bin\plugin_*.obf;." ^
--add-data "%CONDA_PREFIX%\share\openbabel\*;data" ^
--add-data "%CONDA_PREFIX%\Library\share\RDKit\Data\*;rdkit\Data" ^
--add-data "%CONDA_PREFIX%\Lib\site-packages\oddt\scoring\functions\RFScore\*.csv;oddt\scoring\functions\RFScore" ^
--exclude-module tcl ^
--exclude-module Tkinter ^
--noupx ^
--nowindow ^
-y -n oddt_cli --onefile %CONDA_PREFIX%\Scripts\oddt_cli'
- deactivate
- dist\oddt_cli.exe --help
- dist\oddt_cli.exe --toolkit ob test\test_10.mol2 -osmi
- dist\oddt_cli.exe --toolkit rdk test\test_10.mol2 -osmi
- dist\oddt_cli.exe --score rfscore --receptor test\test_10.mol2 test\test_10.mol2 -ocsv
- 7z a oddt_cli_v%ODDT_VER%_win_py%PYTHON_VERSION%.zip dist\oddt_cli.exe
artifacts:
# Archive the generated conda package in the ci.appveyor.com build report.
- path: .\dist\oddt_cli.exe
deploy:
provider: FTP
protocol: ftps
host: wojcikowski.pl
username:
secure: wuDqH0Ne8+H5LLA13XOnJc2JhOOAHuCJD0hq8n1Sm0c=
password:
secure: Xonq2cmbnVHxH70z4WD+BDiq/WClXiOYbuKSzaaLzts=
folder:
artifact: oddt_cli_v%ODDT_VER%_win_py%PYTHON_VERSION%.zip # upload all NuGet packages to release assets