From bd2a1507c5ad222e11442c45c8afde745c9d4469 Mon Sep 17 00:00:00 2001 From: Daniel Teichmann Date: Tue, 10 Aug 2021 16:22:51 +0200 Subject: .gitlab-ci.yml: Make screenshot of rwa-support-desktopapp running. --- .gitlab-ci.yml | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 560d777..ce4e5e0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ image: darkmattercoder/qt-build:latest stages: - Build - Test -# - Run + - Run RWA:Build: stage: Build @@ -12,7 +12,7 @@ RWA:Build: - pwd # list all files in whole git repo - echo "List all files:" - - find ../ + - find - sudo apt update && sudo apt -y install make autoconf - mkdir build && cd build - qmake ../rwa-support-desktop.pro @@ -22,29 +22,40 @@ RWA:Build: - find ../ artifacts: paths: - - build/tests/tests + - build/tests - build/rwa-support-desktopapp/rwa-support-desktopapp - expire_in: 1 weeks + expire_in: 1 week -# Disabled because running the application would give an error -# since there is no X.Org server, Wayland or other display server available -# RWA:Run: -# stage: Run -# script: -# - echo "All files in git repo + artifact 'rwa-support-desktopapp':" -# - find -# - echo "Executing rwa-support-desktopapp" -# - ./rwa-support-desktopapp -# needs: ["RWA:Build"] +RWA:Run: + stage: Run + script: + # list all files in whole git repo + - echo "List all files:" + - find + - sudo apt update && sudo apt install -y fluxbox xvfb x11-apps imagemagick + - cd build/rwa-support-desktopapp + - Xvfb :99 & + - export DISPLAY=:99 + - ./rwa-support-desktopapp 2>&1 | tee rwa-support-desktopapp.log & + - sleep 30s + - xwd -display :99 -root | convert xwd:- png:./screenshot.png + - kill $(pidof ./rwa-support-desktopapp) + - sleep 1s + - kill $(pidof /usr/bin/Xvfb) + needs: ["RWA:Build"] + artifacts: + paths: + - build/rwa-support-desktopapp/rwa-support-desktopapp.log + - build/rwa-support-desktopapp/screenshot.png + expire_in: 1 week RWA:Test: stage: Test script: - - sudo apt update && sudo apt -y install xvfb - - pwd # list all files in whole git repo - - echo "All files:" + - echo "List all files:" - find + - sudo apt update && sudo apt -y install xvfb - cd build/tests - - xvfb-run ./tests + - xvfb-run make check -j4 needs: ["RWA:Build"] -- cgit v1.2.3