From ce5d1fda68bc395c611b335453f7f22cc895c05e Mon Sep 17 00:00:00 2001 From: Joe Lauer Date: Fri, 3 Nov 2023 18:14:35 -0400 Subject: [PATCH] Improved build scripts using JNE v4.1.1 --- .blaze/blaze.conf | 2 +- .blaze/blaze.java | 26 ++++++++++++++------------ .blaze/pom.xml | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.blaze/blaze.conf b/.blaze/blaze.conf index 2f1f94d..36c3b83 100644 --- a/.blaze/blaze.conf +++ b/.blaze/blaze.conf @@ -1,7 +1,7 @@ blaze.dependencies = [ "com.fizzed:blaze-ssh" "com.fizzed:buildx:1.0.7" - "com.fizzed:jne:4.1.0" + "com.fizzed:jne:4.1.1" ] java.source.version=8 \ No newline at end of file diff --git a/.blaze/blaze.java b/.blaze/blaze.java index 72d2df8..917343e 100644 --- a/.blaze/blaze.java +++ b/.blaze/blaze.java @@ -78,17 +78,13 @@ public void test() throws Exception { .orElse(null); final long start = System.currentTimeMillis(); - final JavaHome jdkHome; - if (jdkVersion != null || jdkArch != null) { - jdkHome = new JavaHomeFinder() - .jdk() - .version(jdkVersion) - .hardwareArchitecture(jdkArch) - .preferredDistributions() - .find(); - } else { - jdkHome = JavaHome.current(); - } + final JavaHome jdkHome = new JavaHomeFinder() + .jdk() + .version(jdkVersion) + .hardwareArchitecture(jdkArch) + .preferredDistributions() + .sorted(jdkVersion != null || jdkArch != null) // sort if any criteria provided + .find(); log.info(""); log.info("Detected {} (in {} ms)", jdkHome, (System.currentTimeMillis()-start)); @@ -258,6 +254,10 @@ public void test() throws Exception { // CI/Test Windows // + new Target("windows", "x32", "Windows 11") + .setTags("test") + .setHost("bmh-build-x64-win11-1"), + new Target("windows", "x64", "Windows 10") .setTags("test") .setHost("bmh-build-x64-win10-1"), @@ -310,7 +310,9 @@ public void cross_tests() throws Exception { new Buildx(crossTargets) .tags("test") .execute((target, project) -> { - project.action("java", "-jar", "blaze.jar", "test").run(); + project.action("java", "-jar", "blaze.jar", "test", "--jdk.arch", target.getArch()) + .verbose() + .run(); }); } diff --git a/.blaze/pom.xml b/.blaze/pom.xml index a8e2960..c999963 100644 --- a/.blaze/pom.xml +++ b/.blaze/pom.xml @@ -73,7 +73,7 @@ com.fizzed jne - 4.1.0 + 4.1.1 \ No newline at end of file