2929 required : false
3030 default : false
3131 gtk :
32- description : " (Required on Linux only) GTK version to use (one of gtk3, gtk4)"
32+ description : |
33+ (Required on Linux only) GTK version to use (one of gtk3, gtk4)
34+
35+ Controls the SWT_GTK4 environemnt variable.
36+ type : string
37+ required : false
38+ default : " "
39+ gdk_backend :
40+ description : |
41+ (Required on Linux only) GDK_BACKEND to use (one of x11, wayland)
42+
43+ Sets the GDK_BACKEND to x11 or wayland. The compositor has to support
44+ the GDK_BACKEND to be useful. For example, setting GDK_BACKEND to
45+ x11 and compositor to wayland will lead to no available handles
46+ due to no x11 display being available.
47+ type : string
48+ required : false
49+ default : " "
50+ compositor :
51+ description : |
52+ (Required on Linux only) Compositor type to use (one of x11, xwayland, wayland)
53+
54+ x11: Uses a "pure" x11 compositor with no wayland display running, using Xvfb.
55+ This is the most common setup for older linux distros that don't come
56+ with wayland, and for some lightweight distro that only have x11.
57+ xwayland: Runs weston for Wayland display and Xwayland for x11 display
58+ simulatanously. Xwayland provides an x11 display and draws that on
59+ the Wayland compositor.
60+ This is the most common setup for most current linux distros, as of this
61+ writing. Xwayland provides a way for apps that have nor updated to Wayland
62+ to continue to run. There are some signs that Xwayland may be removed
63+ in future distros.
64+ wayland: Uses a "pure" wayland compositor with no x11 display running, using
65+ weston.
66+ This is likely to be the future default setup of most distros.
3367 type : string
3468 required : false
3569 default : " "
5589 sudo apt-get install -qq -y libgtk-3-dev freeglut3-dev webkit2gtk-driver
5690 # GTK4 dependencies
5791 sudo apt-get install -qq -y libgtk-4-dev freeglut3-dev libwebkitgtk-6.0-4
92+ # Wayland runtimes, xwayland-run depends on all the needed packages
93+ sudo apt-get install -qq -y xwayland-run
5894
5995 - name : Disable AppArmor when testing WebKit on GTK4
6096 if : ${{ inputs.native == 'gtk.linux.x86_64' && inputs.gtk == 'gtk4' }}
@@ -84,8 +120,11 @@ jobs:
84120 env :
85121 GTK_XCFLAGS : ' -Wno-deprecated-declarations'
86122 SWT_GTK4 : " ${{ inputs.gtk == 'gtk4' && '1' || '0' }}"
123+ GDK_BACKEND : " ${{ inputs.gdk_backend }}"
87124 run : >-
88- ${{ contains(inputs.native, 'linux') && 'xvfb-run' || '' }}
125+ ${{ inputs.compositor == 'x11' && 'xvfb-run' || '' }}
126+ ${{ inputs.compositor == 'wayland' && 'wlheadless-run --width 1920 --height 1080 -- ' || '' }}
127+ ${{ inputs.compositor == 'xwayland' && 'wlheadless-run --width 1920 --height 1080 -- xwayland-run -geometry 1920x1080 -- ' || '' }}
89128 mvn --batch-mode -V -U -e
90129 --threads 1C
91130 -DforkCount=1
@@ -95,15 +134,20 @@ jobs:
95134 --fail-at-end
96135 -DskipNativeTests=false
97136 -DfailIfNoTests=false
98- ${{ (inputs.runtodotests == false && inputs.gtk == 'gtk4') && '-DexcludedGroups=gtk4-todo' || '' }}
137+ ${{ (inputs.runtodotests == false && inputs.gtk =='gtk4' && inputs.gdk_backend == 'wayland') && '-DexcludedGroups=gtk4-todo,gtk4-wayland-todo' || '' }}
138+ ${{ (inputs.runtodotests == false && inputs.gtk =='gtk4' && inputs.gdk_backend == 'x11') && '-DexcludedGroups=gtk4-todo' || '' }}
139+ ${{ (inputs.runtodotests == false && inputs.gtk =='gtk3' && inputs.gdk_backend == 'wayland') && '-DexcludedGroups=gtk3-wayland-todo' || '' }}
99140 clean install
100141 - name : Performance tests
101142 if : ${{ inputs.performance }}
102143 env :
103144 SWT_GTK4 : " ${{ inputs.gtk == 'gtk4' && '1' || '0' }}"
145+ GDK_BACKEND : " ${{ inputs.gdk_backend }}"
104146 working-directory : tests/org.eclipse.swt.tests
105147 run : >-
106- ${{ contains(inputs.native, 'linux') && 'xvfb-run' || '' }}
148+ ${{ inputs.compositor == 'x11' && 'xvfb-run' || '' }}
149+ ${{ inputs.compositor == 'wayland' && 'wlheadless-run --width 1920 --height 1080 -- ' || '' }}
150+ ${{ inputs.compositor == 'xwayland' && 'wlheadless-run --width 1920 --height 1080 -- xwayland-run -geometry 1920x1080 -- ' || '' }}
107151 mvn --batch-mode -V -U -e
108152 -DforkCount=1
109153 --fail-at-end
@@ -115,7 +159,7 @@ jobs:
115159 if : always()
116160 uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
117161 with :
118- name : test-results-${{ inputs.native }}-${{ inputs.gtk }}-java${{ inputs.java }}
162+ name : test-results-${{ inputs.native }}-${{ inputs.gtk }}-${{ inputs.compositor }}- java${{ inputs.java }}
119163 if-no-files-found : warn
120164 path : |
121165 ${{ github.workspace }}/**/target/surefire-reports/*.xml
0 commit comments