Skip to content

Commit

Permalink
use xvfb-run with --auto-servernum
Browse files Browse the repository at this point in the history
  • Loading branch information
tiainen authored Feb 2, 2024
1 parent 0fa2b97 commit 111ac61
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 111ac61

Please sign in to comment.