diff --git a/.circleci/script/short_ci.clj b/.circleci/script/short_ci.clj index 19e8a85b..ab796033 100644 --- a/.circleci/script/short_ci.clj +++ b/.circleci/script/short_ci.clj @@ -114,7 +114,7 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl (defn unix [shorted? static? musl? arch executor-conf resource-class graalvm-home platform] (let [env {:LEIN_ROOT "true" - :GRAALVM_VERSION "22.1.0" + :GRAALVM_VERSION "22.2.0" :GRAALVM_HOME graalvm-home :BABASHKA_PLATFORM (if (= "mac" platform) "macos" @@ -168,7 +168,7 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl {:persist_to_workspace {:root "/tmp" :paths ["release"]}} {:save_cache - {:paths ["~/.m2" "~/graalvm-ce-java11-22.1.0"] + {:paths ["~/.m2" "~/graalvm-ce-java11-22.2.0"] :key cache-key}} {:store_artifacts {:path "/tmp/release" :destination "release"}} @@ -180,8 +180,8 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl (let [docker-executor-conf {:docker [{:image "circleci/clojure:openjdk-11-lein-2.9.8-bullseye"}]} machine-executor-conf {:machine {:image "ubuntu-2004:202111-01"}} mac-executor-conf {:macos {:xcode "12.0.0"}} - linux-graalvm-home "/home/circleci/graalvm-ce-java11-22.1.0" - mac-graalvm-home "/Users/distiller/graalvm-ce-java11-22.1.0/Contents/Home"] + linux-graalvm-home "/home/circleci/graalvm-ce-java11-22.2.0" + mac-graalvm-home "/Users/distiller/graalvm-ce-java11-22.2.0/Contents/Home"] (ordered-map :version 2.1 :commands diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64c6479e..d1bb7dc5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,7 +102,7 @@ jobs: runs-on: ${{ matrix.os }} env: LEIN_ROOT: "true" - GRAALVM_VERSION: "22.1.0" + GRAALVM_VERSION: "22.2.0" BABASHKA_PLATFORM: ${{ matrix.name }} # used in release script BABASHKA_TEST_ENV: native BABASHKA_XMX: "-J-Xmx6500m" @@ -126,7 +126,7 @@ jobs: if: "matrix.static == false" uses: graalvm/setup-graalvm@v1 with: - version: '22.1.0' + version: '22.2.0' java-version: '11' components: 'native-image' github-token: ${{ secrets.GITHUB_TOKEN }} @@ -135,7 +135,7 @@ jobs: if: "matrix.static == true" uses: graalvm/setup-graalvm@v1 with: - version: '22.1.0' + version: '22.2.0' java-version: '11' components: 'native-image' native-image-musl: true diff --git a/Dockerfile b/Dockerfile index 30f7dae8..13ee10fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN apt update RUN apt install --no-install-recommends -yy build-essential zlib1g-dev WORKDIR "/opt" -ENV GRAALVM_VERSION="22.1.0" +ENV GRAALVM_VERSION="22.2.0" ARG TARGETARCH ENV BABASHKA_ARCH=${TARGETARCH} ENV GRAALVM_ARCH=${TARGETARCH} diff --git a/appveyor.yml b/appveyor.yml index 2228c399..7ad68110 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,8 +7,8 @@ image: Visual Studio 2017 clone_folder: C:\projects\babashka environment: - GRAALVM_HOME: C:\projects\babashka\graalvm\graalvm-ce-java11-22.1.0 - JAVA_HOME: C:\projects\babashka\graalvm\graalvm-ce-java11-22.1.0 + GRAALVM_HOME: C:\projects\babashka\graalvm\graalvm-ce-java11-22.2.0 + JAVA_HOME: C:\projects\babashka\graalvm\graalvm-ce-java11-22.2.0 BABASHKA_XMX: "-J-Xmx5g" skip_commits: @@ -38,7 +38,7 @@ clone_script: build_script: - cmd: >- - powershell -Command "if (Test-Path('graalvm')) { return } else { (New-Object Net.WebClient).DownloadFile('https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.1.0/graalvm-ce-java11-windows-amd64-22.1.0.zip', 'graalvm.zip') }" + powershell -Command "if (Test-Path('graalvm')) { return } else { (New-Object Net.WebClient).DownloadFile('https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.2.0/graalvm-ce-java11-windows-amd64-22.2.0.zip', 'graalvm.zip') }" powershell -Command "if (Test-Path('graalvm')) { return } else { Expand-Archive graalvm.zip graalvm }" diff --git a/doc/build.md b/doc/build.md index ad1ebb44..2b5fa2e1 100644 --- a/doc/build.md +++ b/doc/build.md @@ -3,24 +3,24 @@ ## Prerequisites - Install [lein](https://leiningen.org/) for producing uberjars -- Download [GraalVM](https://www.graalvm.org/downloads/). Currently we use *java11-22.1.0*. +- Download [GraalVM](https://www.graalvm.org/downloads/). Currently we use *java11-22.2.0*. - For Windows, installing Visual Studio 2019 with the "Desktop development with C++" workload is recommended. - Set `$GRAALVM_HOME` to the GraalVM distribution directory. On macOS this can look like: ``` shell - export GRAALVM_HOME=~/Downloads/graalvm-ce-java11-22.1.0/Contents/Home + export GRAALVM_HOME=~/Downloads/graalvm-ce-java11-22.2.0/Contents/Home ``` On linux: ``` shell - export GRAALVM_HOME=~/Downloads/graalvm-ce-java11-22.1.0 + export GRAALVM_HOME=~/Downloads/graalvm-ce-java11-22.2.0 ``` On Windows, from the [Visual Studio 2019 x64 Native Tools Command Prompt](https://github.com/oracle/graal/issues/2116#issuecomment-590470806) or `cmd.exe` (not Powershell): ``` - set GRAALVM_HOME=%USERPROFILE%\Downloads\graalvm-ce-java11-22.1.0 + set GRAALVM_HOME=%USERPROFILE%\Downloads\graalvm-ce-java11-22.2.0 ``` If you are not running from the x64 Native Tools Command Prompt, you will need to set additional environment variables using: ``` diff --git a/doc/dev.md b/doc/dev.md index 6c012426..3f1ecd49 100644 --- a/doc/dev.md +++ b/doc/dev.md @@ -37,7 +37,7 @@ reasons: ## Requirements -You need [lein](https://leiningen.org/) for running JVM tests and/or producing uberjars. For building binaries you need GraalVM. Currently we use java11-22.1.0. +You need [lein](https://leiningen.org/) for running JVM tests and/or producing uberjars. For building binaries you need GraalVM. Currently we use java11-22.2.0. ## Clone repository diff --git a/resources/META-INF/native-image/babashka/babashka/native-image.properties b/resources/META-INF/native-image/babashka/babashka/native-image.properties index 2577a2dc..77553bc9 100644 --- a/resources/META-INF/native-image/babashka/babashka/native-image.properties +++ b/resources/META-INF/native-image/babashka/babashka/native-image.properties @@ -13,6 +13,7 @@ Args=-H:+ReportExceptionStackTraces \ --report-unsupported-elements-at-runtime \ --initialize-at-build-time=com.fasterxml.jackson \ --initialize-at-build-time=java.sql.SQLException \ + --initialize-at-build-time=org.yaml.snakeyaml \ --initialize-at-run-time=org.postgresql.sspi.SSPIClient \ --initialize-at-run-time=org.httpkit.client.ClientSslEngineFactory$SSLHolder \ -H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.AudioFileReader \ diff --git a/script/bump_graal_version.clj b/script/bump_graal_version.clj index a9cb051a..fc80ea12 100755 --- a/script/bump_graal_version.clj +++ b/script/bump_graal_version.clj @@ -43,7 +43,9 @@ ".github/workflows/build.yml" ".circleci/config.yml" "appveyor.yml" - "project.clj"]) + "project.clj" + "script/bump_graal_version.clj" + ".circleci/script/short_ci.clj"]) ;; We might have to keep changing these from ;; time to time whenever the version is bumped @@ -51,10 +53,8 @@ ;; OR ;; ;; We could have them as environment variables -(def current-graal-version "22.0.0.2") +(def current-graal-version "22.2.0") (def current-java-version "java11") -(def valid-graal-bumps ["19.3.2" "20.1.0" "20.2.0" "20.3.0" "21.0.0" "21.1.0" "21.2.0" "21.3.0" "22.0.0.2" "22.1.0"]) -(def valid-java-bumps ["java8" "java11"]) (def cl-options [["-g" "--graal VERSION" "graal version"] @@ -65,8 +65,8 @@ (:options (cli/parse-opts *command-line-args* cl-options))) (defn is-valid-bump? - [version valid-bumps] - (some #(= % version) valid-bumps)) + [_version _valid-bumps] + true) (defn replace-current [file current new] @@ -93,13 +93,13 @@ (let [new-graal-version (:graal args) new-java-version (:java args)] (when (not (nil? new-graal-version)) - (if (is-valid-bump? new-graal-version valid-graal-bumps) + (if (is-valid-bump? new-graal-version nil) (do (println "Performing Graal bump...") (bump-current current-graal-version new-graal-version)) (show-error new-graal-version))) (when (not (nil? new-java-version)) - (if (is-valid-bump? new-java-version valid-java-bumps) + (if (is-valid-bump? new-java-version nil) (do (println "Performing Java bump...") (bump-current current-java-version new-java-version))