Skip to content

Commit 27e6bf1

Browse files
committed
chore: add make jvm-bench
1 parent 842d2dd commit 27e6bf1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ RUST_SOURCES := $(WORKSPACE_CARGO_FILES) $(CRATE_MANIFESTS) $(RUST_RS_FILES)
9696

9797
KT_WRAPPER = ./crypto-ffi/bindings/shared/src/commonMain/kotlin
9898
KT_TESTS = ./crypto-ffi/bindings/shared/src/commonTest
99+
KT_BENCHMARKS = ./crypto-ffi/bindings/jvm/src/jmh/
99100
KT_INTEROP = ./interop/src/clients/android-interop/src/main/java
100-
KT_FILES := $(shell find $(KT_WRAPPER) $(KT_TESTS) $(KT_INTEROP) -type f -name '*.kt')
101+
KT_FILES := $(shell find $(KT_WRAPPER) $(KT_TESTS) $(KT_INTEROP) $(KT_BENCHMARKS) -type f -name '*.kt')
101102
KT_GRADLE_FILES = $(shell find . -type f -name '*.kts')
102103

103104
#-------------------------------------------------------------------------------
@@ -446,6 +447,11 @@ $(STAMPS)/jvm-test: $(jvm-test-deps)
446447
./gradlew jvm:test --rerun
447448
$(TOUCH_STAMP)
448449

450+
$(STAMPS)/jvm-bench: $(jvm-test-deps) $(KT_BENCHMARKS)
451+
cd crypto-ffi/bindings && \
452+
./gradlew :jvm:jmh
453+
$(TOUCH_STAMP)
454+
449455
#-------------------------------------------------------------------------------
450456
# KMP (Kotlin Multiplatform) builds
451457
#-------------------------------------------------------------------------------
@@ -728,7 +734,7 @@ swift-check: $(STAMPS)/swift-check ## Lint Swift files via swift-format and swif
728734
# Kotlin
729735

730736
$(STAMPS)/kotlin-fmt: $(KT_FILES) $(KT_GRADLE_FILES)
731-
ktlint --format $(KT_WRAPPER) $(KT_TESTS) $(KT_INTEROP) $(KT_GRADLE_FILES)
737+
ktlint --format $(KT_FILES) $(KT_GRADLE_FILES)
732738
$(TOUCH_STAMP)
733739

734740
.PHONY: kotlin-fmt
@@ -769,11 +775,12 @@ check: rust-check swift-check kotlin-check ts-check ## Run all linters
769775
# Lazy targets
770776
#-------------------------------------------------------------------------------
771777

772-
LAZY_TARGETS := jvm-test kmp-jvm-test ts-test android-test ios-test interop-test
778+
LAZY_TARGETS := jvm-test kmp-jvm-test ts-test android-test ios-test interop-test jvm-bench
773779

774780
ts-test: ## Run TypeScript wrapper tests via wdio and bun. Optionally pass TEST=<test> to filter by test name.
775781
kmp-jvm-test: ## Run Kotlin multi-platform tests on JVM
776782
jvm-test: ## Run Kotlin tests on JVM
783+
jvm-bench: ## Run the JVM benchmarks
777784
android-test: ## Run Kotlin tests on Android
778785
ios-test: ## Run Swift tests on iOS (macOS only)
779786
interop-test: ## Run e2e interop test

0 commit comments

Comments
 (0)