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]
|
[clojure.string :as str]
|
||||||
[flatland.ordered.map :refer [ordered-map]]))
|
[flatland.ordered.map :refer [ordered-map]]))
|
||||||
|
|
||||||
(def graalvm-version "22")
|
(def graalvm-version "23")
|
||||||
|
|
||||||
(defn run
|
(defn run
|
||||||
([cmd-name cmd]
|
([cmd-name cmd]
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ task:
|
||||||
skip: "changesIncludeOnly('logo/*', '**.md')"
|
skip: "changesIncludeOnly('logo/*', '**.md')"
|
||||||
env:
|
env:
|
||||||
LEIN_ROOT: "true"
|
LEIN_ROOT: "true"
|
||||||
GRAALVM_VERSION: "22"
|
GRAALVM_VERSION: "23"
|
||||||
GRAALVM_HOME: ${HOME}/graalvm-${GRAALVM_VERSION}/Contents/Home
|
GRAALVM_HOME: ${HOME}/graalvm-${GRAALVM_VERSION}/Contents/Home
|
||||||
BABASHKA_PLATFORM: macos # used in release script
|
BABASHKA_PLATFORM: macos # used in release script
|
||||||
BABASHKA_ARCH: aarch64
|
BABASHKA_ARCH: aarch64
|
||||||
|
|
|
||||||
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
|
@ -102,7 +102,7 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
LEIN_ROOT: "true"
|
LEIN_ROOT: "true"
|
||||||
GRAALVM_VERSION: "22"
|
GRAALVM_VERSION: "23"
|
||||||
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:
|
||||||
java-version: '22'
|
java-version: '23'
|
||||||
distribution: 'graalvm'
|
distribution: 'graalvm'
|
||||||
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'
|
version: '23'
|
||||||
distribution: 'graalvm'
|
distribution: 'graalvm'
|
||||||
components: 'native-image'
|
components: 'native-image'
|
||||||
native-image-musl: true
|
native-image-musl: true
|
||||||
|
|
|
||||||
|
|
@ -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"
|
ENV GRAALVM_VERSION="23"
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
# Do not set those directly, use TARGETARCH instead
|
# Do not set those directly, use TARGETARCH instead
|
||||||
ENV BABASHKA_ARCH=
|
ENV BABASHKA_ARCH=
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ image: Visual Studio 2022
|
||||||
clone_folder: C:\projects\babashka
|
clone_folder: C:\projects\babashka
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
GRAALVM_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-22+36.1
|
JAVA_HOME: C:\projects\babashka\graalvm\graalvm-jdk-23+37.1
|
||||||
BABASHKA_XMX: "-J-Xmx5g"
|
BABASHKA_XMX: "-J-Xmx5g"
|
||||||
|
|
||||||
skip_commits:
|
skip_commits:
|
||||||
|
|
@ -44,7 +44,7 @@ clone_script:
|
||||||
build_script:
|
build_script:
|
||||||
# TODO: Extract the zip by removing the top level folder to remove the hardcoded path for GRAALVM_HOME
|
# TODO: Extract the zip by removing the top level folder to remove the hardcoded path for GRAALVM_HOME
|
||||||
- cmd: >-
|
- 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 }"
|
powershell -Command "if (Test-Path('graalvm')) { return } else { Expand-Archive graalvm.zip graalvm }"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
## 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 *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
|
- 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:
|
||||||
|
|
|
||||||
|
|
@ -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 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
|
## Clone repository
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@
|
||||||
"project.clj"
|
"project.clj"
|
||||||
"script/bump_graal_version.clj"
|
"script/bump_graal_version.clj"
|
||||||
".circleci/script/short_ci.clj"
|
".circleci/script/short_ci.clj"
|
||||||
".cirrus.yml"])
|
".cirrus.yml"
|
||||||
|
"script/install-graalvm"])
|
||||||
|
|
||||||
;; 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
|
||||||
|
|
@ -54,8 +55,7 @@
|
||||||
;; OR
|
;; OR
|
||||||
;;
|
;;
|
||||||
;; We could have them as environment variables
|
;; We could have them as environment variables
|
||||||
(def current-graal-version "22.3.1")
|
(def current-graal-version "23")
|
||||||
(def current-java-version "java19")
|
|
||||||
|
|
||||||
(def cl-options
|
(def cl-options
|
||||||
[["-g" "--graal VERSION" "graal version"]
|
[["-g" "--graal VERSION" "graal version"]
|
||||||
|
|
@ -91,19 +91,12 @@
|
||||||
[args]
|
[args]
|
||||||
(when (empty? args)
|
(when (empty? args)
|
||||||
(display-help))
|
(display-help))
|
||||||
(let [new-graal-version (:graal args)
|
(let [new-graal-version (:graal 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 nil)
|
(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))
|
|
||||||
(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)))))
|
|
||||||
|
|
||||||
(exec-script cl-args)
|
(exec-script cl-args)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ args=("-jar" "$BABASHKA_JAR"
|
||||||
# "-H:DashboardDump=reports/dump"
|
# "-H:DashboardDump=reports/dump"
|
||||||
# "-H:+DashboardPretty"
|
# "-H:+DashboardPretty"
|
||||||
# "-H:+DashboardJson"
|
# "-H:+DashboardJson"
|
||||||
"-H:ReportAnalysisForbiddenType=java.awt.Toolkit:InHeap,Allocated"
|
# "-H:ReportAnalysisForbiddenType=java.awt.Toolkit:Instantiated"
|
||||||
"--verbose"
|
"--verbose"
|
||||||
"--no-fallback"
|
"--no-fallback"
|
||||||
"--native-image-info"
|
"--native-image-info"
|
||||||
|
|
@ -54,13 +54,14 @@ BABASHKA_STATIC=${BABASHKA_STATIC:-}
|
||||||
BABASHKA_MUSL=${BABASHKA_MUSL:-}
|
BABASHKA_MUSL=${BABASHKA_MUSL:-}
|
||||||
|
|
||||||
if [ "$BABASHKA_STATIC" = "true" ]; then
|
if [ "$BABASHKA_STATIC" = "true" ]; then
|
||||||
args+=("--static")
|
|
||||||
if [ "$BABASHKA_MUSL" = "true" ]; then
|
if [ "$BABASHKA_MUSL" = "true" ]; then
|
||||||
|
args+=("--static")
|
||||||
args+=("--libc=musl"
|
args+=("--libc=musl"
|
||||||
# see https://github.com/oracle/graal/issues/3398
|
# see https://github.com/oracle/graal/issues/3398
|
||||||
"-H:CCompilerOption=-Wl,-z,stack-size=2097152")
|
"-H:CCompilerOption=-Wl,-z,stack-size=2097152")
|
||||||
else
|
else
|
||||||
# see https://github.com/oracle/graal/issues/3737
|
# see https://github.com/oracle/graal/issues/3737
|
||||||
|
args+=("-H:+UnlockExperimentalVMOptions")
|
||||||
args+=("-H:+StaticExecutableWithDynamicLibC")
|
args+=("-H:+StaticExecutableWithDynamicLibC")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ set -euo pipefail
|
||||||
|
|
||||||
INSTALL_DIR="${1:-$HOME}"
|
INSTALL_DIR="${1:-$HOME}"
|
||||||
|
|
||||||
GRAALVM_VERSION="${GRAALVM_VERSION:-22}"
|
GRAALVM_VERSION="${GRAALVM_VERSION:-23}"
|
||||||
|
|
||||||
GRAALVM_PLATFORM=$BABASHKA_PLATFORM
|
GRAALVM_PLATFORM=$BABASHKA_PLATFORM
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@ esac
|
||||||
|
|
||||||
GRAALVM_DIR_NAME="graalvm-$GRAALVM_VERSION"
|
GRAALVM_DIR_NAME="graalvm-$GRAALVM_VERSION"
|
||||||
GRAALVM_FILENAME="graalvm-jdk-${GRAALVM_VERSION}_${GRAALVM_PLATFORM}-${GRAALVM_ARCH}_bin.tar.gz"
|
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
|
pushd "$INSTALL_DIR" >/dev/null
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@
|
||||||
:static true}
|
:static true}
|
||||||
([aseq]
|
([aseq]
|
||||||
(try (clojure.lang.RT/seqToTypedArray (seq aseq))
|
(try (clojure.lang.RT/seqToTypedArray (seq aseq))
|
||||||
(catch IllegalArgumentException _
|
(catch Throwable _
|
||||||
(clojure.lang.RT/seqToTypedArray Object (seq aseq)))))
|
(clojure.lang.RT/seqToTypedArray Object (seq aseq)))))
|
||||||
([type aseq]
|
([type aseq]
|
||||||
(clojure.lang.RT/seqToTypedArray type (seq aseq))))
|
(clojure.lang.RT/seqToTypedArray type (seq aseq))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue