From 111ac61cc20cc514c07a9a27e58da493b57b2342 Mon Sep 17 00:00:00 2001 From: Joeri Sykora Date: Fri, 2 Feb 2024 12:09:03 +0100 Subject: [PATCH] use xvfb-run with --auto-servernum --- .github/workflows/build.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b790a0..beca73c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,12 +30,10 @@ jobs: - name: Test Maven (Linux) if: runner.os == 'Linux' run: | - export DISPLAY=:90 - Xvfb -ac :90 -screen 0 1280x1024x24 > /dev/null 2>&1 & mvn -q versions:set-property -Dproperty=staging.repo.url -DnewVersion=${{ env.staging_url }} -DgenerateBackupPoms=false -f ${{ matrix.type }}/maven/hellofx mvn -q versions:set-property -Dproperty=javafx.version -DnewVersion=${{ env.maven_version }} -DgenerateBackupPoms=false -f ${{ matrix.type }}/maven/hellofx mvn -q clean compile -f ${{ matrix.type }}/maven/hellofx - mvn -q javafx:run -f ${{ matrix.type }}/maven/hellofx + xvfb-run --auto-servernum --server-args="-ac -screen 0 1280x1024x24" mvn -q javafx:run -f ${{ matrix.type }}/maven/hellofx env: staging_url: ${{ steps.staging.outputs.staging_url }} maven_version: ${{ steps.staging.outputs.maven_version }} @@ -62,11 +60,9 @@ jobs: - name: Test Gradle (Linux) if: runner.os == 'Linux' run: | - export DISPLAY=:92 - Xvfb -ac :92 -screen 0 1280x1024x24 > /dev/null 2>&1 & cd ${{ matrix.type }}/gradle/hellofx chmod +x gradlew - ./gradlew run -Pstaging=${{ env.staging_url }} -Pjavafx_version=${{ env.maven_version }} + xvfb-run --auto-servernum --server-args="-ac -screen 0 1280x1024x24" ./gradlew run -Pstaging=${{ env.staging_url }} -Pjavafx_version=${{ env.maven_version }} env: staging_url: ${{ steps.staging.outputs.staging_url }} maven_version: ${{ steps.staging.outputs.maven_version }} @@ -145,11 +141,9 @@ jobs: - name: Test Gradle (Linux) if: runner.os == 'Linux' run: | - export DISPLAY=:94 - Xvfb -ac :94 -screen 0 1280x1024x24 > /dev/null 2>&1 & cd ${{ matrix.type }}/gradle/hellofx chmod +x gradlew - ./gradlew run -Psdk=${{ env.JAVAFX_HOME }} -Pjavafx_version=${{ env.sdk_version }} + xvfb-run --auto-servernum --server-args="-ac -screen 0 1280x1024x24" ./gradlew run -Psdk=${{ env.JAVAFX_HOME }} -Pjavafx_version=${{ env.sdk_version }} env: JAVAFX_HOME: ${{ steps.platform.outputs.javafx }} sdk_version: ${{ steps.sdk.outputs.sdk_version }} @@ -278,9 +272,7 @@ jobs: --add-modules javafx.fxml,javafx.controls,hellofx \ --output ${{ env.RUNTIME }} \ --strip-debug --compress 2 --no-header-files --no-man-pages - export DISPLAY=:96 - Xvfb -ac :96 -screen 0 1280x1024x24 > /dev/null 2>&1 & - ${{ env.JAVA_RUNTIME }} -Dsettings.javafx.version=${{ env.jmod_version }} -m hellofx/org.openjfx.MainApp + xvfb-run --auto-servernum --server-args="-ac -screen 0 1280x1024x24" ${{ env.JAVA_RUNTIME }} -Dsettings.javafx.version=${{ env.jmod_version }} -m hellofx/org.openjfx.MainApp env: RUNTIME: ${{ steps.platform.outputs.runtime }} JAVA_RUNTIME: ${{ steps.platform.outputs.java_runtime }}