forked from Breakthrough/PySceneDetect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
81 lines (73 loc) · 2.83 KB
/
.travis.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
language: python
cache: pip
matrix:
include:
- os: linux
dist: xenial
language: python
python: "3.9"
- os: linux
dist: bionic
language: python
python: "3.7"
- os: linux
dist: bionic
language: python
python: "3.10"
- os: linux
dist: focal
language: python
python: "3.8"
- os: linux
dist: focal
language: python
python: "3.9"
- os: linux
dist: focal
language: python
python: "3.10"
install:
# TODO: `setuptools` is pinned for the Python 3.7 builder and can be unpinned when removed.
- "python -m pip install --upgrade pip build wheel virtualenv setuptools==62.3.4"
# Make sure we get latest binary packages of the video input libraries.
# TODO(#292): Add a Python 3.11 builder once newer versions of the `av` package are supported.
# TODO: `opencv-python-headless` is pinned for the xenial build. Unpin `opencv-python-headless`
# when https://github.com/opencv/opencv/issues/23090 is resolved.
- "python -m pip install av==9.2 opencv-python-headless==4.6.0.66 --only-binary :all:"
# Install other required packages and download required test resources.
- "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/"
- "python -m build"
script:
- python -m pytest tests/
# TODO: Install ffmpeg/mkvtoolnix to run split-video tests.
#
# Test CLI using source code
#
- "PACKAGE_VERSION=`python -c \"import scenedetect; print(scenedetect.__version__[1:].replace('-', '.'))\"`"
# 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 backends
- python -m scenedetect -i tests/resources/testvideo.mp4 -b pyav detect-content time -e 2s
# Cleanup
- python -m pip uninstall -y scenedetect
# Test CLI using source distribution
- python -m pip install dist/scenedetect-$PACKAGE_VERSION.tar.gz
# Test with OpenCV backend
- scenedetect version
- scenedetect -i tests/resources/testvideo.mp4 -b opencv detect-content time -e 2s
# Test with optional backends
- scenedetect -i tests/resources/testvideo.mp4 -b pyav detect-content time -e 2s
# Cleanup
- python -m pip uninstall -y scenedetect
# Test CLI using binary wheel
- python -m pip install dist/scenedetect-$PACKAGE_VERSION-py3-none-any.whl
# Test with OpenCV backend
- scenedetect version
- scenedetect -i tests/resources/testvideo.mp4 -b opencv detect-content time -e 2s
# Test with optional backends
- scenedetect -i tests/resources/testvideo.mp4 -b pyav detect-content time -e 2s
# Cleanup
- python -m pip uninstall -y scenedetect