spice/.gitlab-ci.yml
Frediano Ziglio a56e65187e ci: Use Ubuntu Bionic for websocket-autobahn job
Autobahn testsuite is based on Python 2.
See https://github.com/crossbario/autobahn-testsuite/issues/109.

Temporarily use an Ubuntu LTS distro still having Python 2, this will
make the job work for some years.

Hoping in the future to either:
- update Autobahn testsuite to Python 3;
- finding another testsuite for websockets.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-02-08 09:47:32 +00:00

218 lines
7.8 KiB
YAML

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 diffutils
glib2-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 gcc-c++ autoconf-archive
-y
- &protocol >
git clone ${CI_REPOSITORY_URL/spice.git/spice-protocol.git} &&
meson --buildtype=release spice-protocol build-spice-protocol --prefix=/usr --werror &&
ninja -C build-spice-protocol install &&
rm -rf build-spice-protocol
# 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'
CXXFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
LDFLAGS='-fsanitize=address -lasan'
../autogen.sh
- make
- make -C server check || (cat server/tests/test-suite.log && exit 1)
meson-makecheck:
script:
- git clean -fdx
- git submodule foreach --recursive git clean -fdx
- >
CFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
CXXFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
LDFLAGS='-fsanitize=address -lasan'
meson --buildtype=release --werror build || (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
- make
- make -C server check || (cat server/tests/test-suite.log && exit 1)
meson-options:
script:
- git clean -fdx
- git submodule foreach --recursive git clean -fdx
- meson --buildtype=release --werror -Dstatistics=true -Dsasl=false 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'
CXXFLAGS='-O2 -pipe -g -D_FORTIFY_SOURCE=0'
./autogen.sh --enable-valgrind --enable-extra-checks
- make
- make check-valgrind || (cat server/tests/test-suite-memcheck.log && exit 1)
syntax-check:
script:
- ./autogen.sh
- make syntax-check
distcheck:
script:
- ./autogen.sh --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
meson gcc-c++ autoconf-archive
-y
- *protocol
image: centos:latest
script:
- >
CFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
CXXFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
LDFLAGS='-fsanitize=address -lasan'
./autogen.sh
- make
- make -C server check || (cat server/tests/test-suite.log && exit 1)
# Same as meson-makecheck job but use a Debian i386 image,
# this in order to test a 32 bit machine
makecheck-debian32:
before_script:
- apt-get update -y
- >
apt-get install -y
debhelper
gstreamer1.0-libav gstreamer1.0-plugins-base gstreamer1.0-plugins-good
gstreamer1.0-plugins-ugly gstreamer1.0-tools
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
libcacard-dev libglib2.0-dev
libjpeg-dev liblz4-dev libopus-dev libpixman-1-dev libsasl2-dev
libspice-protocol-dev libssl-dev pkg-config
python3-six python3-pyparsing liborc-0.4-dev meson git
g++ autoconf-archive
- *protocol
image: i386/debian:latest
script:
- git clean -fdx
- git submodule foreach --recursive git clean -fdx
- >
CFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
CXXFLAGS='-O2 -pipe -g -fsanitize=address -fno-omit-frame-pointer -Wframe-larger-than=40920'
LDFLAGS='-fsanitize=address -lasan'
meson --buildtype=release --werror build || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build
- (cd build && meson test) || (cat build/meson-logs/testlog.txt && 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
meson
- mkdir spice-protocol/build
- (cd spice-protocol/build && mingw64-meson --werror && ninja install)
- NOCONFIGURE=yes ./autogen.sh
- mingw64-configure
- mingw64-make
- export G_TLS_GNUTLS_PRIORITY="NORMAL:%COMPAT"
- mingw64-make LOG_COMPILE=wine -C server check || (cat server/tests/test-suite.log && exit 1)
websocket-autobahn:
before_script:
- apt-get update -y
- >
apt-get install -y
debhelper
gstreamer1.0-libav gstreamer1.0-plugins-base gstreamer1.0-plugins-good
gstreamer1.0-plugins-ugly gstreamer1.0-tools
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
libcacard-dev libglib2.0-dev
libjpeg-dev liblz4-dev libopus-dev libpixman-1-dev libsasl2-dev
libssl-dev pkg-config
python3-six python3-pyparsing liborc-0.4-dev git
g++ autoconf-archive python-pip
python3 python3-pip python3-setuptools python3-wheel ninja-build
- pip3 install meson
- *protocol
image: ubuntu:bionic
script:
- pip2 install autobahntestsuite
- wstest -a
- git clean -fdx
- git submodule foreach --recursive git clean -fdx
- >
meson --buildtype=release build || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build
- build/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
- build/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