forked from Breakthrough/PySceneDetect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
80 lines (61 loc) · 2.58 KB
/
Copy pathappveyor.yml
File metadata and controls
80 lines (61 loc) · 2.58 KB
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
skip_commits:
files:
- docs/*
- 'manual/*'
- '**/*.rst'
- '**/*.md'
# We have to disable the `build` command explicitly otherwise the default is
# MSBuild which assumes this is a Visual Studio project. Python source/binary
# wheels a Windows .exe are generated below in `install`.
build: false
environment:
matrix:
- PYTHON: "C:\\Python37-x64"
- PYTHON: "C:\\Python38-x64"
- PYTHON: "C:\\Python39-x64"
- PYTHON: "C:\\Python310-x64"
install:
# Setup Python environment and update basic packages.
- 'SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%'
- python --version
- python -m pip install --upgrade pip build wheel virtualenv
# Make sure we get latest binary packages of the video input libraries.
- python -m pip install av opencv-python-headless --only-binary ":all:"
# Install other PySceneDetect dependencies and checkout resources required for tests.
- python -m pip install -r requirements_headless.txt
- git fetch --depth=1 https://github.com/Breakthrough/PySceneDetect.git refs/heads/resources:refs/remotes/origin/resources
- git checkout refs/remotes/origin/resources -- tests/resources/
- git checkout refs/remotes/origin/resources -- dist/
# Build Python package
- python -m build
test_script:
# Checkout Windows dependencies and extract them.
- git checkout refs/remotes/origin/resources -- dist/
- git checkout refs/remotes/origin/build-windows -- dist/
- 7z e dist/windows_thirdparty.7z
# Run Unit Tests
- python -m pytest tests/
# Remove optional dependencies before performing CLI tests
- python -m pip uninstall -y av
#
# Test CLI using source code
#
# Test with OpenCV backend
- python -m scenedetect version
- python -m scenedetect -i tests/resources/testvideo.mp4 -b opencv detect-content time -e 2s
# Test with optional PyAV backend
- python -m pip install av
- python -m scenedetect -i tests/resources/testvideo.mp4 -b pyav detect-content time -e 2s
# Cleanup
- python -m pip uninstall -y scenedetect av
# TODO: Test Python Distributions install and function correctly. There's coverage for
# this on the Linux builds (.travis.yml), but should also do that here too.
# Wildcard expansion doesn't seem to work with pip here, e.g. the following fails:
#- python -m pip install dist\*.whl
artifacts:
# TODO: Need to incorporate the build number into the package version. Use a custom setup.py
# that modifies the version number in the package before building using an environment variable.
- path: dist/*.tar.gz
name: PySceneDetect-sdist
- path: dist/*.whl
name: PySceneDetect-bdist_wheel