forked from sandy-lcq/spice
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
184 lines (171 loc) · 6.46 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
image: fedora:latest
before_script:
- >
dnf install 'dnf-command(debuginfo-install)' git libtool make libasan orc-devel
python3 python3-six python3-pyparsing glib-networking
asciidoc bzip2 meson ninja-build file
glib2-devel celt051-devel pixman-devel alsa-lib-devel openssl-devel libjpeg-turbo-devel
libcacard-devel cyrus-sasl-devel lz4-devel opus-devel
gstreamer1-devel gstreamer1-plugins-base-devel
dconf
-y
- git clone ${CI_REPOSITORY_URL/spice.git/spice-protocol.git}
- (cd spice-protocol && ./autogen.sh --prefix=/usr && make install)
# This is a workaround for Fedora docker image, this will add some
# missing configuration
# '/org/gnome/system/location/enabled' is just the first key path
# I found, nothing special in it
# TODO remove when the image will fix this issue
- dconf reset /org/gnome/system/location/enabled || true
makecheck:
script:
# Also check out-of-tree build
- git clean -fdx # cleanup after previous builds
- git submodule foreach --recursive git clean -fdx
- mkdir builddir
- cd builddir
- >
CFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
LDFLAGS='-fsanitize=address -lasan'
../autogen.sh --enable-celt051
- make
- make -C server check || (cat server/tests/test-suite.log && exit 1)
- cd ..
meson-makecheck:
script:
- >
CFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
LDFLAGS='-fsanitize=address -lasan'
meson --buildtype=release build -Dcelt051=enabled || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build
- (cd build && meson test) || (cat build/meson-logs/testlog.txt && exit 1)
# check non-standard options, currently
# --enable-statistics compile statistic code
# --without-sasl disable SASL
options:
script:
- ./autogen.sh --enable-statistics --without-sasl --disable-celt051
- make
- make -C server check || (cat server/tests/test-suite.log && exit 1)
meson-options:
script:
- meson --buildtype=release -Dstatistics=true -Dsasl=false -Dcelt051=disabled build
- ninja -C build
- (cd build && meson test) || (cat build/meson-logs/testlog.txt && exit 1)
check-valgrind:
script:
- dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm -y
- dnf debuginfo-install spice-server glib2 -y
- >
dnf install valgrind
gstreamer1-libav gstreamer1-plugins-ugly gstreamer1-plugins-good gstreamer1-plugins-bad-free
-y
- >
CFLAGS='-O2 -pipe -g -D_FORTIFY_SOURCE=0'
./autogen.sh --enable-valgrind --enable-extra-checks --enable-celt051
- make
- make check-valgrind || (cat server/tests/test-suite-memcheck.log && exit 1)
syntax-check:
script:
- ./autogen.sh --enable-celt051
- make syntax-check
distcheck:
script:
- ./autogen.sh --enable-celt051 --enable-manual
- make distcheck
# Same as makecheck job but use a Centos image
makecheck-centos:
before_script:
- dnf install -y 'dnf-command(config-manager)'
- dnf config-manager --set-enabled PowerTools
- >
dnf install git libtool make libasan orc-devel glib-networking
gcc glib2-devel
opus-devel pixman-devel openssl-devel libjpeg-devel
libcacard-devel cyrus-sasl-devel lz4-devel
gstreamer1-devel gstreamer1-plugins-base-devel
git-core python3-pyparsing python3-six python3
-y
- git clone ${CI_REPOSITORY_URL/spice.git/spice-protocol.git}
- (cd spice-protocol && ./autogen.sh --prefix=/usr && make install)
image: centos:latest
script:
- >
CFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
LDFLAGS='-fsanitize=address -lasan'
./autogen.sh --disable-celt051
- make
- make -C server check || (cat server/tests/test-suite.log && exit 1)
# Same as makecheck job but use a Centos image
makecheck-centos32:
before_script:
- >
yum install git libtool make libasan orc-devel glib-networking
yum-utils gcc glib2-devel celt051-devel
opus-devel pixman-devel openssl-devel libjpeg-devel
libcacard-devel cyrus-sasl-devel lz4-devel
gstreamer1-devel gstreamer1-plugins-base-devel
git-core pyparsing python-six
-y
- git clone ${CI_REPOSITORY_URL/spice.git/spice-protocol.git}
- (cd spice-protocol && ./autogen.sh --prefix=/usr && make install)
image: i386/centos:latest
script:
- >
CFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
LDFLAGS='-fsanitize=address -lasan'
./autogen.sh --enable-celt051
- make
- make -C server check || (cat server/tests/test-suite.log && exit 1)
# Same as makecheck job but use Windows build
makecheck-windows:
script:
- >
dnf install -y
wine-core.x86_64 mingw64-gcc-c++
mingw64-openssl mingw64-glib2 mingw64-glib-networking mingw64-libjpeg-turbo
mingw64-pixman mingw64-opus mingw64-winpthreads mingw64-zlib
mingw64-gstreamer1-plugins-base mingw64-gstreamer1-plugins-good mingw64-orc
- cd spice-protocol
- mingw64-configure
- mingw64-make install
- cd ..
- NOCONFIGURE=yes ./autogen.sh
- mingw64-configure --disable-celt051
- mingw64-make
- mingw64-make LOG_COMPILE=wine -C server check || (cat server/tests/test-suite.log && exit 1)
websocket-autobahn:
before_script:
- apt-get update || true
- apt-get install -y python-six python-pyparsing libopus-dev libssl-dev libglib2.0-dev
- git clone ${CI_REPOSITORY_URL/spice.git/spice-protocol.git}
- (cd spice-protocol && ./autogen.sh --prefix=/usr && make install)
image: crossbario/autobahn-testsuite
script:
- ./autogen.sh
- make -j4
- ./server/tests/test-websocket & pid=$!
- wstest -m fuzzingclient -s server/tests/fuzzingclient.json
- kill $pid
- server/tests/autobahn-check-report reports/servers/index.json
- rm -rf reports/servers
- ./server/tests/test-websocket -n & pid=$!
- wstest -m fuzzingclient -s server/tests/fuzzingclient.json
- kill $pid
- server/tests/autobahn-check-report reports/servers/index.json
trigger-website-update:
image: ruby:latest
before_script:
- gem install asciidoctor
only:
variables:
- $TOKEN
changes:
- "docs/*.txt"
- "docs/images/*"
- "docs/manual/*.txt"
- "docs/manual/images/*"
script:
- asciidoctor -d book docs/*.txt docs/manual/*.txt > errors 2>&1
- if [ -n "$(cat errors)" ] ; then cat errors; exit 1 ; fi
- curl -X POST -F token=$TOKEN -F ref=master https://gitlab.freedesktop.org/api/v4/projects/spice%2Fspice-space/trigger/pipeline