-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
76 lines (66 loc) · 3.15 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
environment:
PYPIPASSWORD:
secure: bHtyMeea0zyeczBWXTsHBA==
matrix:
# For Python versions available on Appveyor, see
# http://www.appveyor.com/docs/installed-software#python
# The list here is complete (excluding Python 2.6, which
# isn't covered by this document) at the time of writing.
- PYTHON: "C:\\Python36-x64"
- PYTHON: "C:\\Python37-x64"
- PYTHON: "C:\\Python38-x64"
install:
# We need wheel installed to build wheels
- "%PYTHON%\\python.exe -m pip install wheel"
- "%PYTHON%\\python.exe -m pip install tensorflow matplotlib ipython"
- ps: |
# Appveyor script to install hadoop extra package to run spark on windows
# create tools directory outside of Spark directory
$up = (Get-Item -Path ".." -Verbose).FullName
$tools = "$up\tools"
if (!(Test-Path $tools)) {
New-Item -ItemType Directory -Force -Path $tools | Out-Null
}
# ========================== Hadoop bin package
$hadoopVer = "2.6.4"
$hadoopPath = "$tools\hadoop"
if (!(Test-Path $hadoopPath)) {
New-Item -ItemType Directory -Force -Path $hadoopPath | Out-Null
}
Push-Location $hadoopPath
Start-FileDownload "https://github.com/steveloughran/winutils/archive/master.zip" "winutils-master.zip"
# extract
Invoke-Expression "7z.exe x winutils-master.zip"
# add hadoop bin to environment variables
$env:HADOOP_HOME = "$hadoopPath/winutils-master/hadoop-$hadoopVer"
$env:Path += ";$env:HADOOP_HOME\bin"
#Set pyspark env to the proper python version
$env:PYSPARK_DRIVER_PYTHON = "$env:PYTHON\python.exe"
$env:PYSPARK_PYTHON = "$env:PYTHON\python.exe"
Pop-Location
build: off
test_script:
# Put your test command here.
# Note that you must use the environment variable %PYTHON% to refer to
# the interpreter you're using - Appveyor does not do anything special
# to put the Python version you want to use on PATH.
- "%PYTHON%\\python.exe setup.py test"
artifacts:
# bdist_wheel puts your built wheel in the dist directory
- path: dist\*
on_success:
# Specify account details for PyPI
- echo [distutils] > %USERPROFILE%\\.pypirc
- echo index-servers = >> %USERPROFILE%\\.pypirc
- echo pypi >> %USERPROFILE%\\.pypirc
- echo [pypi] >> %USERPROFILE%\\.pypirc
- echo repository=https://pypi.python.org/pypi >> %USERPROFILE%\\.pypirc
- echo username=shap_poster >> %USERPROFILE%\\.pypirc
- echo password=%PYPIPASSWORD% >> %USERPROFILE%\\.pypirc
# Workaround required to ensure setup.py finds the .pypirc under Windows
- set HOME=%USERPROFILE%
# Deploy a wheel (only actually do this for tags). NB That breaking this line
# with Unix line-endings causes the windows command interpreter to barf so
# this is given as one-line to make this script less fragile when edited on
# other OSes.
- if "%APPVEYOR_REPO_TAG%"=="true" ( %PYTHON%\\python.exe setup.py bdist_wheel upload ) else ( echo "Not deploying because not a tagged commit." )