File tree Expand file tree Collapse file tree
test/org/lwjgl/opengl/awt Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 - name : Update Package Information
88 run : sudo apt-get update
99 - name : Install Dependencies
10- run : sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri
10+ run : sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri libglx-mesa0 libxrender-dev libx11-dev libxext-dev
1111 - uses : actions/checkout@v6
1212 - name : Set up JDK 21
1313 uses : actions/setup-java@v5
@@ -21,17 +21,29 @@ jobs:
2121 export DISPLAY=":99"
2222 export GALLIUM_DRIVER="llvmpipe"
2323 export LIBGL_ALWAYS_SOFTWARE="1"
24- # Start Xvfb
24+ export LIBGL_DEBUG="verbose"
25+ # Start Xvfb with GLX support
2526 echo "Starting Xvfb"
26- Xvfb :99 -ac -screen 0 "$XVFB_WHD" -nolisten tcp +extension GLX +render -noreset &
27+ Xvfb :99 -ac -screen 0 "$XVFB_WHD" -nolisten tcp +extension GLX +extension RENDER -noreset > /tmp/xvfb.log 2>&1 &
2728 Xvfb_pid="$!"
2829 echo "Waiting for Xvfb (PID: $Xvfb_pid) to be ready..."
29- while ! xdpyinfo -display "${DISPLAY}" > /dev/null 2>&1; do
30- sleep 0.1
30+ sleep 2
31+ for i in {1..30}; do
32+ if xdpyinfo -display "${DISPLAY}" > /dev/null 2>&1; then
33+ echo "Xvfb is running."
34+ break
35+ fi
36+ sleep 0.5
3137 done
32- echo "Xvfb is running."
38+
39+ # Verify GLX works
40+ glxinfo -display :99 2>&1 | head -20 || echo "glxinfo not available, continuing anyway"
3341
3442 ./gradlew --no-daemon test
43+
44+ # Clean up Xvfb
45+ kill $Xvfb_pid 2>/dev/null || true
46+ cat /tmp/xvfb.log || true
3547 - name : Upload Images
3648 uses : actions/upload-artifact@v4
3749 with :
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ dependencies {
5959
6060java {
6161 toolchain {
62- languageVersion = JavaLanguageVersion . of(8 )
62+ languageVersion = JavaLanguageVersion . of(21 )
6363 }
6464 withSourcesJar()
6565 withJavadocJar()
@@ -86,6 +86,7 @@ sourceSets {
8686
8787tasks. withType(JavaCompile ). configureEach {
8888 options. encoding = ' UTF-8'
89+ options. release = 8
8990}
9091
9192tasks. withType(Javadoc ). configureEach {
@@ -95,6 +96,7 @@ tasks.withType(Javadoc).configureEach {
9596tasks. test {
9697 useJUnitPlatform()
9798 workingDir = projectDir
99+ timeout = Duration . ofMinutes(15 )
98100}
99101
100102tasks. jar {
Original file line number Diff line number Diff line change @@ -297,8 +297,11 @@ public void run() {
297297 screenShotSuffix = "_" + screenShotIndex ;
298298 }
299299
300+ File outputDir = new File ("build/test-screenshots" );
301+ outputDir .mkdirs ();
302+
300303 ImageIO .write (background , "png" , new File (
301- new File ( "target" ) ,
304+ outputDir ,
302305 System .getProperty ("os.name" ) + "_" +
303306 testInfo .getTestClass ().map (Class ::getSimpleName ).orElse ("unknown" ) + "_" +
304307 testInfo .getTestMethod ().map (Method ::getName ).orElse ("unknown" ) + screenShotSuffix + ".png" ));
@@ -312,7 +315,7 @@ public void run() {
312315 testInfo .getTestMethod ().map (Method ::getName ).orElse ("unknown" ) + screenShotSuffix + ".png" ));
313316
314317 File resultDestination = new File (
315- new File ( "target" ) ,
318+ outputDir ,
316319 System .getProperty ("os.name" ) + "_" +
317320 testInfo .getTestClass ().map (Class ::getSimpleName ).orElse ("unknown" ) + "_" +
318321 testInfo .getTestMethod ().map (Method ::getName ).orElse ("unknown" ) + screenShotSuffix + "_diff.png" );
You can’t perform that action at this time.
0 commit comments