-
Notifications
You must be signed in to change notification settings - Fork 14
/
.gitlab-ci.yml
550 lines (538 loc) · 24.3 KB
/
.gitlab-ci.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
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
variables:
CI_SCRIPTS_DIR: "./ci"
SCRATCH_DIR: "/home/gitlab-runner/giftgrab-scratch"
CTEST_OUTPUT_ON_FAILURE: "1"
before_script:
- export REVHASH=$(git rev-parse --short HEAD)
- export SCRATCH_DIR="$SCRATCH_DIR/$REVHASH"
- mkdir -p $SCRATCH_DIR
- export GiftGrab_SOURCE_DIR="$(pwd)/src"
# Path to the convenience script for launching tests
- export TEST_LAUNCHER="${GiftGrab_SOURCE_DIR}/tests/run-tests.sh"
- source "$CI_SCRIPTS_DIR/utils.sh"
- export BOOST_163_ROOT_DIR="/home/gitlab-runner/environments/giftgrab/boost163"
stages:
- install
- test_cmake
- test_pypi
################## Platform: CMake ##################
################## Target: All ######################
linux:
stage: install
script:
# prepare environment
- export GiftGrab_BUILD_DIR="$SCRATCH_DIR/build/GiftGrab-linux"
- export INSTALL_DIR="$SCRATCH_DIR/install-linux"
- rm -rf "$GiftGrab_BUILD_DIR"
- mkdir -p "$GiftGrab_BUILD_DIR"
- cd "$GiftGrab_BUILD_DIR"
# start script
- pwd
# bare-bones build
- cmake -D CMAKE_INSTALL_PREFIX="$INSTALL_DIR" "$GiftGrab_SOURCE_DIR"
- make -j; exit_on_fail
# no ctest: no features activated to be tested yet
- make install
# Python and tests (currently all python)
- cmake -D BUILD_PYTHON=ON -D BUILD_TESTS=ON .
- make -j; exit_on_fail
# no ctest: no features activated to be tested yet
- make install
# HEVC support
- cmake -D USE_HEVC=ON .
- make -j; exit_on_fail
- ctest; exit_on_fail
- make install
# HEVC support with x265
- cmake -D ENABLE_GPL=ON -D USE_X265=ON .
- make -j; exit_on_fail
- ctest; exit_on_fail
- make install
# turn x265 off explicitly for combination testing
- cmake -D ENABLE_GPL=OFF -D USE_X265=OFF .
# hardware-accelerated HEVC
- cmake -D ENABLE_NONFREE=ON -D USE_NVENC=ON .
- make -j; exit_on_fail
- ctest; exit_on_fail
- make install
# Xvid support (OpenCV should get switched here)
- cmake -D USE_XVID=ON .
- make -j; exit_on_fail
- ctest; exit_on_fail
- make install
# VP9 support
- cmake -D USE_VP9=ON .
- make -j; exit_on_fail
# not executing VP9 tests due to issue #189
- ctest -E Test_VP9; exit_on_fail
- make install
# NumPy support
- cmake -D USE_NUMPY=ON .
- make -j; exit_on_fail
# not executing VP9 tests due to issue #189
- ctest -E Test_VP9; exit_on_fail
- make install
# test support for video files
- cmake -D USE_FILES=ON .
- make -j; exit_on_fail
# not executing VP9 tests due to issue #189
- ctest -E Test_VP9; exit_on_fail
- make install
# build docs
- cmake -D BUILD_DOC=ON .
- make -j; exit_on_fail
# no ctest: only checking whether doc building
# properly here
- make install
tags:
- gift-linux
- gift-adelie
except:
- 164-revise-readme
- 162-revise-contribution-guide-before-open-sourcing
- 168-correct-ffmpeg-version-in-documentation
- 177-howto-links-for-dependencies-broken-on-github-mirror
- 179-pypi-installer-name-broken
- 41-configure-python-documentation-properly
- 195-fix-github-link-to-known-issues-from-requirements-md
- 201-incorporate-debian-installation-caveats-into-documentation
- 202-add-installation-instructions-for-a-minimal-version
- 206-revise-readme-for-information-content-and-cosmetics
- 203-make-dependency-versions-more-visible-in-documentation
- 207-check-all-changed-cross-references-in-docs-before-release
- 212-revise-minimal-example-header-hierarchy
- 220-add-non-standard-boost-installation-path-to-minimal-example
- 222-add-how-to-cite-block-in-main-readme
- 224-add-a-citing-gift-grab-section-to-pypi-page
- 225-add-citing-gift-grab-section-to-rtd-index
- 223-add-some-information-on-the-main-doxygen-home-page
################## Platform: PyPI ##################
################## Target: All #####################
pypi:
stage: install
script:
- GiftGrab_PyPI_BUILD_DIR="$SCRATCH_DIR/pypi"
- GiftGrab_PyPI_INSTALL_DIR="$GiftGrab_PyPI_BUILD_DIR/install"
- GiftGrab_venv=venv
- rm -rf "$GiftGrab_PyPI_BUILD_DIR"
- mkdir "$GiftGrab_PyPI_BUILD_DIR"
- rm -rf "$GiftGrab_PyPI_INSTALL_DIR"
- mkdir "$GiftGrab_PyPI_INSTALL_DIR"
- cd "$GiftGrab_PyPI_BUILD_DIR"
- export GiftGrab_PyPI_DIST_DIR=dist
- rm -rfv "$GiftGrab_PyPI_DIST_DIR"
- cd "$GiftGrab_SOURCE_DIR"
- python setup.py sdist
- mv "$GiftGrab_PyPI_DIST_DIR" "$GiftGrab_PyPI_BUILD_DIR"
- cd "$GiftGrab_PyPI_BUILD_DIR"
- virtualenv $GiftGrab_venv
- cd $GiftGrab_venv
- source bin/activate
- pip install pytest
- ls -alh ./*
- PyPI_INSTALLER="../$GiftGrab_PyPI_DIST_DIR/$(ls ../$GiftGrab_PyPI_DIST_DIR | grep tar.gz)"
- if [ -z "$PyPI_INSTALLER" ]; then exit 1; fi
# Ensure installer without options fails
- set +e
- pip install -vvv --upgrade "$PyPI_INSTALLER"; exit_on_success
- set -e
# HEVC support
- pip install -vvv --install-option="--hevc" --upgrade "$PyPI_INSTALLER"
- $TEST_LAUNCHER encode hevc bgra; exit_on_fail
# HEVC support with x265
- pip install -vvv --install-option="--hevc" --install-option="--enable-gpl" --install-option="--x265" --upgrade "$PyPI_INSTALLER"
- $TEST_LAUNCHER encode hevc bgra; exit_on_fail
- $TEST_LAUNCHER encode hevc i420; exit_on_fail
# hardware-accelerated HEVC
- pip install -vvv --install-option="--hevc" --install-option="--enable-nonfree" --install-option="--nvenc" --upgrade "$PyPI_INSTALLER"
- $TEST_LAUNCHER encode hevc bgra; exit_on_fail
- $TEST_LAUNCHER encode hevc i420; exit_on_fail
# Xvid support
- pip install -vvv --install-option="--hevc" --install-option="--enable-nonfree" --install-option="--nvenc" --install-option="--xvid" --upgrade "$PyPI_INSTALLER"
- $TEST_LAUNCHER encode xvid bgra; exit_on_fail
# VP9 support
- pip install -vvv --install-option="--hevc" --install-option="--enable-nonfree" --install-option="--nvenc" --install-option="--xvid" --install-option="--vp9" --upgrade "$PyPI_INSTALLER"
# not executing VP9 tests due to issue #189
# - $TEST_LAUNCHER encode vp9 bgra; exit_on_fail
# - $TEST_LAUNCHER encode vp9 i420; exit_on_fail
# NumPy support
- pip install -vvv --install-option="--hevc" --install-option="--enable-nonfree" --install-option="--nvenc" --install-option="--xvid" --install-option="--vp9" --install-option="--numpy" --upgrade "$PyPI_INSTALLER"
# TODO: delete these five lines after issue #133
- $TEST_LAUNCHER encode hevc bgra; exit_on_fail
- $TEST_LAUNCHER encode hevc i420; exit_on_fail
- $TEST_LAUNCHER encode xvid bgra; exit_on_fail
# not executing VP9 tests due to issue #189
# - $TEST_LAUNCHER encode vp9 bgra; exit_on_fail
# - $TEST_LAUNCHER encode vp9 i420; exit_on_fail
# Run the actual NumPy tests
- pip install numpy
- $TEST_LAUNCHER numpy bgra; exit_on_fail
- $TEST_LAUNCHER numpy i420; exit_on_fail
# Runt stereo frame tests
- $TEST_LAUNCHER stereo bgra; exit_on_fail
- $TEST_LAUNCHER stereo i420; exit_on_fail
- $TEST_LAUNCHER stereo uyvy; exit_on_fail
# test support for video files
- pip install -vvv --install-option="--hevc" --install-option="--enable-nonfree" --install-option="--nvenc" --install-option="--xvid" --install-option="--vp9" --install-option="--numpy" --install-option="--files" --upgrade "$PyPI_INSTALLER"
- $TEST_LAUNCHER decode hevc bgra; exit_on_fail
- $TEST_LAUNCHER decode hevc i420; exit_on_fail
- $TEST_LAUNCHER decode hevc uyvy; exit_on_fail
- $TEST_LAUNCHER decode xvid bgra; exit_on_fail
- $TEST_LAUNCHER decode xvid i420; exit_on_fail
- $TEST_LAUNCHER decode xvid uyvy; exit_on_fail
# not executing VP9 tests due to issue #189
# - $TEST_LAUNCHER decode vp9 bgra; exit_on_fail
# - $TEST_LAUNCHER decode vp9 i420; exit_on_fail
# - $TEST_LAUNCHER decode vp9 uyvy; exit_on_fail
- deactivate
tags:
- gift-linux
- gift-pypi
- gift-adelie
except:
- 164-revise-readme
- 162-revise-contribution-guide-before-open-sourcing
- 168-correct-ffmpeg-version-in-documentation
- 177-howto-links-for-dependencies-broken-on-github-mirror
- 179-pypi-installer-name-broken
- 41-configure-python-documentation-properly
- 195-fix-github-link-to-known-issues-from-requirements-md
- 201-incorporate-debian-installation-caveats-into-documentation
- 202-add-installation-instructions-for-a-minimal-version
- 206-revise-readme-for-information-content-and-cosmetics
- 203-make-dependency-versions-more-visible-in-documentation
- 207-check-all-changed-cross-references-in-docs-before-release
- 212-revise-minimal-example-header-hierarchy
- 220-add-non-standard-boost-installation-path-to-minimal-example
- 222-add-how-to-cite-block-in-main-readme
- 225-add-citing-gift-grab-section-to-rtd-index
- 223-add-some-information-on-the-main-doxygen-home-page
################## Device: Epiphan DVI2PCIe Duo ##################
################## Platform: PyPI ################################
################## Target: All ###################################
pypi-epiphan-dvi2pcie-duo:
stage: test_pypi
script:
# for custom FFmpeg:
- export STORZ_STACK_GIFTGRAB_ENV_ROOT=/home/gitlab-runner/environments/giftgrab/usr/local
# TODO - export PATH="$STORZ_STACK_GIFTGRAB_ENV_ROOT/bin":$PATH
- export PKG_CONFIG_PATH="$STORZ_STACK_GIFTGRAB_ENV_ROOT/lib/pkgconfig":$PKG_CONFIG_PATH
- GiftGrab_PyPI_BUILD_DIR="$SCRATCH_DIR/pypi-epiphan-dvi2pcie-duo"
- GiftGrab_PyPI_INSTALL_DIR="$GiftGrab_PyPI_BUILD_DIR/install"
- GiftGrab_venv=venv
- rm -rf "$GiftGrab_PyPI_BUILD_DIR"
- mkdir "$GiftGrab_PyPI_BUILD_DIR"
- rm -rf "$GiftGrab_PyPI_INSTALL_DIR"
- mkdir "$GiftGrab_PyPI_INSTALL_DIR"
- cd "$GiftGrab_PyPI_BUILD_DIR"
- export GiftGrab_PyPI_DIST_DIR=dist
- rm -rfv "$GiftGrab_PyPI_DIST_DIR"
- cd "$GiftGrab_SOURCE_DIR"
- python setup.py sdist
- mv "$GiftGrab_PyPI_DIST_DIR" "$GiftGrab_PyPI_BUILD_DIR"
- cd "$GiftGrab_PyPI_BUILD_DIR"
- virtualenv $GiftGrab_venv
- cd $GiftGrab_venv
- source bin/activate
- ls -alh ./*
- PyPI_INSTALLER="../$GiftGrab_PyPI_DIST_DIR/$(ls ../$GiftGrab_PyPI_DIST_DIR | grep tar.gz)"
- if [ -z "$PyPI_INSTALLER" ]; then exit 1; fi
# because pip seems to be getting confused about install options on Storz stack:
- pip install PyYAML
- pip install pytest
# Epiphan DVI2PCIe Duo support (OpenCV only)
- pip install -vvv --install-option="--hevc" --install-option="--nvenc" --install-option="--enable-nonfree" --install-option="--xvid" --install-option="--vp9" --install-option="--epiphan-dvi2pcie-duo" --install-option="--no-i420" --upgrade "$PyPI_INSTALLER"
# Disabled the BGRA tests of Epiphan DVI2PCIe Duo (currently using OpenCV) until issue #115 is resolved
# - $TEST_LAUNCHER epiphan-dvi2pcieduo bgra sdi; exit_on_fail
# - $TEST_LAUNCHER epiphan-dvi2pcieduo bgra dvi; exit_on_fail
# Epiphan DVI2PCIe Duo support (Epiphan SDK only)
- pip install -vvv --install-option="--hevc" --install-option="--nvenc" --install-option="--enable-nonfree" --install-option="--vp9" --install-option="--epiphan-dvi2pcie-duo" --install-option="--epiphansdk" --install-option="--no-bgra" --upgrade "$PyPI_INSTALLER"
# TODO: issue #102
# - $TEST_LAUNCHER epiphan-dvi2pcieduo i420 sdi; exit_on_fail
# - $TEST_LAUNCHER epiphan-dvi2pcieduo i420 dvi; exit_on_fail
# Epiphan DVI2PCIe Duo support (both OpenCV and Epiphan SDK)
# dummy var, to induce width_offset in test_epiphan_py_module.py
# see definition of width_offset in test_epiphan_py_module.py (Epiphan DVI2PCIe Duo tests)
- export USE_EPIPHANSDK=3
- pip install -vvv --install-option="--hevc" --install-option="--nvenc" --install-option="--enable-nonfree" --install-option="--xvid" --install-option="--vp9" --install-option="--epiphan-dvi2pcie-duo" --install-option="--epiphansdk" --upgrade "$PyPI_INSTALLER"
- $TEST_LAUNCHER epiphan-dvi2pcieduo i420 sdi; exit_on_fail
- $TEST_LAUNCHER epiphan-dvi2pcieduo i420 dvi; exit_on_fail
# NumPy support
- pip install -vvv --install-option="--hevc" --install-option="--nvenc" --install-option="--enable-nonfree" --install-option="--xvid" --install-option="--vp9" --install-option="--epiphan-dvi2pcie-duo" --install-option="--epiphansdk" --install-option="--numpy" --upgrade "$PyPI_INSTALLER"
- $TEST_LAUNCHER epiphan-dvi2pcieduo i420 sdi; exit_on_fail
- $TEST_LAUNCHER epiphan-dvi2pcieduo i420 dvi; exit_on_fail
# Run the actual NumPy tests
- pip install numpy
- $TEST_LAUNCHER numpy i420; exit_on_fail
- unset USE_EPIPHANSDK # remove dummy var
- deactivate
tags:
- gift-linux
- gift-pypi
- gift-epiphan-dvi2pcie-duo
only:
- this-branch-should-never-exist
################## Device: Epiphan DVI2PCIe Duo ##################
epiphan-dvi2pcie-duo:
stage: test_cmake
script:
# prepare environment
- export GiftGrab_BUILD_DIR="$SCRATCH_DIR/build/GiftGrab-epiphan-dvi2pcie-duo"
- export INSTALL_DIR="$SCRATCH_DIR/install-epiphan-dvi2pcie-duo"
- rm -rf "$GiftGrab_BUILD_DIR"
- mkdir -p "$GiftGrab_BUILD_DIR"
- cd "$GiftGrab_BUILD_DIR"
# start script
# for custom FFmpeg:
- export STORZ_STACK_GIFTGRAB_ENV_ROOT=/home/gitlab-runner/environments/giftgrab/usr/local
# TODO - export PATH="$STORZ_STACK_GIFTGRAB_ENV_ROOT/bin":$PATH
- export PKG_CONFIG_PATH="$STORZ_STACK_GIFTGRAB_ENV_ROOT/lib/pkgconfig":$PKG_CONFIG_PATH
# test VideoSourceFactory (needs both colour spaces enabled)
# Epiphan SDK
# dummy var, to induce width_offset in test_epiphan_py_module.py
# see definition of width_offset in test_epiphan_py_module.py (Epiphan DVI2PCIe Duo tests)
- export USE_EPIPHANSDK=3
- cmake -D USE_EPIPHAN_DVI2PCIE_DUO=ON -D USE_EPIPHANSDK=ON -D ENABLE_NONFREE=ON -D BUILD_PYTHON=ON -D BUILD_TESTS=ON -D USE_HEVC=ON -D USE_NVENC=ON -D ENABLE_NONFREE=ON "$GiftGrab_SOURCE_DIR"
- make -j; exit_on_fail
- check_epiphan_alive
- ctest -R Epiphan_DVI2PCIeDuo_VideoSourceFactory_DVI_I420; exit_on_fail # due to issue #126
- ctest -R Epiphan_DVI2PCIeDuo_VideoSourceFactory_SDI_I420; exit_on_fail # due to issue #126
# test BGRA colour space
- cmake -D USE_BGRA=ON -D USE_I420=OFF .
- make -j; exit_on_fail
- check_epiphan_alive
# -E => excluding VideoSourceFactory tests
- ctest -E Epiphan_DVI2PCIeDuo_VideoSourceFactory; exit_on_fail
- ctest -R Epiphan_DVI2PCIeDuo_VideoSourceFactory_DVI_BGRA; exit_on_fail # due to issue #126
- ctest -R Epiphan_DVI2PCIeDuo_VideoSourceFactory_SDI_BGRA; exit_on_fail # due to issue #126
# test I420 colour space
- cmake -D USE_BGRA=OFF -D USE_I420=ON .
- make -j; exit_on_fail
- check_epiphan_alive
- ctest; exit_on_fail
# NumPy support
- cmake -D USE_NUMPY=ON .
- make -j; exit_on_fail
- ctest; exit_on_fail
- unset USE_EPIPHANSDK # remove dummy var
tags:
- gift-linux
- gift-epiphan-dvi2pcie-duo
only:
- this-branch-should-never-exist
################## Device: Epiphan Pearl #########################
################## Platform: PyPI ################################
pypi-network-sources:
stage: test_pypi
script:
- GiftGrab_PyPI_BUILD_DIR="$SCRATCH_DIR/pypi-network-sources"
- GiftGrab_PyPI_INSTALL_DIR="$GiftGrab_PyPI_BUILD_DIR/install"
- GiftGrab_venv=venv
- rm -rf "$GiftGrab_PyPI_BUILD_DIR"
- mkdir "$GiftGrab_PyPI_BUILD_DIR"
- rm -rf "$GiftGrab_PyPI_INSTALL_DIR"
- mkdir "$GiftGrab_PyPI_INSTALL_DIR"
- cd "$GiftGrab_PyPI_BUILD_DIR"
- export GiftGrab_PyPI_DIST_DIR=dist
- rm -rfv "$GiftGrab_PyPI_DIST_DIR"
- cd "$GiftGrab_SOURCE_DIR"
- python setup.py sdist
- mv "$GiftGrab_PyPI_DIST_DIR" "$GiftGrab_PyPI_BUILD_DIR"
- cd "$GiftGrab_PyPI_BUILD_DIR"
- export EPIPHAN_PEARL_IP="128.16.14.129"
- export EPIPHAN_PEARL_MRL="rtsp://$EPIPHAN_PEARL_IP:555/stream.sdp"
- virtualenv $GiftGrab_venv
- cd $GiftGrab_venv
- source bin/activate
- ls -alh ./*
- PyPI_INSTALLER="../$GiftGrab_PyPI_DIST_DIR/$(ls ../$GiftGrab_PyPI_DIST_DIR | grep tar.gz)"
- if [ -z "$PyPI_INSTALLER" ]; then exit 1; fi
# because pip seems to be getting confused about install options sometimes:
- pip install PyYAML
- pip install pytest
- export TESTING_NETWORK_SOURCE_ADDRESS=$EPIPHAN_PEARL_MRL
- export TESTING_NETWORK_SOURCE_FRAME_RATE=10
# test I420 colour space
- export TESTING_NETWORK_SOURCE_DELAY=7
- pip install -vvv --install-option="--network-sources" --install-option="--no-bgra" --install-option="--hevc" --install-option="--nvenc" --install-option="--enable-nonfree" --upgrade "$PyPI_INSTALLER"
- test-giftgrab-network-sources-i420; exit_on_fail
# test BGRA colour space
- unset TESTING_NETWORK_SOURCE_DELAY
- pip install -vvv --install-option="--network-sources" --install-option="--no-i420" --install-option="--hevc" --install-option="--nvenc" --install-option="--enable-nonfree" --upgrade "$PyPI_INSTALLER"
- test-giftgrab-network-sources-bgra; exit_on_fail
# deactivate virtual env
- deactivate
tags:
- gift-linux
- gift-pypi
- gift-epiphan-pearl
only:
- 5-add-support-for-blackmagic
- 174-networksourceunavailable-not-exposed-to-python
################## Device: Epiphan Pearl ##################
network-sources:
stage: test_cmake
script:
# prepare environment
- export GiftGrab_BUILD_DIR="$SCRATCH_DIR/build/GiftGrab-network-sources"
- export INSTALL_DIR="$SCRATCH_DIR/install-network-sources"
- rm -rf "$GiftGrab_BUILD_DIR"
- mkdir -p "$GiftGrab_BUILD_DIR"
- cd "$GiftGrab_BUILD_DIR"
- export EPIPHAN_PEARL_IP="128.16.14.129"
- export EPIPHAN_PEARL_MRL="rtsp://$EPIPHAN_PEARL_IP:555/stream.sdp"
# test I420 colour space
- cmake -D TESTING_NETWORK_SOURCE_ADDRESS=$EPIPHAN_PEARL_MRL -D TESTING_NETWORK_SOURCE_FRAME_RATE=10 -D TESTING_NETWORK_SOURCE_DELAY=7 -D USE_NETWORK_SOURCES=ON -D USE_BGRA=OFF -D BUILD_PYTHON=ON -D BUILD_TESTS=ON -D USE_HEVC=ON -D USE_NVENC=ON -D ENABLE_NONFREE=ON "$GiftGrab_SOURCE_DIR"
- make -j; exit_on_fail
- ctest; exit_on_fail
# test BGRA colour space
- cmake -D USE_BGRA=ON -D USE_I420=OFF .
- make -j; exit_on_fail
- ctest; exit_on_fail
tags:
- gift-linux
- gift-epiphan-pearl
only:
- 5-add-support-for-blackmagic
- 174-networksourceunavailable-not-exposed-to-python
################## Device: Blackmagic DeckLink SDI 4K ##################
pypi-blackmagic-decklink-sdi-4k:
stage: test_pypi
script:
# prepare environment
- export BlackmagicSDK_DIR="/home/gitlab-runner/environments/giftgrab/blackmagic_sdk/sdk"
# custom Boost
- export BOOST_ROOT="/home/gitlab-runner/environments/giftgrab/usr/local"
- GiftGrab_PyPI_BUILD_DIR="$SCRATCH_DIR/pypi-blackmagic-decklink-sdi-4k"
- GiftGrab_PyPI_INSTALL_DIR="$GiftGrab_PyPI_BUILD_DIR/install"
- GiftGrab_venv=venv
- rm -rf "$GiftGrab_PyPI_BUILD_DIR"
- mkdir "$GiftGrab_PyPI_BUILD_DIR"
- rm -rf "$GiftGrab_PyPI_INSTALL_DIR"
- mkdir "$GiftGrab_PyPI_INSTALL_DIR"
- cd "$GiftGrab_PyPI_BUILD_DIR"
- export GiftGrab_PyPI_DIST_DIR=dist
- rm -rfv "$GiftGrab_PyPI_DIST_DIR"
- cd "$GiftGrab_SOURCE_DIR"
- python setup.py sdist
- mv "$GiftGrab_PyPI_DIST_DIR" "$GiftGrab_PyPI_BUILD_DIR"
- cd "$GiftGrab_PyPI_BUILD_DIR"
- virtualenv $GiftGrab_venv
- cd $GiftGrab_venv
- source bin/activate
- ls -alh ./*
- PyPI_INSTALLER="../$GiftGrab_PyPI_DIST_DIR/$(ls ../$GiftGrab_PyPI_DIST_DIR | grep tar.gz)"
- if [ -z "$PyPI_INSTALLER" ]; then exit 1; fi
# because pip seems to be getting confused about install options sometimes:
- pip install pytest
- pip install numpy
- pip install scipy
- pip install -vvv --install-option="--blackmagic-decklink-sdi-4k" --install-option="--enable-nonfree" --upgrade "$PyPI_INSTALLER"
# run tests
- $TEST_LAUNCHER blackmagic-decklinksdi4k uyvy; exit_on_fail
# deactivate virtual env
- deactivate
tags:
- gift-blackmagic-decklink-sdi-4k
only:
- this-branch-should-never-exist
- 23-support-for-blackmagic-decklink-4k-extreme-12g
- 20-support-for-capturing-bgra-frames-with-blackmagic-devices
- 14-unable-to-free-blackmagic-video-source
- 5-support-for-3d-capture-on-blackmagic-cards
- 18-extend-api-to-support-stereo-streams
- 30-12-bit-rgb-to-bgra-converter-for-decklink
blackmagic-decklink-sdi-4k:
stage: test_cmake
script:
# prepare environment
- export BlackmagicSDK_DIR="/home/gitlab-runner/environments/giftgrab/blackmagic_sdk/sdk"
# custom Boost
- export BOOST_ROOT="/home/gitlab-runner/environments/giftgrab/usr/local"
- export GiftGrab_BUILD_DIR="$SCRATCH_DIR/build/GiftGrab-blackmagic-decklink-sdi-4k"
- rm -rf "$GiftGrab_BUILD_DIR"
- mkdir -p "$GiftGrab_BUILD_DIR"
- cd "$GiftGrab_BUILD_DIR"
- cmake -D BUILD_PYTHON=ON -D BUILD_TESTS=ON -D USE_BLACKMAGIC_DECKLINK_SDI_4K=ON -D ENABLE_NONFREE=ON "$GiftGrab_SOURCE_DIR"
- make -j; exit_on_fail
- ctest; exit_on_fail
tags:
- gift-blackmagic-decklink-sdi-4k
only:
- this-branch-should-never-exist
- 23-support-for-blackmagic-decklink-4k-extreme-12g
- 20-support-for-capturing-bgra-frames-with-blackmagic-devices
- 14-unable-to-free-blackmagic-video-source
- 5-support-for-3d-capture-on-blackmagic-cards
- 18-extend-api-to-support-stereo-streams
- 30-12-bit-rgb-to-bgra-converter-for-decklink
################## Device: Blackmagic DeckLink 4K Extreme 12G ##################
pypi-blackmagic-decklink-4k-extreme-12g:
stage: test_pypi
script:
# prepare environment
- export BlackmagicSDK_DIR="/opt/blackmagic_sdk"
- GiftGrab_PyPI_BUILD_DIR="$SCRATCH_DIR/pypi-blackmagic-decklink-4k-extreme-12g"
- GiftGrab_PyPI_INSTALL_DIR="$GiftGrab_PyPI_BUILD_DIR/install"
- GiftGrab_venv=venv
- rm -rf "$GiftGrab_PyPI_BUILD_DIR"
- mkdir "$GiftGrab_PyPI_BUILD_DIR"
- rm -rf "$GiftGrab_PyPI_INSTALL_DIR"
- mkdir "$GiftGrab_PyPI_INSTALL_DIR"
- cd "$GiftGrab_PyPI_BUILD_DIR"
- export GiftGrab_PyPI_DIST_DIR=dist
- rm -rfv "$GiftGrab_PyPI_DIST_DIR"
- cd "$GiftGrab_SOURCE_DIR"
- python setup.py sdist
- mv "$GiftGrab_PyPI_DIST_DIR" "$GiftGrab_PyPI_BUILD_DIR"
- cd "$GiftGrab_PyPI_BUILD_DIR"
- virtualenv $GiftGrab_venv
- cd $GiftGrab_venv
- source bin/activate
- ls -alh ./*
- PyPI_INSTALLER="../$GiftGrab_PyPI_DIST_DIR/$(ls ../$GiftGrab_PyPI_DIST_DIR | grep tar.gz)"
- if [ -z "$PyPI_INSTALLER" ]; then exit 1; fi
# because pip seems to be getting confused about install options sometimes:
- pip install pytest
- pip install numpy
- pip install scipy
- pip install -vvv --install-option="--blackmagic-decklink-4k-extreme-12g" --install-option="--enable-nonfree" --install-option="--numpy" --upgrade "$PyPI_INSTALLER"
# run tests
- $TEST_LAUNCHER blackmagic-decklink4kextreme12g uyvy; exit_on_fail
- $TEST_LAUNCHER blackmagic-decklink4kextreme12g bgra; exit_on_fail
# deactivate virtual env
- deactivate
tags:
- gift-blackmagic-decklink-4k-extreme-12g
only:
- this-branch-should-never-exist
- 23-support-for-blackmagic-decklink-4k-extreme-12g
- 20-support-for-capturing-bgra-frames-with-blackmagic-devices
- 32-videosourcefactory-destructor-does-not-free-all-devices
- 14-unable-to-free-blackmagic-video-source
- 5-support-for-3d-capture-on-blackmagic-cards
- 18-extend-api-to-support-stereo-streams
- 30-12-bit-rgb-to-bgra-converter-for-decklink
blackmagic-decklink-4k-extreme-12g:
stage: test_cmake
script:
# prepare environment
- export BlackmagicSDK_DIR="/opt/blackmagic_sdk"
- export GiftGrab_BUILD_DIR="$SCRATCH_DIR/build/GiftGrab-blackmagic-decklink-4k-extreme-12g"
- rm -rf "$GiftGrab_BUILD_DIR"
- mkdir -p "$GiftGrab_BUILD_DIR"
- cd "$GiftGrab_BUILD_DIR"
- cmake -D BUILD_PYTHON=ON -D USE_NUMPY=ON -D BUILD_TESTS=ON -D USE_BLACKMAGIC_DECKLINK_4K_EXTREME_12G=ON -D ENABLE_NONFREE=ON "$GiftGrab_SOURCE_DIR"
- make -j; exit_on_fail
- ctest; exit_on_fail
tags:
- gift-blackmagic-decklink-4k-extreme-12g
only:
- this-branch-should-never-exist
- 23-support-for-blackmagic-decklink-4k-extreme-12g
- 20-support-for-capturing-bgra-frames-with-blackmagic-devices
- 32-videosourcefactory-destructor-does-not-free-all-devices
- 14-unable-to-free-blackmagic-video-source
- 5-support-for-3d-capture-on-blackmagic-cards
- 18-extend-api-to-support-stereo-streams
- 30-12-bit-rgb-to-bgra-converter-for-decklink