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
[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

View file

@ -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

View file

@ -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}

View file

@ -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 }"

View file

@ -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:
```

View file

@ -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

View file

@ -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 \

View file

@ -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))