Skip to content

Commit

Permalink
adjust scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
huahaiy committed Jan 9, 2023
1 parent 25e5e3a commit 7a00398
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 13 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,12 @@ than just the difference in data durability and running mode:
* Datoms in a transaction are committed together as a batch, rather than being
saved by `with-datom` one at a time.

* ACID transaction and rollback are supported.

* Lazy results set and spill to disk are supported.

* Entity and transaction integer ids are 64 bits long, instead of 32 bits.

* Respects `:db/valueType`. Currently, most [Datomic® value
types](https://docs.datomic.com/on-prem/schema.html#value-types) are
supported, except uri. Values of the attributes that
Expand Down
2 changes: 0 additions & 2 deletions bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ cd bench
./bench.clj
```

If you are on a version of JVM newer than JDK 8, you may get some warnings. Please ignore them.

Some of the benchmarks are commented out for they take a long time to run. You can uncomment the appropriate lines in [default-benchmarks](https://github.com/juji-io/datalevin/blob/master/bench/bench.clj#L112) in `bench.clj` to run them.

You can also comment out the appropriate line to run the same benchmark for DataScript. For more comparisons with other alternatives, you may also consult [this fork](https://github.com/joinr/datalevinbench).
8 changes: 5 additions & 3 deletions native/test-jar/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ fi
export JAVA_HOME=$GRAALVM_HOME
export PATH=$GRAALVM_HOME/bin:$PATH

export USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM=false

export DTLV_LIB_EXTRACT_DIR=/tmp

clojure -X:uberjar :jar target/test-jar.jar


"$GRAALVM_HOME/bin/native-image" \
-H:CLibraryPath=${DTLV_LIB_EXTRACT_DIR} \
-jar target/test-jar.jar \
jar-test
--verbose \
--features=InitAtBuildTimeFeature \
-jar target/test-jar.jar jar-test

./jar-test
6 changes: 3 additions & 3 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@
:source-paths ["src" "test"]
:java-source-paths ["native/src/java"]
:jvm-opts
["-XX:+IgnoreUnrecognizedVMOptions"
"--add-opens=java.base/java.nio=ALL-UNNAMED"
["--add-opens=java.base/java.nio=ALL-UNNAMED"
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
"--add-opens=java.base/java.lang=ALL-UNNAMED"
"--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED"]
Expand All @@ -87,7 +86,8 @@
*unchecked-math* :warn-on-boxed
*warn-on-reflection* true}}}
:jar-exclusions [#"graal" #"datalevin.ni"]
:jvm-opts ["-Dclojure.compiler.direct-linking=true"]
:jvm-opts ["-XX:+IgnoreUnrecognizedVMOptions"
"-Dclojure.compiler.direct-linking=true"]
:uberjar-exclusions [#"pod.huahaiy.datalevin-test"]
:deploy-repositories [["clojars" {:url "https://repo.clojars.org"
:username :env/clojars_username
Expand Down
11 changes: 6 additions & 5 deletions release.clj
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,16 @@
(sh "git" "push" "origin" "master"))

(defn run-tests []
(println "\n\n[ Running tests ]\n")
(sh "./lein-test")
;; TODO this will fail as graalvm dropped support for java 8
;; (println "\n\n[ Running tests ]\n")
;; (sh "script/lein-test")

(println "\n\n[ Testing jar ]\n")
(sh "./jar")
(sh "./jar" :dir "script")
(sh "test-jar/test.sh")

(println "\n\n[ Testing uberjar ]\n")
(sh "./uberjar")
(sh "./uberjar" :dir "script")
(sh "test-jar/test-uber.sh")

(println "\n\n[ Testing native jar ]\n")
Expand Down Expand Up @@ -134,7 +135,7 @@
(update-version)
(make-commit)
(github-release)
(sh "./deploy")
(sh "./deploy" :dir "script")
(sh "script/deploy" :dir "native")
(System/exit 0)
)
Expand Down
2 changes: 2 additions & 0 deletions deploy → script/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ set -eou pipefail
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH

cd ..

lein clean
lein deploy clojars
2 changes: 2 additions & 0 deletions jar → script/jar
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ set -eou pipefail
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH

cd ..

lein clean
lein jar
2 changes: 2 additions & 0 deletions lein-test → script/lein-test
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ set -eou pipefail
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH

cd ..

lein clean
lein test
2 changes: 2 additions & 0 deletions uberjar → script/uberjar
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ set -eou pipefail
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH

cd ..

lein clean
lein uberjar
3 changes: 3 additions & 0 deletions test-jar/test-uber.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -eou pipefail

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH

jvm_version=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1 )

echo $jvm_version
Expand Down
3 changes: 3 additions & 0 deletions test-jar/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -eou pipefail

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH

jvm_version=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1 )

echo "Java version $jvm_version"
Expand Down

0 comments on commit 7a00398

Please sign in to comment.