mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 06:32:44 +00:00
Latest Fedora release does not include awk command by default. Install it manually as required by some script. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
236 lines
8.5 KiB
YAML
236 lines
8.5 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
|
|
gcc-c++ autoconf-archive gawk
|
|
-y
|
|
- &protocol >
|
|
git clone --depth=1 ${CI_REPOSITORY_URL/spice.git/spice-protocol.git} &&
|
|
meson setup --buildtype=release spice-protocol build-spice-protocol --prefix=/usr --werror &&
|
|
ninja -C build-spice-protocol install &&
|
|
rm -rf build-spice-protocol
|
|
|
|
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 --enable-werror
|
|
- make
|
|
- make -C server check || (cat server/tests/test-suite.log && exit 1)
|
|
# check if there are not ignored files
|
|
- >
|
|
test $(git clean -n | wc -l) = 0 ||
|
|
(echo 'Found some not ignored files:' >&2; git clean -n; 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 setup --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 --enable-werror
|
|
- 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 setup --buildtype=release --werror -Dstatistics=true -Dsasl=false -Dlz4=false -Dtests=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:
|
|
- git clean -fdx
|
|
- git submodule foreach --recursive git clean -fdx
|
|
- ./autogen.sh --enable-manual --enable-werror
|
|
- make distcheck
|
|
- bz2=$( echo spice-*.bz2 )
|
|
- dir=${bz2%.tar.bz2}
|
|
- rm -rf "$dir"
|
|
- tar jxvf "$bz2"
|
|
- cd "$dir"
|
|
- meson setup --buildtype=release build
|
|
- ninja -C build
|
|
|
|
# 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 crb
|
|
- >
|
|
dnf install git libasan orc-devel glib-networking
|
|
gcc glib2-devel diffutils
|
|
opus-devel pixman-devel openssl-devel libjpeg-devel
|
|
cyrus-sasl-devel lz4-devel
|
|
gstreamer1-devel gstreamer1-plugins-base-devel
|
|
git-core python3-pyparsing python3-six python3
|
|
meson gcc-c++
|
|
-y
|
|
- *protocol
|
|
image: quay.io/centos/centos:stream9
|
|
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'
|
|
meson setup --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 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:
|
|
name: i386/debian:latest
|
|
docker:
|
|
platform: linux/386
|
|
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 setup --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:
|
|
# Set to fedora 40 for now because mingw64-openssl-3.2.2-2 breaks TLS
|
|
image: fedora:40
|
|
script:
|
|
- >
|
|
dnf install -y
|
|
wine 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
|
|
- mkdir spice-protocol/build
|
|
- (cd spice-protocol/build && mingw64-meson --werror && ninja install)
|
|
- >
|
|
mingw64-meson --buildtype=release -Dlz4=false -Dsasl=false
|
|
--cross-file build-aux/meson-win-wrapper.txt build
|
|
- ninja -C build
|
|
- export G_TLS_GNUTLS_PRIORITY="NORMAL:%COMPAT"
|
|
- export WINEPATH='Z:\usr\x86_64-w64-mingw32\sys-root\mingw\bin'
|
|
- export LANG=en_US.UTF-8
|
|
# Remove configuration otherwise OpenSSL initialization will fail
|
|
- rm -f /usr/x86_64-w64-mingw32/sys-root/mingw/etc/pki/tls/openssl.cnf
|
|
- (cd build && exec meson test --suite spice -t 5) || (cat build/meson-logs/testlog.txt && 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 'wsaccel==0.6.3'
|
|
- pip2 install 'Automat==22.10.0'
|
|
- pip2 install autobahntestsuite
|
|
- wstest -a
|
|
- git clean -fdx
|
|
- git submodule foreach --recursive git clean -fdx
|
|
- >
|
|
meson setup --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
|