Skip to content

Commit

Permalink
move-panama-backend - fix makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrist1 committed Sep 20, 2024
1 parent 96442ea commit e4f492a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
27 changes: 15 additions & 12 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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"
Expand All @@ -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
'''
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e4f492a

Please sign in to comment.