Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .blaze/blaze.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
blaze.dependencies = [
"com.fizzed:blaze-ssh"
"com.fizzed:buildx:1.2.2"
"com.fizzed:blaze-public-project:1.0.0"
]

Expand Down
132 changes: 16 additions & 116 deletions .blaze/blaze.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import java.nio.file.Path;
import java.util.List;
import java.util.ArrayList;
import java.util.stream.Collectors;

import static com.fizzed.blaze.Systems.*;
Expand All @@ -32,52 +33,26 @@ public void build_natives() throws Exception {
mkdir(targetDir).parents().run();
cp(globber(nativeDir, "*")).target(targetDir).recursive().debug().run();

final List<String> arguments = new ArrayList<>();
final String buildScript;
final String autoConfTarget;
if (nativeTarget.getOperatingSystem() == OperatingSystem.MACOS) {
buildScript = "setup/build-native-lib-macos-action.sh";
autoConfTarget = "";
arguments.addAll(asList(nativeTarget.toJneOsAbi(), nativeTarget.toJneArch()));
} else if (nativeTarget.getOperatingSystem() == OperatingSystem.WINDOWS) {
buildScript = "setup/build-native-lib-windows-action.bat";
autoConfTarget = "";
buildScript = "powershell";
arguments.addAll(asList("setup/build-native-lib-windows-action.ps1", nativeTarget.toJneOsAbi(), nativeTarget.toJneArch()));
} else {
buildScript = "setup/build-native-lib-linux-action.sh";
autoConfTarget = nativeTarget.toAutoConfTarget();
arguments.addAll(asList(nativeTarget.toJneOsAbi(), nativeTarget.toJneArch(), nativeTarget.toAutoConfTarget()));
}

exec(buildScript, nativeTarget.toJneOsAbi(), nativeTarget.toJneArch(), autoConfTarget)
exec(buildScript)
.args(arguments.toArray(new Object[]{}))
.workingDir(this.projectDir)
.verbose()
.run();
}

/*@Task(order = 2)
public void test() throws Exception {
final Integer jdkVersion = this.config.value("jdk.version", Integer.class).orNull();
final HardwareArchitecture jdkArch = ofNullable(this.config.value("jdk.arch").orNull())
.map(HardwareArchitecture::resolve)
.orElse(null);

final long start = System.currentTimeMillis();
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));
log.info("");

exec("mvn", "clean", "test")
.workingDir(this.projectDir)
.env("JAVA_HOME", jdkHome.getDirectory().toString())
.verbose()
.run();
}*/

@Task(order = 3)
public void clean() throws Exception {
rm(this.targetDir)
Expand Down Expand Up @@ -130,23 +105,23 @@ public void clean() throws Exception {
//

/*new Target("freebsd", "x64")
.setTags("build", "test")
.setTags("build")
.setHost("bmh-build-x64-freebsd12-1"),

*new Target("freebsd", "arm64")
.setTags("build", "test")
.setTags("build")
.setHost("bmh-build-arm64-freebsd13-1"),*/

//
// OpenBSD (will not easily compile on openbsd)
//

/*new Target("openbsd", "x64")
.setTags("build", "test")
.setTags("build")
.setHost("bmh-build-x64-openbsd72-1"),

new Target("openbsd", "arm64")
.setTags("build", "test")
.setTags("build")
.setHost("bmh-build-arm64-openbsd72-1"),*/


Expand All @@ -155,99 +130,24 @@ public void clean() throws Exception {
//

new Target("macos", "x64", "MacOS 10.13")
.setTags("build", "test")
.setTags("build")
.setHost("bmh-build-x64-macos1013-1"),

new Target("macos", "arm64", "MacOS 12")
.setTags("build", "test")
.setTags("build")
.setHost("bmh-build-arm64-macos12-1"),

//
// Windows
//

new Target("windows", "x64", "Windows 11")
.setTags("build", "test")
.setHost("bmh-build-x64-win11-1"),

new Target("windows", "arm64", "Windows 11")
.setTags("build")
.setHost("bmh-build-x64-win11-1"),

//
// CI/Test Local Machine
//

new Target(localNativeTarget.toJneOsAbi(), localNativeTarget.toJneArch(), "local machine")
.setTags("test"),

//
// CI/Test Linux
//

new Target("linux", "x64", "Ubuntu 18.04, JDK 11")
.setTags("test")
.setContainerImage("fizzed/buildx:x64-ubuntu18-jdk11"),

new Target("linux", "x64", "Ubuntu 22.04, JDK 8")
.setTags("test")
.setContainerImage("fizzed/buildx:x64-ubuntu22-jdk8"),

new Target("linux", "x64", "Ubuntu 22.04, JDK 11")
.setTags("test")
.setContainerImage("fizzed/buildx:x64-ubuntu22-jdk11"),

new Target("linux", "x64", "Ubuntu 22.04, JDK 17")
.setTags("test")
.setContainerImage("fizzed/buildx:x64-ubuntu22-jdk17"),

new Target("linux", "x64", "Ubuntu 22.04, JDK 21")
.setTags("test")
.setContainerImage("fizzed/buildx:x64-ubuntu22-jdk21"),

new Target("linux", "arm64", "Ubuntu 18.04, JDK 11")
.setTags("test")
.setHost("bmh-hv-6")
.setContainerImage("fizzed/buildx:arm64-ubuntu18-jdk11"),

new Target("linux", "armhf", "Ubuntu 18.04, JDK 11")
.setTags("test")
.setHost("bmh-hv-6")
.setContainerImage("fizzed/buildx:armhf-ubuntu18-jdk11"),

new Target("linux", "armel", "Ubuntu 18.04, JDK 11")
.setTags("test")
.setHost("bmh-hv-6")
.setContainerImage("fizzed/buildx:armel-debian11-jdk11"),

new Target("linux", "riscv64", "Debian 11, JDK 21")
.setTags("test")
.setHost("bmh-build-riscv64-debian11-1"),

//
// CI/Test Linux w/ MUSL
//

new Target("linux_musl", "x64", "Alpine 3.11, JDK 11")
.setTags("test")
.setContainerImage("fizzed/buildx:x64-alpine3.11-jdk11"),

new Target("linux_musl", "arm64", "Alpine 3.11, JDK 11")
.setTags("test")
.setHost("bmh-hv-6")
.setContainerImage("fizzed/buildx:arm64-alpine3.11-jdk11"),

//
// CI/Test Windows
//

new Target("windows", "x64", "Windows 10")
.setTags("test")
.setHost("bmh-build-x64-win10-1"),

new Target("windows", "arm64", "Windows 11")
.setTags("test")
.setHost("bmh-build-arm64-win11-1")
.setTags("build")
.setHost("bmh-build-x64-win11-1")
);

@Task(order = 50)
Expand Down
41 changes: 23 additions & 18 deletions .blaze/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,40 @@
<sourceDirectory>${project.basedir}</sourceDirectory>
</build>
<dependencies>
<dependency>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>blaze-ivy</artifactId>
<version>1.5.0</version>
<artifactId>blaze-core</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>2.5.2</version>
<version>1.4.3</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>blaze-core</artifactId>
<version>1.5.0</version>
<artifactId>blaze-ivy</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.7</version>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>org.zeroturnaround</groupId>
Expand All @@ -63,7 +63,12 @@
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>blaze-ssh</artifactId>
<version>1.5.0</version>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>buildx</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
Expand Down
4 changes: 2 additions & 2 deletions buildx-results.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Buildx Results
--------------
Cross platform tests use the Buildx project: https://github.com/fizzed/buildx
Commit: 5a2fb58fa9d6b474d24e785db8421cacdff69ace
Date: 2025-01-20T19:05:35.102487Z[UTC]
Commit: 70a1d330cfa8b02cef66b1355aa1ee963081f868
Date: 2025-01-21T02:01:57.190299Z[UTC]

linux-x64 success
linux-arm64 success
Expand Down
15 changes: 15 additions & 0 deletions native/tkrzw-java/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
2024-05-30 Mikio Hirabayashi <hirarin@gmail.com>

- Release: 0.1.32

- Add serializeInt and serializeFloat.
- Support the floating-point number key comparator.
- Compatibility to the C++ library: Tkrzw 1.0.30

2024-04-25 Mikio Hirabayashi <hirarin@gmail.com>

- Release: 0.1.31

- The Index class is added.
- Compatibility to the C++ library: Tkrzw 1.0.29

2023-03-11 Mikio Hirabayashi <hirarin@gmail.com>

- Release: 0.1.30
Expand Down
17 changes: 9 additions & 8 deletions native/tkrzw-java/DBM.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@

/**
* Polymorphic database manager.
* @note All operations except for open and close are thread-safe; Multiple threads can access
* @note All operations except for "open" and "close" are thread-safe; Multiple threads can access
* the same database concurrently. You can specify a data structure when you call the "open"
* method. Every opened database must be closed explicitly by the "close" method to avoid data
* corruption. Moreover, every unused database object should be destructed by the "destruct"
* method to free resources.
* corruption.
*/
public class DBM {
static {
Expand Down Expand Up @@ -55,7 +54,8 @@ public DBM() {

/**
* Destructs the object and releases resources.
* @note The database is closed implicitly if it has not been closed.
* @note The database is closed implicitly if it has not been closed. As long as you close the
* database explicitly, you don't have to call this method.
*/
public native void destruct();

Expand Down Expand Up @@ -123,9 +123,10 @@ public DBM() {
* to do no operation or "PAGE_UPDATE_WRITE" is to write immediately.
* <li>key_comparator (string): The comparator of record keys: "LexicalKeyComparator" for
* the lexical order, "LexicalCaseKeyComparator" for the lexical order ignoring case,
* "DecimalKeyComparator" for the order of the decimal integer numeric expressions,
* "HexadecimalKeyComparator" for the order of the hexadecimal integer numeric expressions,
* "RealNumberKeyComparator" for the order of the decimal real number expressions.
* "DecimalKeyComparator" for the order of decimal integer numeric expressions,
* "HexadecimalKeyComparator" for the order of hexadecimal integer numeric expressions,
* "RealNumberKeyComparator" for the order of decimal real number expressions, and
* "FloatBigEndianKeyComparator" for the order of binary float-number expressions.
* </ul>
* <p>For SkipDBM, these optional parameters are supported.
* <ul>
Expand Down Expand Up @@ -765,7 +766,7 @@ public Status pushLast(String value, double wtime) {

/**
* Gets the path of the database file.
* @return path The file path of the database, or null on failure.
* @return The file path of the database, or null on failure.
*/
public native String getFilePath();

Expand Down
3 changes: 2 additions & 1 deletion native/tkrzw-java/File.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public File() {

/**
* Destructs the object and releases resources.
* @note The file is closed implicitly if it has not been closed.
* @note The file is closed implicitly if it has not been closed. As long as you close the file
* explicitly, you don't have to call this method.
*/
public native void destruct();

Expand Down
Loading
Loading