diff --git a/Makefile.toml b/Makefile.toml index b34044b..45b2432 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -4,27 +4,23 @@ default_to_workspace = false # Metatasks invoked by CI # Tests -[tasks.test-java-feature.mac] +[tasks.test-feature.mac] env = {"OUT_FILE" = "dylib"} -[tasks.test-java-feature.linux] +[tasks.test-feature.linux] env = {"OUT_FILE" = "so", "LD_LIBRARY_PATH" = "./"} -[tasks.test-java-feature] +[tasks.test-feature] category = "Tests" -script_runner = "@bash" dependencies = ["build-feature"] script = ''' -cargo build --release -p feature-tests -cp target/debug/libfeature_test.{OUTFILE} feature/java/somelib/libsomelib.{OUTFILE} +cp target/debug/libfeature_tests.$OUT_FILE feature/java/somelib/libsomelib.$OUT_FILE cd feature/java/somelib mvn test ''' - [tasks.gen-feature] category = "Code generation" -script_runner = "@bash" script = ''' mkdir feature/tmp cargo run -p diplomat-java -- -e feature/src/lib.rs -l feature/diplomat-java-conf.toml feature/tmp/ @@ -34,6 +30,12 @@ rm -r feature/tmp ''' # Build deps +[tasks.build-feature-release] +description = "Build feature_tests" +category = "Plumbing" +command = "cargo" +args = ["build", "--release", "-p", "feature-tests"] + [tasks.build-feature] description = "Build feature_tests" category = "Plumbing" @@ -46,11 +48,12 @@ category = "Benchmark" script = ''' cargo bench --package diplomat-example ''' -[tasks.bench-java-feature] + +[tasks.bench-feature] description = "Benchmark kotlin example" category = "Benchmark" -dependencies = ["gen-kotlin-example", "test-kotlin-example"] +dependencies = ["gen-feature", "test-feature"] script = ''' -cd example/kotlin/somelib -gradle jmh --warning-mode all +cd feature/java/somelib +mvn jmh --warning-mode all ''' diff --git a/feature/java/somelib/src/main/java/dev/diplomattest/somelib/ntv/somelib_h.java b/feature/java/somelib/src/main/java/dev/diplomattest/somelib/ntv/somelib_h.java index 8543c7b..48d3f60 100644 --- a/feature/java/somelib/src/main/java/dev/diplomattest/somelib/ntv/somelib_h.java +++ b/feature/java/somelib/src/main/java/dev/diplomattest/somelib/ntv/somelib_h.java @@ -14359,13 +14359,13 @@ public static long __DARWIN_C_LEVEL() { } /** * {@snippet lang=c : - * #define __ASSERT_FILE_NAME "jextract$18314337822400972544.h" + * #define __ASSERT_FILE_NAME "jextract$5639583684901567061.h" * } */ public static MemorySegment __ASSERT_FILE_NAME() { class Holder { static final MemorySegment __ASSERT_FILE_NAME - = somelib_h.LIBRARY_ARENA.allocateFrom("jextract$18314337822400972544.h"); + = somelib_h.LIBRARY_ARENA.allocateFrom("jextract$5639583684901567061.h"); } return Holder.__ASSERT_FILE_NAME; }