forked from vpython/vpython-jupyter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
117 lines (96 loc) · 3.88 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
# Configure appveyor for builds.
environment:
# Install appropriate conda here based on TARGET_ARCH
CONDA_INSTALL_LOCN: "C:\\conda"
CONDA_VERSION_PIN: ""
TQDM_PIN: ""
# These installs are needed on windows but not other platforms.
INSTALL_ON_WINDOWS: "patch psutil"
BINSTAR_TOKEN:
secure: ySsjFFc8PV/iMCBw8EXAjcQ4fMl+6N5WjXsJmE/T1GV0KHnqh/WWsbrDmiiGRn2O
PYPI_PASSWORD:
secure: TAdki0fpSo2aWvfc9ezA1g==
PYPI_USER:
secure: 4OQlJah0RRB/64Nm75OaEg==
matrix:
# Unfortunately, compiler/SDK configuration for 64 bit builds depends on
# python version. Right now conda build does not configure the SDK, and
# the appveyor setup only sets up the SDK once, so separate by python
# versions.
- TARGET_ARCH: "x64"
CONDA_PY: "3.7"
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
- TARGET_ARCH: "x64"
CONDA_PY: "3.6"
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
# 32-bit builds
- TARGET_ARCH: "x86"
CONDA_PY: "3.7"
CONDA_INSTALL_LOCN: "C:\\Miniconda37"
- TARGET_ARCH: "x86"
CONDA_PY: "3.6"
CONDA_INSTALL_LOCN: "C:\\Miniconda36"
# We always use a 64-bit machine, but can build x86 distributions
# with the TARGET_ARCH variable.
platform:
- x64
# Only run the x86 jobs when there is a release
for:
-
matrix:
only:
- TARGET_ARCH: "x86"
skip_non_tags: true
# Uncomment this to allow RDP into appveyor worker
# init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
# Gets us vpnotebook
- cmd: conda config --add channels vpython
- cmd: conda config --set always_yes true
# - conda install conda=4.5
# - cmd: conda update --quiet conda python
- echo %CONDA_PY%
- conda update --quiet conda
# Need to do this to pick up newer versions of conda
- if "%CONDA_PY%"=="3.5" conda update --quiet conda
- cmd: conda install --quiet conda%CONDA_VERSION_PIN% jinja2 conda-build anaconda-client cython wheel %INSTALL_ON_WINDOWS% tqdm%TQDM_PIN%
#- conda create --quiet -n wheel-build python=%CONDA_PY% wheel cython
- conda info -a
# Skip .NET project specific build phase.
build: off
test_script:
# Not much of a real test yet, just try to build myself...
- conda build --quiet vpython.recipe
# ...and build a wheel, in the test environment so we have the right
# python version.
# Write the output file location to a file...
- conda build --output vpython.recipe > to_upload.txt
- set /P BUILT_PACKAGE=<to_upload.txt
- type to_upload.txt
- for /F "delims=" %%i in (to_upload.txt) do set "BUILT_PACKAGE=%%i"
- echo %BUILT_PACKAGE%
- if NOT EXIST %BUILT_PACKAGE% exit /b 1
- for %%F in (%BUILT_PACKAGE%) do set dirname=%%~dpF
- echo %dirname%
- set PATH=%CONDA_INSTALL_LOCN%\Scripts;%PATH%
- conda info -a
- python setup.py bdist_wheel
- dir dist
# Don't end the job immediately so that problems can be explored via RDP
# Uncomment this to allow RDP into appveyor worker
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
on_success:
# Make sure appveyor still knows about conda...
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- set upload_builds=
- if "%APPVEYOR_REPO_TAG%"=="true" set upload_builds=1
- python .ci-support\upload_label.py > label.txt
- set /P UPLOAD_LABEL=<label.txt
- echo %UPLOAD_LABEL%
# If this build is because of a tag on master make the conda package and upload it.
- cmd: if defined upload_builds anaconda -t %BINSTAR_TOKEN% upload -u vpython -l %UPLOAD_LABEL% %BUILT_PACKAGE%
- cmd: pip install twine
- cmd: if defined upload_builds twine upload -u %PYPI_USER% -p %PYPI_PASSWORD% dist\*