Build uberjar using graalvm

This commit is contained in:
Michiel Borkent 2022-11-11 15:14:02 +01:00
parent ac1b16bfc8
commit a5dec07279
2 changed files with 9 additions and 5 deletions

View file

@ -72,14 +72,16 @@
"java -jar ./target/babashka-$(cat resources/BABASHKA_VERSION)-standalone.jar .circleci/script/docker.clj"}}]))))
(defn jvm
[shorted?]
[shorted? graalvm-home]
(gen-job
shorted?
(ordered-map
:docker [{:image "circleci/clojure:openjdk-11-lein-2.9.8-bullseye"}]
:working_directory "~/repo"
:environment {:LEIN_ROOT "true"
:BABASHKA_PLATFORM "linux"}
:BABASHKA_PLATFORM "linux"
:GRAALVM_VERSION "22.3.0"
:GRAALVM_HOME graalvm-home}
:resource_class "large"
:steps
(gen-steps
@ -89,6 +91,7 @@
{:restore_cache {:keys ["v1-dependencies-{{ checksum \"project.clj\" }}-{{ checksum \"deps.edn\" }}"
"v1-dependencies-"]}}
(run "Install Clojure" "sudo script/install-clojure")
(run "Download GraalVM" "script/install-graalvm")
(run
"Run JVM tests"
"export BABASHKA_FEATURE_JDBC=true
@ -192,7 +195,7 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl
:command
"docker run --privileged --rm tonistiigi/binfmt --install all\ndocker buildx create --name ci-builder --use"}}]}}
:jobs (ordered-map
:jvm (jvm shorted?)
:jvm (jvm shorted? linux-graalvm-home)
:linux (unix shorted? false false "amd64" docker-executor-conf "large" linux-graalvm-home "linux")
:linux-static
(unix shorted? true true "amd64" docker-executor-conf "large" linux-graalvm-home "linux")

View file

@ -157,7 +157,7 @@
:deps/manifest :deps}
lambdaisland/uri {:git/url "https://github.com/lambdaisland/uri"
:git/sha "ac4f1f9c8e4f45a088db1c6383ce2191c973987c"
:deps/manifest :deps}
:deps/manifest :deps}
clj-commons/fs {:mvn/version "1.6.310"}
postmortem/postmortem {:git/url "https://github.com/athos/Postmortem"
:git/sha "1a29775a3d286f9f6fe3f979c78b6e2bf298d5ba"}}
@ -170,7 +170,8 @@
:test
{:extra-paths ["test"]
:extra-deps {io.github.cognitect-labs/test-runner
{:git/tag "v0.5.0" :git/sha "b3fd0d2"}}
{:git/tag "v0.5.0" :git/sha "b3fd0d2"}
nubank/matcher-combinators {:mvn/version "3.6.0"}}
:main-opts ["-m" "cognitect.test-runner"]
:exec-fn cognitect.test-runner.api/test}
:test-pod