GraalVM 23 (#1745)
This commit is contained in:
parent
34b5e71465
commit
ed8aa97d34
11 changed files with 22 additions and 28 deletions
|
|
@ -5,7 +5,7 @@
|
|||
[clojure.string :as str]
|
||||
[flatland.ordered.map :refer [ordered-map]]))
|
||||
|
||||
(def graalvm-version "22")
|
||||
(def graalvm-version "23")
|
||||
|
||||
(defn run
|
||||
([cmd-name cmd]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ task:
|
|||
skip: "changesIncludeOnly('logo/*', '**.md')"
|
||||
env:
|
||||
LEIN_ROOT: "true"
|
||||
GRAALVM_VERSION: "22"
|
||||
GRAALVM_VERSION: "23"
|
||||
GRAALVM_HOME: ${HOME}/graalvm-${GRAALVM_VERSION}/Contents/Home
|
||||
BABASHKA_PLATFORM: macos # used in release script
|
||||
BABASHKA_ARCH: aarch64
|
||||
|
|
|
|||
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
|
@ -102,7 +102,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
LEIN_ROOT: "true"
|
||||
GRAALVM_VERSION: "22"
|
||||
GRAALVM_VERSION: "23"
|
||||
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:
|
||||
java-version: '22'
|
||||
java-version: '23'
|
||||
distribution: 'graalvm'
|
||||
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'
|
||||
version: '23'
|
||||
distribution: 'graalvm'
|
||||
components: 'native-image'
|
||||
native-image-musl: true
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ RUN apt update
|
|||
RUN apt install --no-install-recommends -yy build-essential zlib1g-dev
|
||||
WORKDIR "/opt"
|
||||
|
||||
ENV GRAALVM_VERSION="22"
|
||||
ENV GRAALVM_VERSION="23"
|
||||
ARG TARGETARCH
|
||||
# Do not set those directly, use TARGETARCH instead
|
||||
ENV BABASHKA_ARCH=
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ image: Visual Studio 2022
|
|||
clone_folder: C:\projects\babashka
|
||||
|
||||
environment:
|
||||
GRAALVM_HOME: C:\projects\babashka\graalvm\graalvm-jdk-22+36.1
|
||||
JAVA_HOME: C:\projects\babashka\graalvm\graalvm-jdk-22+36.1
|
||||
GRAALVM_HOME: C:\projects\babashka\graalvm\graalvm-jdk-23+37.1
|
||||
JAVA_HOME: C:\projects\babashka\graalvm\graalvm-jdk-23+37.1
|
||||
BABASHKA_XMX: "-J-Xmx5g"
|
||||
|
||||
skip_commits:
|
||||
|
|
@ -44,7 +44,7 @@ clone_script:
|
|||
build_script:
|
||||
# TODO: Extract the zip by removing the top level folder to remove the hardcoded path for GRAALVM_HOME
|
||||
- cmd: >-
|
||||
powershell -Command "if (Test-Path('graalvm')) { return } else { (New-Object Net.WebClient).DownloadFile('https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22_windows-x64_bin.zip', 'graalvm.zip') }"
|
||||
powershell -Command "if (Test-Path('graalvm')) { return } else { (New-Object Net.WebClient).DownloadFile('https://download.oracle.com/graalvm/23/archive/graalvm-jdk-23_windows-x64_bin.zip', 'graalvm.zip') }"
|
||||
|
||||
powershell -Command "if (Test-Path('graalvm')) { return } else { Expand-Archive graalvm.zip graalvm }"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
## Prerequisites
|
||||
|
||||
- Install [lein](https://leiningen.org/) for producing uberjars
|
||||
- Download [GraalVM](https://www.graalvm.org/downloads/). Currently we use *jdk-22*.
|
||||
- Download [GraalVM](https://www.graalvm.org/downloads/). Currently we use *Oracle GraalVM 23*.
|
||||
- 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:
|
||||
|
|
|
|||
|
|
@ -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 jdk-21.0.0.1
|
||||
You need [lein](https://leiningen.org/) for running JVM tests and/or producing uberjars. For building binaries you need GraalVM. Currently we use Oracle GraalVM 23.
|
||||
|
||||
## Clone repository
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@
|
|||
"project.clj"
|
||||
"script/bump_graal_version.clj"
|
||||
".circleci/script/short_ci.clj"
|
||||
".cirrus.yml"])
|
||||
".cirrus.yml"
|
||||
"script/install-graalvm"])
|
||||
|
||||
;; We might have to keep changing these from
|
||||
;; time to time whenever the version is bumped
|
||||
|
|
@ -54,8 +55,7 @@
|
|||
;; OR
|
||||
;;
|
||||
;; We could have them as environment variables
|
||||
(def current-graal-version "22.3.1")
|
||||
(def current-java-version "java19")
|
||||
(def current-graal-version "23")
|
||||
|
||||
(def cl-options
|
||||
[["-g" "--graal VERSION" "graal version"]
|
||||
|
|
@ -91,19 +91,12 @@
|
|||
[args]
|
||||
(when (empty? args)
|
||||
(display-help))
|
||||
(let [new-graal-version (:graal args)
|
||||
new-java-version (:java args)]
|
||||
(let [new-graal-version (:graal args)]
|
||||
(when (not (nil? new-graal-version))
|
||||
(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 nil)
|
||||
(do
|
||||
(println "Performing Java bump...")
|
||||
(bump-current current-java-version new-java-version))
|
||||
(show-error new-java-version)))))
|
||||
(show-error new-graal-version)))))
|
||||
|
||||
(exec-script cl-args)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ args=("-jar" "$BABASHKA_JAR"
|
|||
# "-H:DashboardDump=reports/dump"
|
||||
# "-H:+DashboardPretty"
|
||||
# "-H:+DashboardJson"
|
||||
"-H:ReportAnalysisForbiddenType=java.awt.Toolkit:InHeap,Allocated"
|
||||
# "-H:ReportAnalysisForbiddenType=java.awt.Toolkit:Instantiated"
|
||||
"--verbose"
|
||||
"--no-fallback"
|
||||
"--native-image-info"
|
||||
|
|
@ -54,13 +54,14 @@ BABASHKA_STATIC=${BABASHKA_STATIC:-}
|
|||
BABASHKA_MUSL=${BABASHKA_MUSL:-}
|
||||
|
||||
if [ "$BABASHKA_STATIC" = "true" ]; then
|
||||
args+=("--static")
|
||||
if [ "$BABASHKA_MUSL" = "true" ]; then
|
||||
args+=("--static")
|
||||
args+=("--libc=musl"
|
||||
# see https://github.com/oracle/graal/issues/3398
|
||||
"-H:CCompilerOption=-Wl,-z,stack-size=2097152")
|
||||
else
|
||||
# see https://github.com/oracle/graal/issues/3737
|
||||
args+=("-H:+UnlockExperimentalVMOptions")
|
||||
args+=("-H:+StaticExecutableWithDynamicLibC")
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ set -euo pipefail
|
|||
|
||||
INSTALL_DIR="${1:-$HOME}"
|
||||
|
||||
GRAALVM_VERSION="${GRAALVM_VERSION:-22}"
|
||||
GRAALVM_VERSION="${GRAALVM_VERSION:-23}"
|
||||
|
||||
GRAALVM_PLATFORM=$BABASHKA_PLATFORM
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ esac
|
|||
|
||||
GRAALVM_DIR_NAME="graalvm-$GRAALVM_VERSION"
|
||||
GRAALVM_FILENAME="graalvm-jdk-${GRAALVM_VERSION}_${GRAALVM_PLATFORM}-${GRAALVM_ARCH}_bin.tar.gz"
|
||||
DOWNLOAD_URL="https://download.oracle.com/graalvm/22/archive/${GRAALVM_FILENAME}"
|
||||
DOWNLOAD_URL="https://download.oracle.com/graalvm/23/archive/${GRAALVM_FILENAME}"
|
||||
|
||||
pushd "$INSTALL_DIR" >/dev/null
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
:static true}
|
||||
([aseq]
|
||||
(try (clojure.lang.RT/seqToTypedArray (seq aseq))
|
||||
(catch IllegalArgumentException _
|
||||
(catch Throwable _
|
||||
(clojure.lang.RT/seqToTypedArray Object (seq aseq)))))
|
||||
([type aseq]
|
||||
(clojure.lang.RT/seqToTypedArray type (seq aseq))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue