Skip to content

Commit

Permalink
Improved build scripts using JNE v4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jjlauer committed Nov 3, 2023
1 parent 702384d commit ce5d1fd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .blaze/blaze.conf
Original file line number Diff line number Diff line change
@@ -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
26 changes: 14 additions & 12 deletions .blaze/blaze.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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();
});
}

Expand Down
2 changes: 1 addition & 1 deletion .blaze/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>jne</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
</dependency>
</dependencies>
</project>

0 comments on commit ce5d1fd

Please sign in to comment.