-
Notifications
You must be signed in to change notification settings - Fork 2
131 lines (102 loc) · 2.94 KB
/
pyffms2.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
name: pyffms2
on: [push, pull_request]
jobs:
build-unix:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
FFMS2_DIR: ffms2-dir
steps:
- uses: actions/checkout@v3
- name: Install Python 3.7 version
uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Install MacOS dependencies
if: matrix.os == 'macos-latest'
run: |
brew install pkg-config automake
- name: Install FFmpeg
run: |
PLATFORM=${{ matrix.os }}
if [ ${PLATFORM} = "ubuntu-latest" ]
then
sudo apt-get install libavcodec-dev libavformat-dev libavdevice-dev
else
brew install ffmpeg
fi
- name: Install ffms2
env:
LINK: https://github.com/FFMS/ffms2
run: |
git clone --depth 1 $LINK $FFMS2_DIR
cd $FFMS2_DIR
./autogen.sh --prefix=$HOME/$FFMS2_DIR
make -j4 install
- name: Set environment variables
run: |
echo "LD_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib" >> $GITHUB_ENV
- name: Run C-test
run: |
cd ffms2/data
g++ -std=c++11 -o ffmsinfo ffmsinfo.cpp \
-I$HOME/$FFMS2_DIR/include -L$HOME/$FFMS2_DIR/lib -lffms2
./ffmsinfo
- name: Install setuptools
run: |
pip install setuptools
- name: Install pyffms2
run: |
pip install .
- name: Run tests
run: |
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib
python ffms2/test.py
- name: Run ffmsindex
run: |
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib
python ffms2/__main__.py "ffms2/data/morning rescue.mkv"
- name: Run ffmsinfo
run: |
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib
python ffmsinfo.py "ffms2/data/morning rescue.mkv"
- name: Run easy_usage
run: |
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib
python easy_usage.py
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Python 3.7 version
uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Install setuptools
run: |
python -m pip install --upgrade pip
pip install setuptools
- name: Install pyffms2
run: |
$VERS = "0.4.5.5"
$LINK = "https://github.com/bubblesub/pyffms2/releases/download/$VERS"
$PKG = "ffms2.zip"
curl -LO "$LINK/$PKG"
7z x $PKG
pip install .
- name: Run tests
run: |
python ffms2/test.py
- name: Run ffmsindex
run: |
python ffms2/__main__.py "ffms2/data/morning rescue.mkv"
- name: Run ffmsinfo
run: |
python ffmsinfo.py "ffms2/data/morning rescue.mkv"
- name: Run easy_usage
run: |
python easy_usage.py