-
Notifications
You must be signed in to change notification settings - Fork 57
/
appveyor.yml
179 lines (179 loc) · 6.82 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
environment:
LINUX_IMAGE: &linux_image Ubuntu2204
MACOS_IMAGE: &macos_image macos-catalina
WINDOWS_IMAGE: &windows_image Visual Studio 2022
LIBZEN_VERSION: 0.4.41
MEDIAINFO_VERSION: 23.10
UBUNTU_VERSION: 22.04
QA_PYTHON_VERSION: 3.12
# Python 3.12 is not available everywhere yet, see https://github.com/appveyor/ci/issues/3879
# Because of this, we can only deploy on 3.11
DEPLOY_TOXENV: py311
PYPY_URL: https://downloads.python.org/pypy/pypy3.10-v7.3.13-linux64.tar.bz2
# Work around https://github.com/tox-dev/tox/issues/1550
PYTHONIOENCODING: utf-8
TOX_PARALLEL_NO_SPINNER: 1
TWINE_USERNAME: "__token__"
TWINE_PASSWORD:
secure: Jp2QpmAii1mmAXmotdXmPx5q679oMcRolziuu9m2pawkvOnRJtWMsI4uWiTiSbiw+HMbyyWwVpy+FiaPsHZxtM863PNNJidW1WDam4kn8EM+rznjgZfO9NSCcwZJU5jcTYCwuXo3+FnVNK5rvQ8QJ+Zu6WzH1Ysb+uJSz8e6xt7d7hoZbb9VH5bJC7tYrw+bH+TfA9juVpIYfCavozLLTDLqTcvPfJ+LXMPbiZO+oOztNsLRsviH2QAPXaLspXvCr6qUVH3A84KCdfSXCOZG0g/eYUZ6ilMLESe7DrYZrRc=
matrix:
- TOXENV: docs,black,flake8,isort,mypy,pylint
APPVEYOR_BUILD_WORKER_IMAGE: *linux_image
- TOXENV: pypy3
APPVEYOR_BUILD_WORKER_IMAGE: *linux_image
- TOXENV: py37
APPVEYOR_BUILD_WORKER_IMAGE: *linux_image
- TOXENV: py38
APPVEYOR_BUILD_WORKER_IMAGE: *linux_image
- TOXENV: py39
APPVEYOR_BUILD_WORKER_IMAGE: *linux_image
- TOXENV: py310
APPVEYOR_BUILD_WORKER_IMAGE: *linux_image
- TOXENV: py311
APPVEYOR_BUILD_WORKER_IMAGE: *linux_image
- TOXENV: py312
APPVEYOR_BUILD_WORKER_IMAGE: *linux_image
- TOXENV: py38
APPVEYOR_BUILD_WORKER_IMAGE: *macos_image
- TOXENV: py39
APPVEYOR_BUILD_WORKER_IMAGE: *macos_image
- TOXENV: py310
APPVEYOR_BUILD_WORKER_IMAGE: *macos_image
- TOXENV: py311
APPVEYOR_BUILD_WORKER_IMAGE: *macos_image
- TOXENV: py37
PYTHON: "C:/Python37"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py37
PYTHON: "C:/Python37-x64"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py38
PYTHON: "C:/Python38"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py38
PYTHON: "C:/Python38-x64"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py39
PYTHON: "C:/Python39"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py39
PYTHON: "C:/Python39-x64"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py310
PYTHON: "C:/Python310"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py310
PYTHON: "C:/Python310-x64"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py311
PYTHON: "C:/Python311"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py311
PYTHON: "C:/Python311-x64"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py312
PYTHON: "C:/Python312"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
- TOXENV: py312
PYTHON: "C:/Python312-x64"
APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
for:
-
matrix:
only:
- APPVEYOR_BUILD_WORKER_IMAGE: *windows_image
install:
- "SET PATH=%PYTHON%;%PYTHON%/Scripts;%PATH%"
- "python --version"
- "IF %PYTHON:~-4% == -x64 (SET ARCH=x64) ELSE (SET ARCH=i386)"
- ps: "Start-FileDownload https://mediaarea.net/download/binary/mediainfo/${Env:MEDIAINFO_VERSION}/MediaInfo_CLI_${Env:MEDIAINFO_VERSION}_Windows_${Env:ARCH}.zip"
- ps: "unzip -o MediaInfo_CLI_${Env:MEDIAINFO_VERSION}_Windows_${Env:ARCH}.zip LIBCURL.DLL"
- ps: "Start-FileDownload https://mediaarea.net/download/binary/libmediainfo0/${Env:MEDIAINFO_VERSION}/MediaInfo_DLL_${Env:MEDIAINFO_VERSION}_Windows_${Env:ARCH}_WithoutInstaller.7z"
- ps: "7z -y x MediaInfo_DLL_${Env:MEDIAINFO_VERSION}_Windows_${Env:ARCH}_WithoutInstaller.7z MediaInfo.dll Developers/License.html"
# Required for tests to pass with tox, Windows looks for DLLs in PATH
- ps: "Copy-Item -Path MediaInfo.dll -Destination ${Env:PYTHON}"
- "move MediaInfo.dll pymediainfo"
- "move Developers\\License.html docs"
- "pip install tox"
build: off
test_script:
- "tox"
deploy_script:
- ps: |
If (($env:APPVEYOR_REPO_TAG -eq "true") -and ($env:TOXENV -eq $env:DEPLOY_TOXENV)) {
pip install twine wheel
python setup.py bdist_wheel
Invoke-Expression "twine upload --skip-existing dist/*.whl"
}
-
matrix:
only:
- APPVEYOR_BUILD_WORKER_IMAGE: *macos_image
install: |
set -eo pipefail
PYTHON_VERSION="$(sed -E 's/^py(3)(.*)$/\1.\2/' <<< "$TOXENV")"
source "${HOME}/venv${PYTHON_VERSION}/bin/activate"
pip install tox
curl https://mediaarea.net/download/binary/libmediainfo0/${MEDIAINFO_VERSION}/MediaInfo_DLL_${MEDIAINFO_VERSION}_Mac_x86_64+arm64.tar.bz2 \
| tar xj MediaInfoLib/libmediainfo.0.dylib MediaInfoLib/License.html
# Required for tests to pass with tox
cp MediaInfoLib/libmediainfo.0.dylib /usr/local/lib/
build: off
test_script:
- "tox"
deploy_script: |
set -eo pipefail
if [[ $APPVEYOR_REPO_TAG == "true" && $TOXENV == $DEPLOY_TOXENV ]]; then
mv MediaInfoLib/libmediainfo.0.dylib pymediainfo
mv MediaInfoLib/License.html docs
pip install twine wheel
python setup.py bdist_wheel
twine upload --skip-existing dist/*.whl
fi
-
matrix:
only:
- APPVEYOR_BUILD_WORKER_IMAGE: *linux_image
install: |
set -eo pipefail
if [[ $TOXENV =~ doc.* ]]; then
source "${HOME}/venv${QA_PYTHON_VERSION}/bin/activate"
pip install tox
else
if [[ $TOXENV == pypy3 ]]; then
pushd /tmp
curl -sS "$PYPY_URL" | tar xj
PATH="$(pwd)/$(basename "$PYPY_URL" | sed -E 's/\.tar\.[^.]+$//')/bin/:$PATH"
python -m ensurepip
popd
else
PYTHON_VERSION="$(sed -E 's/^py(3)(.*)$/\1.\2/' <<< "$TOXENV")"
source "${HOME}/venv${PYTHON_VERSION}/bin/activate"
fi
# "python -m pip" will work with the unpacked PyPy too, "pip" won't
python -m pip install tox
pushd /tmp
libzen_deb=libzen0v5_${LIBZEN_VERSION}-1_amd64.xUbuntu_${UBUNTU_VERSION}.deb
mediainfo_deb=libmediainfo0v5_${MEDIAINFO_VERSION}-1_amd64.xUbuntu_${UBUNTU_VERSION}.deb
curl -O "https://mediaarea.net/download/binary/libzen0/${LIBZEN_VERSION}/${libzen_deb}"
curl -O "https://mediaarea.net/download/binary/libmediainfo0/${MEDIAINFO_VERSION}/${mediainfo_deb}"
sudo apt-get -y install libmms0
sudo dpkg -i "${libzen_deb}" "${mediainfo_deb}"
popd
fi
build: off
test_script: |
if [[ $TOXENV =~ doc.* ]]; then
tox -p
else
# We want to see the progression of the tests so we can't run
# tox environments in parallel
tox
fi
deploy_script: |
set -eo pipefail
if [[ $APPVEYOR_REPO_TAG == "true" && $TOXENV == $DEPLOY_TOXENV ]]; then
pip install twine
python setup.py sdist
twine upload --skip-existing dist/*.gz
fi