[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master bd658061 4/5: Launch Xvfb before using Wine i
From: |
Vadim Zeitlin |
Subject: |
[lmi-commits] [lmi] master bd658061 4/5: Launch Xvfb before using Wine in the build and test steps |
Date: |
Sat, 11 Feb 2023 15:04:38 -0500 (EST) |
branch: master
commit bd658061339b222c049b0561117b3ab08533ee16
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Vadim Zeitlin <vadim@tt-solutions.com>
Launch Xvfb before using Wine in the build and test steps
This avoids Wine warnings such as
0044:err:winediag:nodrv_CreateWindow Application tried to create a
window, but no driver could be loaded.
0044:err:winediag:nodrv_CreateWindow L"The explorer process failed to
start."
0044:err:systray:initialize_systray Could not create tray window
due to not being able to open a connection to X display.
---
.github/workflows/ci.yml | 56 ++++++++++++++++++++++++------------------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 43924e84..97630a7e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -284,6 +284,34 @@ jobs:
exit "$err"
fi
+ - name: Launch Xvfb
+ if: matrix.gui_test
+ run: |
+ sudo mkdir /tmp/.X11-unix
+ sudo chmod 1777 /tmp/.X11-unix
+ Xvfb :10 -screen 0 1600x1200x24 &
+ num_tries=1
+ while true; do
+ if xset -d :10 -q >/dev/null 2>&1; then
+ echo 'Xvfb has become available.'
+ # Trying to use it immediately can still result in errors
+ # when creating the windows, somehow, so give it some time
+ # to settle.
+ sleep 3
+ break
+ fi
+
+ if [[ $num_tries -gt 10 ]]; then
+ echo 'Timed out waiting for Xvfb'
+ exit 1
+ fi
+
+ ((num_tries++))
+ echo "Still waiting for Xvfb (attempt #$num_tries)"
+ sleep 3
+ done
+ echo 'DISPLAY=:10' >> "$GITHUB_ENV"
+
- name: Build lmi
run: |
if [ ${{ matrix.autotools }} ]; then
@@ -359,34 +387,6 @@ jobs:
make "$coefficiency" unit_tests
fi
- - name: Launch Xvfb
- if: matrix.gui_test
- run: |
- sudo mkdir /tmp/.X11-unix
- sudo chmod 1777 /tmp/.X11-unix
- Xvfb :10 -screen 0 1600x1200x24 &
- num_tries=1
- while true; do
- if xset -d :10 -q >/dev/null 2>&1; then
- echo 'Xvfb has become available.'
- # Trying to use it immediately can still result in errors
- # when creating the windows, somehow, so give it some time
- # to settle.
- sleep 3
- break
- fi
-
- if [[ $num_tries -gt 10 ]]; then
- echo 'Timed out waiting for Xvfb'
- exit 1
- fi
-
- ((num_tries++))
- echo "Still waiting for Xvfb (attempt #$num_tries)"
- sleep 3
- done
- echo 'DISPLAY=:10' >> "$GITHUB_ENV"
-
- name: Run GUI tests
if: matrix.gui_test
run: |