-
Notifications
You must be signed in to change notification settings - Fork 9
/
.gitlab-ci.yml
82 lines (78 loc) · 2.16 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
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_REF_PROTECTED
stages:
- fetch
- test
cache: &pylon_cache
key: "$CI_COMMIT_REF_SLUG"
paths:
- pylon-installer
fetch:
stage: fetch
variables:
PYLON_DOWNLOAD_URL_BASE: $PYLON_DOWNLOAD_URL_BASE
cache:
<<: *pylon_cache
policy: push
script:
- |
apt update
apt install -y curl
- |
mkdir -p pylon-installer && pushd pylon-installer
list="${PYLON_DOWNLOAD_URL_BASE}/pylon_7.1.0.25066_x86_64_setup.tar.gz \
${PYLON_DOWNLOAD_URL_BASE}/pylon_6.3.0.23157_x86_64_setup.tar.gz"
for url in $list; do
echo "Download $url"
curl -sSfL -O "$url"
done
echo "Download result"
rm -rf pylon_tmp
md5sum *
popd
test:
stage: test
parallel:
matrix:
- OS: [ubuntu:20.04, ubuntu:18.04]
PV: [7.1.0.25066, 6.3.0.23157]
image: ${OS}
cache:
<<: *pylon_cache
policy: pull
script:
- echo "Building Pylon ${PV} on ${OS}"
- |
apt update
dpkg-query -W -f='${Status}' libunwind-14-dev | grep "ok installed" && apt-get remove -y libunwind-14-dev
DEBIAN_FRONTEND=noninteractive apt install -y \
curl \
python3 \
python3-pip \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
cmake \
clang \
gstreamer1.0-tools
- |
PYLON_TGZ=$(readlink -m pylon-installer/pylon_${PV}_x86_64_setup.tar.gz)
mkdir pylon_tmp
pushd pylon_tmp
tar -xf $PYLON_TGZ
mkdir -p /opt/pylon
tar -C /opt/pylon -xzf pylon_${PV}_x86_64.tar.gz
popd
- |
pip3 install pip --upgrade
pip3 install meson ninja
- |
PYLON_ROOT=/opt/pylon meson --prefix /usr builddir || cat builddir/meson-logs/meson-log.txt >&2
ninja -C builddir
ninja -C builddir test
ninja -C builddir install
- |
PYLON_CAMEMU=2 G_DEBUG=critical-warnings gst-inspect-1.0 pylonsrc
PYLON_CAMEMU=2 GST_DEBUG=2 G_DEBUG=critical-warnings gst-launch-1.0 pylonsrc device-index=0 num-buffers=10 cam::TestIamgeSelector=Testimage1 ! fakesink