Skip to content

Commit ba19eed

Browse files
committed
ci: use newer python
1 parent 9d5eada commit ba19eed

File tree

2 files changed

+81
-45
lines changed

2 files changed

+81
-45
lines changed

.github/workflows/pyffms2.yml

Lines changed: 79 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,40 @@ on: [push, pull_request]
55
jobs:
66

77
build-unix:
8+
runs-on: ubuntu-latest
89

910
strategy:
1011
matrix:
11-
os: [ubuntu-latest, macos-latest]
12-
13-
runs-on: ${{ matrix.os }}
12+
include:
13+
- python-version: "3.9"
14+
- python-version: "3.10"
15+
- python-version: "3.11"
16+
- python-version: "3.12"
1417

1518
env:
1619
FFMS2_DIR: ffms2-dir
1720

1821
steps:
1922
- uses: actions/checkout@v3
2023

21-
- name: Install Python 3.7 version
24+
- name: Install Python
2225
uses: actions/setup-python@v1
2326
with:
24-
python-version: '3.7'
25-
architecture: 'x64'
27+
python-version: ${{ matrix.python-version }}
2628

27-
- name: Install MacOS dependencies
28-
if: matrix.os == 'macos-latest'
29+
- name: Install dependencies
2930
run: |
30-
brew install pkg-config automake
31+
sudo apt install libffms2-dev
32+
sudo apt-get install libavcodec-dev libavformat-dev libavdevice-dev
3133
32-
- name: Install FFmpeg
33-
run: |
34-
PLATFORM=${{ matrix.os }}
35-
if [ ${PLATFORM} = "ubuntu-latest" ]
36-
then
37-
sudo apt-get install libavcodec-dev libavformat-dev libavdevice-dev
38-
else
39-
brew install ffmpeg
40-
fi
41-
42-
- name: Install ffms2
43-
env:
44-
LINK: https://github.com/FFMS/ffms2
45-
run: |
46-
git clone --depth 1 $LINK $FFMS2_DIR
47-
cd $FFMS2_DIR
48-
./autogen.sh --prefix=$HOME/$FFMS2_DIR
49-
make -j4 install
34+
# - name: Install ffms2
35+
# env:
36+
# LINK: https://github.com/FFMS/ffms2
37+
# run: |
38+
# git clone --depth 1 $LINK $FFMS2_DIR
39+
# cd $FFMS2_DIR
40+
# ./autogen.sh --prefix=$HOME/$FFMS2_DIR
41+
# make -j4 install
5042

5143
- name: Set environment variables
5244
run: |
@@ -60,44 +52,86 @@ jobs:
6052
./ffmsinfo
6153
6254
- name: Install setuptools
63-
run: |
64-
pip install setuptools
55+
run: pip install setuptools
6556

6657
- name: Install pyffms2
67-
run: |
68-
pip install .[dev]
58+
run: pip install .[dev]
6959

7060
- name: Run tests
7161
run: |
7262
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib
7363
python -m pytest
74-
75-
- name: Run ffmsindex
76-
run: |
77-
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib
7864
python -m ffms2 "tests/data/morning rescue.mkv"
79-
80-
- name: Run ffmsinfo
81-
run: |
82-
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib
8365
python ffmsinfo.py "tests/data/morning rescue.mkv"
84-
85-
- name: Run easy_usage
86-
run: |
87-
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib
8866
python easy_usage.py
8967
68+
# build-mac:
69+
# runs-on: ubuntu-latest
70+
71+
# env:
72+
# FFMS2_DIR: ffms2-dir
73+
74+
# steps:
75+
# - uses: actions/checkout@v3
76+
77+
# - name: Install Python
78+
# uses: actions/setup-python@v1
79+
# with:
80+
# python-version: 3.12
81+
82+
# - name: Install MacOS dependencies
83+
# run: |
84+
# brew install pkg-config automake
85+
86+
# - name: Install FFmpeg
87+
# run: |
88+
# brew install ffmpeg ffms2
89+
90+
# - name: Install ffms2
91+
# env:
92+
# LINK: https://github.com/FFMS/ffms2
93+
# run: |
94+
# git clone --depth 1 $LINK $FFMS2_DIR
95+
# cd $FFMS2_DIR
96+
# ./autogen.sh --prefix=$HOME/$FFMS2_DIR
97+
# make -j4 install
98+
99+
# - name: Set environment variables
100+
# run: |
101+
# echo "LD_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib" >> $GITHUB_ENV
102+
103+
# - name: Run C-test
104+
# run: |
105+
# cd tests/data
106+
# g++ -std=c++11 -o ffmsinfo ffmsinfo.cpp \
107+
# -I$HOME/$FFMS2_DIR/include -L$HOME/$FFMS2_DIR/lib -lffms2
108+
# ./ffmsinfo
109+
110+
# - name: Install setuptools
111+
# run: pip install setuptools
112+
113+
# - name: Install pyffms2
114+
# run: pip install .[dev]
115+
116+
# - name: Run tests
117+
# run: |
118+
# export DYLD_FALLBACK_LIBRARY_PATH=$HOME/$FFMS2_DIR/lib
119+
# python -m pytest
120+
# python -m ffms2 "tests/data/morning rescue.mkv"
121+
# python ffmsinfo.py "tests/data/morning rescue.mkv"
122+
# python easy_usage.py
123+
90124
build-windows:
91125

92126
runs-on: windows-latest
93127

94128
steps:
95129
- uses: actions/checkout@v3
96130

97-
- name: Install Python 3.7 version
131+
- name: Install Python
98132
uses: actions/setup-python@v1
99133
with:
100-
python-version: '3.7'
134+
python-version: '3.9'
101135
architecture: 'x64'
102136

103137
- name: Install setuptools

tests/test_ffms2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
class TestFFMS2(unittest.TestCase):
1313
def test_sample_video(self):
14+
print(ffms2.get_version_info())
15+
1416
source_path = Path(ROOT_DIR / "data/morning rescue.mkv")
1517

1618
indexer = ffms2.Indexer(source_path)

0 commit comments

Comments
 (0)