From 40ff934844c8d43c30e33c9530a91e022bd3b20a Mon Sep 17 00:00:00 2001 From: chewiebug Date: Wed, 26 Apr 2023 22:18:58 +0200 Subject: [PATCH 1/4] add pull request workflow --- .github/workflows/pullrequest.yaml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pullrequest.yaml diff --git a/.github/workflows/pullrequest.yaml b/.github/workflows/pullrequest.yaml new file mode 100644 index 00000000..9a8a2250 --- /dev/null +++ b/.github/workflows/pullrequest.yaml @@ -0,0 +1,32 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: pull request build + +on: + pull_request: + branches: [ "develop" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8', '11', '17' ] + name: build with Java ${{ matrix.Java }} + steps: + - uses: actions/checkout@v3 + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.Java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B clean verify javadoc:javadoc From ca82d1623018107784e11c86ed2f4556577cb96e Mon Sep 17 00:00:00 2001 From: chewiebug Date: Sat, 29 Apr 2023 18:33:55 +0200 Subject: [PATCH 2/4] add headless display --- .github/workflows/pullrequest.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pullrequest.yaml b/.github/workflows/pullrequest.yaml index 9a8a2250..a86582bc 100644 --- a/.github/workflows/pullrequest.yaml +++ b/.github/workflows/pullrequest.yaml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8', '11', '17' ] + java: [ '8' ] # , '11', '17' ] name: build with Java ${{ matrix.Java }} steps: - uses: actions/checkout@v3 @@ -28,5 +28,8 @@ jobs: java-version: ${{ matrix.Java }} distribution: 'temurin' cache: maven - - name: Build with Maven - run: mvn -B clean verify javadoc:javadoc + - name: run headless maven build + uses: coactions/setup-xvfb@v1 + with: + run: mvn -B clean verify javadoc:javadoc + options: -screen 0 1280x1024x16 From 807ebb2492425d2b00e82a5c76339e39650d5915 Mon Sep 17 00:00:00 2001 From: chewiebug Date: Sat, 29 Apr 2023 18:57:43 +0200 Subject: [PATCH 3/4] remove locale dependency in test --- .../perf/gcviewer/exp/SummaryDataWriterTest.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/test/java/com/tagtraum/perf/gcviewer/exp/SummaryDataWriterTest.java b/src/test/java/com/tagtraum/perf/gcviewer/exp/SummaryDataWriterTest.java index ec2ecd20..f0a03ea5 100644 --- a/src/test/java/com/tagtraum/perf/gcviewer/exp/SummaryDataWriterTest.java +++ b/src/test/java/com/tagtraum/perf/gcviewer/exp/SummaryDataWriterTest.java @@ -7,6 +7,7 @@ import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; +import java.text.DecimalFormat; import java.text.NumberFormat; import com.tagtraum.perf.gcviewer.exp.impl.SummaryDataWriter; @@ -19,7 +20,6 @@ import com.tagtraum.perf.gcviewer.model.GCModel; import com.tagtraum.perf.gcviewer.model.GcResourceFile; import com.tagtraum.perf.gcviewer.util.MemoryFormat; - import org.hamcrest.Matchers; import org.junit.BeforeClass; import org.junit.Test; @@ -170,11 +170,14 @@ public void testWriteWithZGCPhases() throws IOException { String csv = output.toString(); - assertThat("pausePercentile75th", csv, Matchers.containsString("pausePercentile75th; 0,000934; s")); - assertThat("gcPausePercentile95th", csv, Matchers.containsString("gcPausePercentile95th; 0,000934; s")); + // use locale specific decimalSeparator to check, if the right values are present + char decimalSeparator = new DecimalFormat().getDecimalFormatSymbols().getDecimalSeparator(); + + assertThat("pausePercentile75th", csv, Matchers.containsString("pausePercentile75th; 0" + decimalSeparator + "000934; s")); + assertThat("gcPausePercentile95th", csv, Matchers.containsString("gcPausePercentile95th; 0" + decimalSeparator + "000934; s")); assertThat("pauseCount", csv, Matchers.containsString("pauseCount; 1; -")); assertThat("gcPhaseCount", csv, Matchers.containsString("gcPhaseCount; 3; -")); - assertThat("gcPhaseAverage", csv, Matchers.containsString("gcPhaseAverage; 0,000311; s")); - assertThat("gcPhasePercentile99th", csv, Matchers.containsString("gcPhasePercentile99th; 0,000499; s")); + assertThat("gcPhaseAverage", csv, Matchers.containsString("gcPhaseAverage; 0" + decimalSeparator + "000311; s")); + assertThat("gcPhasePercentile99th", csv, Matchers.containsString("gcPhasePercentile99th; 0" + decimalSeparator + "000499; s")); } } From aa6961ce6774eba1b27663663ff0137379828235 Mon Sep 17 00:00:00 2001 From: chewiebug Date: Sun, 2 Feb 2025 16:19:08 +0100 Subject: [PATCH 4/4] update plugin / java versions --- .github/workflows/pullrequest.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pullrequest.yaml b/.github/workflows/pullrequest.yaml index a86582bc..e880289b 100644 --- a/.github/workflows/pullrequest.yaml +++ b/.github/workflows/pullrequest.yaml @@ -18,12 +18,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8' ] # , '11', '17' ] + java: [ '8' , '11', '17' , '21'] name: build with Java ${{ matrix.Java }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.Java }} distribution: 'temurin'