-
Notifications
You must be signed in to change notification settings - Fork 60
257 lines (222 loc) · 7.8 KB
/
main.yaml
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux:
strategy:
matrix:
compiler: ['gcc-9']
qt_version: ["5.15.2", "6.5.0"]
include:
- compiler: gcc-9
packages: gcc-9 g++-9
env: { 'CC': 'gcc-9', 'CXX': 'g++-9' }
- qt_version: "6.5.0"
qt_modules: "qtmultimedia"
qt_packages: "libxkbcommon-dev libgstreamer-plugins-base1.0-0 libgstreamer-gl1.0-0"
runs-on: ubuntu-latest
env: ${{ matrix.env }}
steps:
- uses: actions/checkout@v3
- name: Install compiler and FFmpeg dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y ${{ matrix.packages }} ${{ matrix.qt_packages }} \
libavcodec-dev \
libavformat-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswresample-dev \
libswscale-dev \
libva-x11-2 \
libva-drm2
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
modules: ${{ matrix.qt_modules }}
- name: QMake Build
if: ${{ matrix.qt_version == '5.15.2' }}
run: |
qmake
make CC=$CC CXX=$CXX
make install
- name: CMake Build
run: |
mkdir build
cd build
cmake ../ -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON
make CC=$CC CXX=$CXX CXXFLAGS='-std=c++17' VERBOSE=1
- name: QMake Test
if: ${{ matrix.qt_version == '5.15.2' }}
run: |
cd tests/
qmake
make CC=$CC CXX=$CXX CXXFLAGS='-std=c++17 -fPIC'
export QT_LOGGING_RULES="qt.QtAVPlayer.debug=true"
cd auto/integration/qavdemuxer
./tst_qavdemuxer
cd ../
cd qavplayer
./tst_qavplayer -maxwarnings 100000
- name: CMake Test
if: ${{ matrix.qt_version == '6.5.0' }}
run: |
cd build
export QT_LOGGING_RULES="qt.QtAVPlayer.debug=true"
./tests/auto/integration/qavdemuxer/tst_qavdemuxer
./tests/auto/integration/qavplayer/tst_qavplayer -maxwarnings 100000
macos:
strategy:
matrix:
compiler: ['clang-9']
include:
- compiler: clang-9
packages: llvm@13
env: { 'CC': 'clang', 'CXX': 'clang++', 'CXXFLAGS': '-DNS_FORMAT_ARGUMENT\(A\)= -fapplication-extension -std=c++17' }
runs-on: macos-latest
env: ${{ matrix.env }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install ${{ matrix.packages }} ffmpeg qt@5
- name: Set environment path
run: |
echo "/usr/local/opt/qt5/bin" >> $GITHUB_PATH
echo "/usr/local/Cellar/ffmpeg/6.0/include" >> $GITHUB_PATH
echo "/usr/local/opt/llvm@9/bin" >> $GITHUB_PATH
- name: CMake Build
run: |
mkdir build
cd build
cmake ../ -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=/usr/local/Cellar/ffmpeg/6.0/include -DCMAKE_LIBRARY_PATH=/usr/local/Cellar/ffmpeg/6.0/lib
make CC=$CC CXX=$CXX CXXFLAGS='-std=c++17' VERBOSE=1
- name: QMake Build
run: |
ffmpeg -version
qmake
make CC=$CC CXX=$CXX CXXFLAGS="$CXXFLAGS"
make install
- name: QMake Test
run: |
cd tests/
qmake
make CC=$CC CXX=$CXX
export QT_LOGGING_RULES="qt.QtAVPlayer.debug=true"
cd auto/integration/qavdemuxer
./tst_qavdemuxer --platform minimal
cd ../
cd qavplayer
./tst_qavplayer --platform minimal -maxwarnings 100000
windows:
strategy:
matrix:
qt_version: ["5.15.2"]
type: ["MSVC", "MINGW"]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Init vs environment
if: ${{ matrix.type == 'MSVC' }}
uses: egor-tensin/vs-shell@v2
with:
arch: x64
- name: Install wget & unzip
run: |
choco install wget unzip xidel
- name: Install Qt
if: ${{ matrix.type == 'MINGW' }}
uses: jurplel/install-qt-action@v3
with:
arch: win64_mingw81
version: ${{ matrix.qt_version }}
- name: Install Qt
if: ${{ matrix.type == 'MSVC' }}
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
- name: Install FFmpeg
shell: cmd
run: |
cd ..
xidel https://github.com/BtbN/FFmpeg-Builds/releases -e "//a[contains(@href, '-gpl-shared.zip')]/@href[1]" --silent > ffmpeg.url
xidel https://github.com/BtbN/FFmpeg-Builds/releases -e "(//a[contains(@href, '-gpl-shared.zip')])[1]/substring(., 0, string-length(.) - 3)" --silent > ffmpeg.name
set /P FFMPEG_URL=< ffmpeg.url
set /P FFMPEG_NAME=< ffmpeg.name
wget https://github.com%FFMPEG_URL%
unzip %FFMPEG_NAME%.zip
ren %FFMPEG_NAME% ffmpeg
dir ffmpeg
dir ffmpeg\include
dir ffmpeg\bin
SET FFMPEG=%CD%\ffmpeg
echo FFMPEG=%FFMPEG%>>%GITHUB_ENV%
echo PATH=%FFMPEG%\lib;%FFMPEG%\bin;%PATH%>>%GITHUB_ENV%
echo LIBRARY_PATH=%FFMPEG%\lib;%FFMPEG%\bin;%PATH%>>%GITHUB_ENV%
echo INCLUDE=%FFMPEG%\include;%INCLUDE%>>%GITHUB_ENV%
echo CPLUS_INCLUDE_PATH=%FFMPEG%\include;%CPLUS_INCLUDE_PATH%>>%GITHUB_ENV%
echo LIB=%FFMPEG%\lib;%FFMPEG%\bin;%LIB%>>%GITHUB_ENV%
- name: CMake Build
if: ${{ matrix.type == 'MSVC' }}
run: |
mkdir build
cd build
cmake ../ -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=D:\a\QtAVPlayer\ffmpeg\include -DCMAKE_LIBRARY_PATH=D:\a\QtAVPlayer\ffmpeg\lib -DBUILD_SHARED_LIBS=ON
cmake --build . -v
- name: CMake Build
if: ${{ matrix.type == 'MINGW' }}
run: |
mkdir build
cd build
cmake ../ -DBUILD_TESTS=ON -DBUILD_EXAMPLES=OFF -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=D:\a\QtAVPlayer\ffmpeg\include -DCMAKE_LIBRARY_PATH=D:\a\QtAVPlayer\ffmpeg\lib -DBUILD_SHARED_LIBS=OFF
cmake --build . -v
- name: QMake Build
if: ${{ matrix.type == 'MSVC' }}
shell: cmd
run: |
qmake
nmake
nmake install
- name: QMake Test
if: ${{ matrix.type == 'MSVC' }}
shell: cmd
run: |
set QT_LOGGING_RULES=qt.QtAVPlayer.debug=true
set QT_FORCE_STDERR_LOGGING=1
set QT_ASSUME_STDERR_HAS_CONSOLE=1
cd tests/
qmake
nmake
cd auto/integration/qavdemuxer
release\tst_qavdemuxer.exe
cd ../
cd qavplayer
release\tst_qavplayer.exe -maxwarnings 100000
- name: QMake Build
if: ${{ matrix.type == 'MINGW' }}
shell: cmd
run: |
qmake
mingw32-make
mingw32-make install
- name: QMake Test
if: ${{ matrix.type == 'MINGW' }}
shell: cmd
run: |
set QT_LOGGING_RULES=qt.QtAVPlayer.debug=true
set QT_FORCE_STDERR_LOGGING=1
set QT_ASSUME_STDERR_HAS_CONSOLE=1
cd tests/
qmake
mingw32-make
cd auto/integration/qavdemuxer
release\tst_qavdemuxer.exe
cd ../
cd qavplayer
release\tst_qavplayer.exe -maxwarnings 100000