/
appveyor.yml
107 lines (89 loc) · 3.61 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
# Configure appveyor for builds.
environment:
# Install appropriate conda here based on TARGET_ARCH
CONDA_INSTALL_LOCN: "C:\\conda"
# Need this to set up compilation on Windows.
CMD_IN_ENV: cmd /E:ON /V:ON /C Obvious-CI\scripts\obvci_appveyor_python_build_env.cmd
BINSTAR_TOKEN:
secure: eSsu75dpqknmh2NnrfPASDSvzojBRSyoyW9ZdF5VauukhWxmYHbW8E5UE2ZmYnxT
PYPI_PASSWORD:
secure: Xtu8c7MEUwNUJN08oehTSQ==
PYPI_USER:
secure: hSkBSpb86gg/J+PxsYWbeg==
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.6"
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
- TARGET_ARCH: "x64"
CONDA_PY: "3.5"
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
- TARGET_ARCH: "x64"
CONDA_PY: "3.4"
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
- TARGET_ARCH: "x64"
CONDA_PY: "2.7"
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
# 32-bit builds
- TARGET_ARCH: "x86"
CONDA_PY: "3.6"
CONDA_INSTALL_LOCN: "C:\\Miniconda36"
- TARGET_ARCH: "x86"
CONDA_PY: "3.5"
CONDA_INSTALL_LOCN: "C:\\Miniconda35"
- TARGET_ARCH: "x86"
CONDA_PY: "3.4"
CONDA_INSTALL_LOCN: "C:\\Miniconda36"
- TARGET_ARCH: "x86"
CONDA_PY: "2.7"
CONDA_INSTALL_LOCN: "C:\\Miniconda"
# We always use a 64-bit machine, but can build x86 distributions
# with the TARGET_ARCH variable.
platform:
- x64
install:
# Clone to get the script for setting up Windows build environment and the script for installing conda.
- cmd: git clone https://github.com/pelson/Obvious-CI.git
- cmd: set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\Scripts;%PATH%
# Gets us vpnotebook
- cmd: conda config --add channels vpython
- cmd: conda config --set always_yes true
- cmd: conda update --quiet conda
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- cmd: conda install --quiet jinja2 conda-build anaconda-client cython
- cmd: conda install --quiet wheel
# These installs are needed on windows but not other platforms.
- cmd: conda install --quiet patch psutil
- 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...
- "%CMD_IN_ENV% 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%
- activate wheel-build
- "%CMD_IN_ENV% python setup.py bdist_wheel"
- deactivate
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
# 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 %BUILT_PACKAGE%
- cmd: pip install twine
- cmd: if defined upload_builds twine upload -u %PYPI_USER% -p %PYPI_PASSWORD% dist\*