From d63ce9c405a58ca9aafb00f34f8e713d4c21bab8 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 9 Nov 2021 14:25:34 -0500 Subject: [PATCH 1/7] Updates to enable Java 8, 11, and 17 builds --- org.hl7.fhir.convertors/pom.xml | 2 +- .../java/org/hl7/fhir/r4/test/ResourceRoundTripTests.java | 2 +- .../src/test/java/org/hl7/fhir/utilities/UtilitiesTest.java | 3 ++- org.hl7.fhir.validation/pom.xml | 2 +- pom.xml | 5 +++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index cc8b9d1968..477ba8785a 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -89,7 +89,7 @@ org.projectlombok lombok - 1.18.16 + ${lombok_version} provided diff --git a/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/ResourceRoundTripTests.java b/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/ResourceRoundTripTests.java index d595577a11..fb69e35978 100644 --- a/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/ResourceRoundTripTests.java +++ b/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/ResourceRoundTripTests.java @@ -21,7 +21,7 @@ public class ResourceRoundTripTests { @BeforeAll - public void setUp() throws Exception { + public static void setUp() throws Exception { } @Test diff --git a/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/UtilitiesTest.java b/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/UtilitiesTest.java index f31a349b46..82ca542bb5 100644 --- a/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/UtilitiesTest.java +++ b/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/UtilitiesTest.java @@ -7,6 +7,7 @@ import java.io.File; import java.io.IOException; +import java.nio.file.Paths; import java.util.Random; import static org.junit.jupiter.api.Assertions.*; @@ -29,7 +30,7 @@ class UtilitiesTest { public static final String WIN_JAVA_HOME = System.getenv("JAVA_HOME") + "\\"; public static final String OSX_USER_DIR = System.getProperty("user.home") + "/"; - public static final String OSX_JAVA_HOME = System.getenv("JAVA_HOME"); + public static final String OSX_JAVA_HOME = Paths.get(System.getenv("JAVA_HOME")).normalize().toString() + "/"; @Test @DisplayName("Test Utilities.path maps temp directory correctly") diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 466920e756..c9fb62083d 100644 --- a/org.hl7.fhir.validation/pom.xml +++ b/org.hl7.fhir.validation/pom.xml @@ -155,7 +155,7 @@ org.projectlombok lombok - 1.18.16 + ${lombok_version} provided diff --git a/pom.xml b/pom.xml index c73a88b4e2..bdf8f27d37 100644 --- a/pom.xml +++ b/pom.xml @@ -22,9 +22,10 @@ 1.1.72 5.7.1 1.7.1 - 3.0.0-M4 + 3.0.0-M5 0.8.5 1.5.1 + 1.18.22 HL7 Core Artifacts @@ -206,7 +207,7 @@ false - ${argLine} -Xmx4096m + ${argLine} -Xmx4096m -XX:+UseConcMarkSweepGC false org/hl7/fhir/validation/cli/** From a0515345e8ecefa45d29859e380fce1d168e3aeb Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 9 Nov 2021 19:44:33 -0500 Subject: [PATCH 2/7] Set surefire args according to profile + update jacoco verison --- pom.xml | 76 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index bdf8f27d37..3f45cdc0aa 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 5.7.1 1.7.1 3.0.0-M5 - 0.8.5 + 0.8.7 1.5.1 1.18.22 @@ -196,24 +196,6 @@ - - maven-surefire-plugin - ${maven_surefire_version} - - 1 - true - classes - false - false - - ${argLine} -Xmx4096m -XX:+UseConcMarkSweepGC - false - - org/hl7/fhir/validation/cli/** - - - org.basepom.maven duplicate-finder-maven-plugin @@ -369,6 +351,62 @@ + + surefire-java8 + + (,1.8] + + + + + maven-surefire-plugin + ${maven_surefire_version} + + 1 + true + classes + false + false + + ${argLine} -Xmx4096m -XX:+UseConcMarkSweepGC + false + + org/hl7/fhir/validation/cli/** + + + + + + + + surefire-java-9-plus + + [9,) + + + + + maven-surefire-plugin + ${maven_surefire_version} + + 1 + true + classes + false + false + + ${argLine} -Xmx4096m + false + + org/hl7/fhir/validation/cli/** + + + + + + github-repo From a3e0f4539aabab7b964c44b7c983ba713ae0b3f2 Mon Sep 17 00:00:00 2001 From: dotasek Date: Wed, 10 Nov 2021 09:14:10 -0500 Subject: [PATCH 3/7] Add comments for surefire profile args. --- pom.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 3f45cdc0aa..4c604a2e5e 100644 --- a/pom.xml +++ b/pom.xml @@ -352,7 +352,7 @@ - surefire-java8 + surefire-java-8 (,1.8] @@ -368,7 +368,10 @@ false false + Surefire testing run. This may appear as an error in some IDEs, but it will run regardless. + --> + ${argLine} -Xmx4096m -XX:+UseConcMarkSweepGC false @@ -396,7 +399,8 @@ false false + Surefire testing run. This may appear as an error in some IDEs, but it will run regardless. + --> ${argLine} -Xmx4096m false From 89171a881e91f3f9cde55feb49f123295ad607c5 Mon Sep 17 00:00:00 2001 From: dotasek Date: Wed, 10 Nov 2021 10:42:48 -0500 Subject: [PATCH 4/7] Temporarily skip failing test --- .../java/org/hl7/fhir/validation/tests/ValidationTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java index 0d2ccf2c89..f35c62e9b0 100644 --- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java +++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java @@ -101,6 +101,8 @@ public static Iterable data() throws IOException { List objects = new ArrayList(examples.size()); for (String id : names) { + //DIRTY_DO Remove this before merge to master + if (!id.equals("uk-msg")) objects.add(new Object[]{id, examples.get(id)}); } return objects; From baf5646d0afb29bb5fa61073ab17af0488c407d2 Mon Sep 17 00:00:00 2001 From: dotasek Date: Wed, 10 Nov 2021 16:54:28 -0500 Subject: [PATCH 5/7] Object based parameters ***NO_CI*** --- pull-request-pipeline-parameterized.yml | 10 +++++----- test-java-8-11-17-pipeline.yml | 9 +++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pull-request-pipeline-parameterized.yml b/pull-request-pipeline-parameterized.yml index 02e6161d57..672d25181e 100644 --- a/pull-request-pipeline-parameterized.yml +++ b/pull-request-pipeline-parameterized.yml @@ -1,15 +1,15 @@ jobs: - - ${{ each imageName in parameters.imageName }}: - - ${{ each jdkVersion in parameters.jdkVersion }}: + - ${{ each image in parameters.images }}: + - ${{ each jdkVersion in image.jdkVersions }}: - job: - displayName: ${{imageName}}_${{jdkVersion}} + displayName: ${{image.name}}_${{jdkVersion}} pool: - vmImage: ${{imageName}} + vmImage: ${{image.name}} variables: - currentImage: ${{imageName}} + currentImage: ${{image.name}} codecov: $(CODECOV_TOKEN) VERSION: diff --git a/test-java-8-11-17-pipeline.yml b/test-java-8-11-17-pipeline.yml index 3d791362fa..e5834c80ec 100644 --- a/test-java-8-11-17-pipeline.yml +++ b/test-java-8-11-17-pipeline.yml @@ -7,5 +7,10 @@ pr: jobs: - template: pull-request-pipeline-parameterized.yml parameters: - imageName: [ 'ubuntu-latest', 'macos-latest', 'windows-2019' ] - jdkVersion: [ '1.8', '1.11', '1.17'] \ No newline at end of file + images: + - name: ubuntu-latest + jdkVersions: [ '1.8', '1.11' ] + - name: macos-latest + jdkVersions: [ '1.8', '1.11', '1.17'] + - name: windows-2019 + jdkVersions: [ '1.8', '1.11', '1.17'] \ No newline at end of file From 6adeb51eba6a47a2e230a5207d66517c1aabd219 Mon Sep 17 00:00:00 2001 From: dotasek Date: Fri, 12 Nov 2021 12:09:48 -0500 Subject: [PATCH 6/7] Cleanup skipped test, move new pipeline codo --- .../npm/FilesystemPackageCacheManager.java | 2 +- .../validation/tests/ValidationTests.java | 2 - pull-request-pipeline.yml | 66 +++---------------- test-java-8-11-17-pipeline.yml | 16 ----- 4 files changed, 11 insertions(+), 75 deletions(-) delete mode 100644 test-java-8-11-17-pipeline.yml diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/FilesystemPackageCacheManager.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/FilesystemPackageCacheManager.java index c282ceea71..5cec904495 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/FilesystemPackageCacheManager.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/FilesystemPackageCacheManager.java @@ -653,7 +653,7 @@ private void loadFromBuildServer() throws IOException { http.trustAllhosts(); HTTPResult res = http.get("https://build.fhir.org/ig/qas.json?nocache=" + System.currentTimeMillis()); res.checkThrowException(); - TextFile.bytesToFile(res.getContent(), "c:\\temp\\qa.json"); + //TextFile.bytesToFile(res.getContent(), "c:\\temp\\qa.json"); buildInfo = (JsonArray) new com.google.gson.JsonParser().parse(TextFile.bytesToString(res.getContent())); List builds = new ArrayList<>(); diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java index f35c62e9b0..0d2ccf2c89 100644 --- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java +++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTests.java @@ -101,8 +101,6 @@ public static Iterable data() throws IOException { List objects = new ArrayList(examples.size()); for (String id : names) { - //DIRTY_DO Remove this before merge to master - if (!id.equals("uk-msg")) objects.add(new Object[]{id, examples.get(id)}); } return objects; diff --git a/pull-request-pipeline.yml b/pull-request-pipeline.yml index aac93bec9c..508451c92c 100644 --- a/pull-request-pipeline.yml +++ b/pull-request-pipeline.yml @@ -5,59 +5,13 @@ pr: - release # Different users have different machine setups, we run the build three times, on ubuntu, osx, and windows -strategy: - matrix: - linux: - imageName: 'ubuntu-latest' - mac: - imageName: "macos-latest" - windows: - imageName: "windows-2019" - maxParallel: 3 - -pool: - vmImage: $(imageName) - -variables: - currentImage: $(imageName) - codecov: $(CODECOV_TOKEN) - VERSION: - -steps: - # Runs 'mvn clean package' - - task: Maven@3 - inputs: - mavenPomFile: 'pom.xml' - mavenOptions: '-Xmx3072m' - javaHomeOption: 'JDKVersion' - jdkVersionOption: '1.11' - jdkArchitectureOption: 'x64' - publishJUnitResults: true - testResultsFiles: '**/surefire-reports/TEST-*.xml' - goals: 'package' - - - task: Maven@3 - inputs: - mavenPomFile: 'pom.xml' - mavenOptions: '-Xmx3072m' - javaHomeOption: 'JDKVersion' - jdkVersionOption: '1.11' - jdkArchitectureOption: 'x64' - options: '-pl org.hl7.fhir.validation.cli' - publishJUnitResults: false - testResultsFiles: '**/surefire-reports/TEST-*.xml' - goals: 'exec:exec' - - # Upload test results to codecov - - script: bash <(curl https://codecov.io/bash) -t $(codecov) - displayName: 'codecov Bash Uploader' - condition: eq(variables.currentImage, 'ubuntu-latest') - - # Publishes the test results to build artifacts. - - task: PublishCodeCoverageResults@1 - displayName: 'Publish JaCoCo test results' - condition: eq(variables.currentImage, 'ubuntu-latest') - inputs: - codeCoverageTool: 'JaCoCo' - summaryFileLocation: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/jacoco.xml' - reportDirectory: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/' \ No newline at end of file +jobs: + - template: pull-request-pipeline-parameterized.yml + parameters: + images: + - name: ubuntu-latest + jdkVersions: [ '1.8', '1.11' ] + - name: macos-latest + jdkVersions: [ '1.8', '1.11', '1.17'] + - name: windows-2019 + jdkVersions: [ '1.8', '1.11', '1.17'] \ No newline at end of file diff --git a/test-java-8-11-17-pipeline.yml b/test-java-8-11-17-pipeline.yml deleted file mode 100644 index e5834c80ec..0000000000 --- a/test-java-8-11-17-pipeline.yml +++ /dev/null @@ -1,16 +0,0 @@ -trigger: none - -pr: -- master -- release - -jobs: -- template: pull-request-pipeline-parameterized.yml - parameters: - images: - - name: ubuntu-latest - jdkVersions: [ '1.8', '1.11' ] - - name: macos-latest - jdkVersions: [ '1.8', '1.11', '1.17'] - - name: windows-2019 - jdkVersions: [ '1.8', '1.11', '1.17'] \ No newline at end of file From 54df614a188a2ee31ed01f7428b3da93c5120033 Mon Sep 17 00:00:00 2001 From: dotasek Date: Fri, 12 Nov 2021 14:11:59 -0500 Subject: [PATCH 7/7] Update validator_test_case_version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6534b786a6..83eb30d858 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 5.1.0 - 1.1.73 + 1.1.74-SNAPSHOT 5.7.1 1.7.1 3.0.0-M5