From 1d0f66a3c6c6cf77ab49c834ba0d05f5232f637d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 8 Sep 2022 19:03:22 +0200 Subject: [PATCH] gitlab: Run tests on Debian after the daily commit round. --- .gitlab-ci.yml | 2 ++ tools/gitlab/build-linux | 12 ++++++-- tools/gitlab/build.yml | 26 ++++++++++------- tools/gitlab/image.docker | 6 +++- tools/gitlab/test.yml | 60 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 92 insertions(+), 14 deletions(-) create mode 100644 tools/gitlab/test.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67830facbc6..4f5ed6b68df 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,9 +3,11 @@ stages: - image - build + - test - deploy include: - local: "/tools/gitlab/image.yml" - local: "/tools/gitlab/build.yml" + - local: "/tools/gitlab/test.yml" - local: "/tools/gitlab/release.yml" diff --git a/tools/gitlab/build-linux b/tools/gitlab/build-linux index 351e100b4f8..6170a66e792 100755 --- a/tools/gitlab/build-linux +++ b/tools/gitlab/build-linux @@ -10,13 +10,19 @@ set -Eeuxo pipefail autoreconf cd build64 -../configure -C --enable-win64 --enable-werror --with-mingw +../configure -q -C --enable-win64 --enable-werror --with-mingw make -s -j$(nproc) cd .. cd build32 -../configure -C --enable-werror --with-mingw +../configure -q -C --enable-werror --with-mingw make -s -j$(nproc) cd .. -git reset --hard +if test -s .git/rebase-merge/git-rebase-todo +then + git reset --hard +else + make -s -j$(nproc) -C build32 install-lib install-test DESTDIR=$BASEDIR + make -s -j$(nproc) -C build64 install-lib install-test DESTDIR=$BASEDIR +fi diff --git a/tools/gitlab/build.yml b/tools/gitlab/build.yml index 08e63db0ecd..9b7edcbb912 100644 --- a/tools/gitlab/build.yml +++ b/tools/gitlab/build.yml @@ -20,6 +20,7 @@ - export CCACHE_COMPILERCHECK=content - export PATH="/usr/lib/ccache:$PATH" - mkdir -p build32 build64 + - rm -fr .git/rebase-merge # in case a previous CI run failed in git rebase build-linux: extends: .wine-build @@ -31,7 +32,6 @@ build-linux: - build64/config.log - build32/config.log script: - - rm -fr .git/rebase-merge # in case a previous CI run failed in git rebase - git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./tools/gitlab/build-linux build-mac: @@ -46,26 +46,32 @@ build-mac: - build64/config.log - build32/config.log script: - - rm -fr .git/rebase-merge - export PATH="/usr/local/opt/ccache/libexec:$PATH" - git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./tools/gitlab/build-mac -build-winetest: +build-daily-linux: extends: .wine-build rules: - if: $CI_PIPELINE_SOURCE == 'trigger' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + artifacts: + expire_in: 1 day + paths: + - usr/local/ + script: + - ./tools/gitlab/build-linux + +build-winetest: + stage: build + image: $CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX/debian:bullseye + rules: + - if: $CI_PIPELINE_SOURCE == 'trigger' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + needs: + - job: build-daily-linux artifacts: name: winetest paths: - winetest.exe - winetest64.exe script: - - cd build64 - - ../configure -q -C --enable-win64 --with-mingw - - make -s -j$(nproc) install-test DESTDIR=$BASEDIR - - cd ../build32 - - ../configure -q -C --with-mingw - - make -s -j$(nproc) install-test DESTDIR=$BASEDIR - - cd .. - mv usr/local/lib/wine/i386-windows/winetest.exe winetest.exe - mv usr/local/lib/wine/x86_64-windows/winetest.exe winetest64.exe diff --git a/tools/gitlab/image.docker b/tools/gitlab/image.docker index c30e8f0de26..0d23a75483b 100644 --- a/tools/gitlab/image.docker +++ b/tools/gitlab/image.docker @@ -51,7 +51,11 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ samba-dev:amd64 \ unixodbc-dev:amd64 unixodbc-dev:i386 \ x11proto-dev && \ - apt-get install -y ccache && \ + apt-get install -y ccache netbase curl ca-certificates xserver-xorg-video-dummy xserver-xorg xfonts-base xinit fvwm \ + winbind fonts-liberation2 fonts-noto-core fonts-noto-cjk pulseaudio libasound2-plugins:amd64 libasound2-plugins:i386 \ + libmjpegutils-2.1-0:amd64 libmjpegutils-2.1-0:i386 gstreamer1.0-libav:amd64 gstreamer1.0-libav:i386 \ + gstreamer1.0-plugins-base:amd64 gstreamer1.0-plugins-good:amd64 gstreamer1.0-plugins-bad:amd64 gstreamer1.0-plugins-ugly:amd64 \ + gstreamer1.0-plugins-base:i386 gstreamer1.0-plugins-good:i386 gstreamer1.0-plugins-bad:i386 gstreamer1.0-plugins-ugly:i386 && \ apt-get clean && \ useradd -m gitlab diff --git a/tools/gitlab/test.yml b/tools/gitlab/test.yml new file mode 100644 index 00000000000..c64ddb449d3 --- /dev/null +++ b/tools/gitlab/test.yml @@ -0,0 +1,60 @@ +# CI script for testing Wine + +.wine-test: + stage: test + image: $CI_REGISTRY/wine/wine:debian-bullseye + interruptible: true + variables: + GECKO_VER: 2.47.3 + MONO_VER: 7.3.0 + cache: + - key: wine-gecko-$GECKO_VER + paths: + - wine-gecko-$GECKO_VER-x86.msi + - wine-gecko-$GECKO_VER-x86_64.msi + - key: wine-mono-$MONO_VER + paths: + - wine-mono-$MONO_VER-x86.msi + before_script: + - export BASEDIR=$PWD + - export PATH=$BASEDIR/usr/local/bin:$PATH + - export DISPLAY=:0 + - export LC_ALL=C.UTF-8 + - export WINEDEBUG=err-all,fixme-all + - | + cat >$HOME/xorg.conf << EOF + Section "Device" + Identifier "dummy" + Driver "dummy" + VideoRam 32768 + EndSection + EOF + - echo 'exec /usr/bin/fvwm -f config -c "Style * MwmDecor" 2>/dev/null' >$HOME/.xinitrc + - startx -- -config $HOME/xorg.conf $DISPLAY & + - test -f wine-gecko-$GECKO_VER-x86.msi || curl -o wine-gecko-$GECKO_VER-x86.msi https://dl.winehq.org/wine/wine-gecko/$GECKO_VER/wine-gecko-$GECKO_VER-x86.msi + - test -f wine-gecko-$GECKO_VER-x86_64.msi || curl -o wine-gecko-$GECKO_VER-x86_64.msi https://dl.winehq.org/wine/wine-gecko/$GECKO_VER/wine-gecko-$GECKO_VER-x86_64.msi + - test -f wine-mono-$MONO_VER-x86.msi || curl -o wine-mono-$MONO_VER-x86.msi https://dl.winehq.org/wine/wine-mono/$MONO_VER/wine-mono-$MONO_VER-x86.msi + - mkdir -p $HOME/Documents $HOME/Desktop usr/local/share/wine/gecko usr/local/share/wine/mono + - ln -sf $BASEDIR/wine-gecko-$GECKO_VER-x86.msi $BASEDIR/wine-gecko-$GECKO_VER-x86_64.msi usr/local/share/wine/gecko + - ln -sf $BASEDIR/wine-mono-$MONO_VER-x86.msi usr/local/share/wine/mono + - pulseaudio --start --exit-idle-time=-1 + - wine wineboot.exe -u + - wineserver -w + +debian-32: + extends: .wine-test + rules: + - if: $CI_PIPELINE_SOURCE == 'trigger' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + needs: + - job: build-daily-linux + script: + - wine usr/local/lib/wine/i386-windows/winetest.exe -q -t gitlab-$CI_JOB_NAME -m $CI_JOB_URL + +debian-64: + extends: .wine-test + rules: + - if: $CI_PIPELINE_SOURCE == 'trigger' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + needs: + - job: build-daily-linux + script: + - wine usr/local/lib/wine/x86_64-windows/winetest.exe -q -t gitlab-$CI_JOB_NAME -m $CI_JOB_URL