This repository has been archived by the owner on Nov 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathappveyor.yml
164 lines (146 loc) · 5.78 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# Changes in online interface:
# - Set build schedule to "0 3 * * *" for nightly builds.
#skip_commits:
# # Do not build on commits. Only nightly builds (web interface)
# author: /.*/
# Do not use shallow_clone, because coveralls needs a git repository
#shallow_clone: true
# Use large clone depth so that a tag is included for versioning
clone_depth: 256
notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false
environment:
PYPI_USR: ci_zmdd
PYPI_PWD:
secure: 1kFM+4EzTyV0hF7cMxkKQFDuWGhiXfUXCeUGJOTgSbKukTOL9U05/nHi69AtQGpG
PYTHON: "C:\\Miniconda-x64"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "64"
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
install:
- dir
- cd
- git describe --tags HEAD
# Install InnoSetup and add to path
# Copied from
# https://github.com/Phonations/Joker/blob/master/appveyor.yml
- appveyor-retry choco install -y InnoSetup
- appveyor-retry choco install -y wget --version 1.20
# install R with lme4
- wget -q https://cran.r-project.org/bin/windows/base/old/3.2.5/R-3.2.5-win.exe
- R-3.2.5-win.exe /silent
# Installing an older version of R did neither work so:
#- choco install -dfvy -version 3.2.5 -source 'http://cran.at.r-project.org/bin/windows/base/old/3.2.5/;http://cran.at.r-project.org/bin/windows/base/old/;c:\projects\shapeout' r.project
# nor so:
#- choco install -y -version 3.2.5 r.project
- set PATH=%PATH%;"C:\\Program Files\\R\\R-3.2.5\\bin\\i386"
- R -e "install.packages('lme4', repos='http://cran.r-project.org')"
# Use appveyor miniconda
# Determine platform
- '%PYTHON%/python -c "import platform; print platform.uname()"'
- '%PYTHON%/python -c "import sys; print sys.maxint"'
- '%PYTHON%/python -c "import sys; print sys.version"'
# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# Check that we have the expected version and architecture for Python
- "python --version"
# Install package-specific libraries
# CONDA installs
# Pinned versions are defined in .appveyor\pinned
- xcopy .appveyor\pinned %PYTHON%\conda-meta\ /Y
#- "conda update -f conda"
# Anaconda client for searching packages?
#- "conda install anaconda-client"
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/free-channel.html
- conda config --append channels free
- "conda install --yes --quiet chaco enable kiwisolver numpy pip pyface pywin32 scipy wxpython"
# workaround for build failures, see
# https://ci.appveyor.com/project/paulmueller/shapeout/build/1.0.152#L504
- "pip freeze"
- "appveyor-retry python -m pip install --upgrade pip"
# PIP installs
- "pip install appdirs"
- "pip install pathlib"
- "pip install imageio==2.3.0"
# Download ffmpeg binary
- imageio_download_bin --package-dir ffmpeg
- "pip install nptdms"
# install pyper (R)
- "pip install pyper"
- "pip install reportlab"
- "pip install simplejson"
- "pip install h5py --only-binary=h5py"
# prevent pip from installing later scipy versions using "--no-deps"
# requirements from dclab were partly installed with conda:
#- "pip install dclab --no-deps"
#- "pip install git+git://github.com/ZELLMECHANIK-DRESDEN/dclab.git --no-deps"
# We have to build dclab manually like this, otherwise pip will download
# numpy > 1.16 which is not binary-compatible with numpy 1.10.
- "pip install --upgrade cython setuptools wheel"
- "git clone https://github.com/ZELLMECHANIK-DRESDEN/dclab.git"
- "cd dclab"
- "python setup.py develop --no-deps"
- "cd .."
# fcswrite
- "pip install git+git://github.com/ZELLMECHANIK-DRESDEN/fcswrite.git --no-deps"
# Patch libraries
- '%PYTHON%/python .appveyor/patch_libraries.py'
# Install pyinstaller (includes dependency for pywin32)
- "pip install pyinstaller==3.6"
# Run develop (installs yet missing packages and runs cython)
#- "%PYTHON%/python setup.py develop"
# Show the installed packages
- "pip freeze"
build: off
test_script:
- 'python -c "import shapeout; print shapeout.__version__"'
- "pip install coverage"
- "pip install codecov"
- "pip install -e .[test]"
- "pip freeze"
# Probably due to the GUI tests, the pytest "command exits with -1073741819".
- "coverage run --source=shapeout -m pytest tests || exit 0"
- "coverage report -m"
# Allow codecov to fail
- "codecov || exit 0"
after_test:
- "appveyor-retry pip install --upgrade pip twine wheel"
# If tests are successful, create a whl package for the project.
- "python setup.py bdist_wheel"
- "python setup.py sdist"
- ps: "ls dist"
# Setup PyPI credentials
- cmd: "echo [pypi] > %USERPROFILE%\\.pypirc"
- cmd: "echo username: %PYPI_USR% >> %USERPROFILE%\\.pypirc"
- cmd: "echo password: %PYPI_PWD% >> %USERPROFILE%\\.pypirc"
# Run pyinstaller
- "pyinstaller -y --log-level=WARN .appveyor\\shapeout.spec"
# Create InnoSetup installers
# Generate iss file
- "python .appveyor\\make_iss.py"
# Set InnoSetup path here, because Cython complained about it.
- set PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5"
- iscc /Q .appveyor\\shapeout.iss
artifacts:
# Archive the generated wheel package in the ci.appveyor.com build report.
- path: dist\*
# InnoSetup files
- path: .appveyor\Output\*
on_success:
- cmd: "if [%APPVEYOR_REPO_TAG%]==[true] twine upload --skip-existing dist\\*.whl"
- cmd: "if [%APPVEYOR_REPO_TAG%]==[true] twine upload --skip-existing dist\\*.tar.gz"
deploy:
provider: GitHub
auth_token:
secure: /b5SfmYssAfLaWi0qkPhxR5CruSVBZUurSQLEL3RAaRlHn6HTPrkIqvrLDk/8JxB
artifact: /.*\.exe/
draft: true
prerelease: true
on:
appveyor_repo_tag: true # deploy on tag push only