Upgrade to GraalVM 22.2.0 (#1325)

This commit is contained in:
Michiel Borkent 2022-07-27 12:20:32 +02:00 committed by GitHub
parent 9e57cb4430
commit e58fe9db1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 24 deletions

View file

@ -114,7 +114,7 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl
(defn unix (defn unix
[shorted? static? musl? arch executor-conf resource-class graalvm-home platform] [shorted? static? musl? arch executor-conf resource-class graalvm-home platform]
(let [env {:LEIN_ROOT "true" (let [env {:LEIN_ROOT "true"
:GRAALVM_VERSION "22.1.0" :GRAALVM_VERSION "22.2.0"
:GRAALVM_HOME graalvm-home :GRAALVM_HOME graalvm-home
:BABASHKA_PLATFORM (if (= "mac" platform) :BABASHKA_PLATFORM (if (= "mac" platform)
"macos" "macos"
@ -168,7 +168,7 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl
{:persist_to_workspace {:root "/tmp" {:persist_to_workspace {:root "/tmp"
:paths ["release"]}} :paths ["release"]}}
{:save_cache {:save_cache
{:paths ["~/.m2" "~/graalvm-ce-java11-22.1.0"] {:paths ["~/.m2" "~/graalvm-ce-java11-22.2.0"]
:key cache-key}} :key cache-key}}
{:store_artifacts {:path "/tmp/release" {:store_artifacts {:path "/tmp/release"
:destination "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"}]} (let [docker-executor-conf {:docker [{:image "circleci/clojure:openjdk-11-lein-2.9.8-bullseye"}]}
machine-executor-conf {:machine {:image "ubuntu-2004:202111-01"}} machine-executor-conf {:machine {:image "ubuntu-2004:202111-01"}}
mac-executor-conf {:macos {:xcode "12.0.0"}} mac-executor-conf {:macos {:xcode "12.0.0"}}
linux-graalvm-home "/home/circleci/graalvm-ce-java11-22.1.0" linux-graalvm-home "/home/circleci/graalvm-ce-java11-22.2.0"
mac-graalvm-home "/Users/distiller/graalvm-ce-java11-22.1.0/Contents/Home"] mac-graalvm-home "/Users/distiller/graalvm-ce-java11-22.2.0/Contents/Home"]
(ordered-map (ordered-map
:version 2.1 :version 2.1
:commands :commands

View file

@ -102,7 +102,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
LEIN_ROOT: "true" LEIN_ROOT: "true"
GRAALVM_VERSION: "22.1.0" GRAALVM_VERSION: "22.2.0"
BABASHKA_PLATFORM: ${{ matrix.name }} # used in release script BABASHKA_PLATFORM: ${{ matrix.name }} # used in release script
BABASHKA_TEST_ENV: native BABASHKA_TEST_ENV: native
BABASHKA_XMX: "-J-Xmx6500m" BABASHKA_XMX: "-J-Xmx6500m"
@ -126,7 +126,7 @@ jobs:
if: "matrix.static == false" if: "matrix.static == false"
uses: graalvm/setup-graalvm@v1 uses: graalvm/setup-graalvm@v1
with: with:
version: '22.1.0' version: '22.2.0'
java-version: '11' java-version: '11'
components: 'native-image' components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
@ -135,7 +135,7 @@ jobs:
if: "matrix.static == true" if: "matrix.static == true"
uses: graalvm/setup-graalvm@v1 uses: graalvm/setup-graalvm@v1
with: with:
version: '22.1.0' version: '22.2.0'
java-version: '11' java-version: '11'
components: 'native-image' components: 'native-image'
native-image-musl: true native-image-musl: true

View file

@ -5,7 +5,7 @@ RUN apt update
RUN apt install --no-install-recommends -yy build-essential zlib1g-dev RUN apt install --no-install-recommends -yy build-essential zlib1g-dev
WORKDIR "/opt" WORKDIR "/opt"
ENV GRAALVM_VERSION="22.1.0" ENV GRAALVM_VERSION="22.2.0"
ARG TARGETARCH ARG TARGETARCH
ENV BABASHKA_ARCH=${TARGETARCH} ENV BABASHKA_ARCH=${TARGETARCH}
ENV GRAALVM_ARCH=${TARGETARCH} ENV GRAALVM_ARCH=${TARGETARCH}

View file

@ -7,8 +7,8 @@ image: Visual Studio 2017
clone_folder: C:\projects\babashka clone_folder: C:\projects\babashka
environment: environment:
GRAALVM_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.1.0 JAVA_HOME: C:\projects\babashka\graalvm\graalvm-ce-java11-22.2.0
BABASHKA_XMX: "-J-Xmx5g" BABASHKA_XMX: "-J-Xmx5g"
skip_commits: skip_commits:
@ -38,7 +38,7 @@ clone_script:
build_script: build_script:
- cmd: >- - 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 }" powershell -Command "if (Test-Path('graalvm')) { return } else { Expand-Archive graalvm.zip graalvm }"

View file

@ -3,24 +3,24 @@
## Prerequisites ## Prerequisites
- Install [lein](https://leiningen.org/) for producing uberjars - 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 - For Windows, installing Visual Studio 2019 with the "Desktop development
with C++" workload is recommended. with C++" workload is recommended.
- Set `$GRAALVM_HOME` to the GraalVM distribution directory. On macOS this can look like: - Set `$GRAALVM_HOME` to the GraalVM distribution directory. On macOS this can look like:
``` shell ``` 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: On linux:
``` shell ``` 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): 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: If you are not running from the x64 Native Tools Command Prompt, you will need to set additional environment variables using:
``` ```

View file

@ -37,7 +37,7 @@ reasons:
## Requirements ## 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 ## Clone repository

View file

@ -13,6 +13,7 @@ Args=-H:+ReportExceptionStackTraces \
--report-unsupported-elements-at-runtime \ --report-unsupported-elements-at-runtime \
--initialize-at-build-time=com.fasterxml.jackson \ --initialize-at-build-time=com.fasterxml.jackson \
--initialize-at-build-time=java.sql.SQLException \ --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.postgresql.sspi.SSPIClient \
--initialize-at-run-time=org.httpkit.client.ClientSslEngineFactory$SSLHolder \ --initialize-at-run-time=org.httpkit.client.ClientSslEngineFactory$SSLHolder \
-H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.AudioFileReader \ -H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.AudioFileReader \

View file

@ -43,7 +43,9 @@
".github/workflows/build.yml" ".github/workflows/build.yml"
".circleci/config.yml" ".circleci/config.yml"
"appveyor.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 ;; We might have to keep changing these from
;; time to time whenever the version is bumped ;; time to time whenever the version is bumped
@ -51,10 +53,8 @@
;; OR ;; OR
;; ;;
;; We could have them as environment variables ;; 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 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 (def cl-options
[["-g" "--graal VERSION" "graal version"] [["-g" "--graal VERSION" "graal version"]
@ -65,8 +65,8 @@
(:options (cli/parse-opts *command-line-args* cl-options))) (:options (cli/parse-opts *command-line-args* cl-options)))
(defn is-valid-bump? (defn is-valid-bump?
[version valid-bumps] [_version _valid-bumps]
(some #(= % version) valid-bumps)) true)
(defn replace-current (defn replace-current
[file current new] [file current new]
@ -93,13 +93,13 @@
(let [new-graal-version (:graal args) (let [new-graal-version (:graal args)
new-java-version (:java args)] new-java-version (:java args)]
(when (not (nil? new-graal-version)) (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 (do
(println "Performing Graal bump...") (println "Performing Graal bump...")
(bump-current current-graal-version new-graal-version)) (bump-current current-graal-version new-graal-version))
(show-error new-graal-version))) (show-error new-graal-version)))
(when (not (nil? new-java-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 (do
(println "Performing Java bump...") (println "Performing Java bump...")
(bump-current current-java-version new-java-version)) (bump-current current-java-version new-java-version))