GraalVM 24 (#1800)
This commit is contained in:
parent
e3908a1306
commit
4a2a305e38
11 changed files with 114 additions and 15 deletions
|
|
@ -5,7 +5,7 @@
|
|||
[clojure.string :as str]
|
||||
[flatland.ordered.map :refer [ordered-map]]))
|
||||
|
||||
(def graalvm-version "23")
|
||||
(def graalvm-version "24")
|
||||
|
||||
(defn run
|
||||
([cmd-name cmd]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ task:
|
|||
skip: "changesIncludeOnly('logo/*', '**.md')"
|
||||
env:
|
||||
LEIN_ROOT: "true"
|
||||
GRAALVM_VERSION: "23"
|
||||
GRAALVM_VERSION: "24"
|
||||
GRAALVM_HOME: ${HOME}/graalvm-${GRAALVM_VERSION}/Contents/Home
|
||||
BABASHKA_PLATFORM: macos # used in release script
|
||||
BABASHKA_ARCH: aarch64
|
||||
|
|
|
|||
100
.github/workflows/build-windows.yml
vendored
Normal file
100
.github/workflows/build-windows.yml
vendored
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
- "logo/**"
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
- "logo/**"
|
||||
|
||||
# TODO: Add deploy if needed
|
||||
jobs:
|
||||
native:
|
||||
if: "!contains(github.event.head_commit.message, 'skip ci')"
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2022
|
||||
name: windows
|
||||
static: false
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
LEIN_ROOT: "true"
|
||||
GRAALVM_VERSION: "24"
|
||||
BABASHKA_PLATFORM: ${{ matrix.name }} # used in release script
|
||||
BABASHKA_TEST_ENV: native
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BABASHKA_SHA: ${{ github.sha }}
|
||||
steps:
|
||||
- name: Git checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
submodules: 'true'
|
||||
|
||||
- name: Cache deps
|
||||
uses: actions/cache@v4
|
||||
id: cache-deps
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('project.clj') }}
|
||||
restore-keys: ${{ runner.os }}-maven-
|
||||
|
||||
- name: Setup GraalVM
|
||||
if: "matrix.static == false"
|
||||
uses: graalvm/setup-graalvm@v1.3.3
|
||||
with:
|
||||
java-version: '24'
|
||||
distribution: 'graalvm'
|
||||
components: 'native-image'
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install clojure tools
|
||||
uses: DeLaGuardo/setup-clojure@13.2
|
||||
with:
|
||||
cli: latest
|
||||
# lein: latest -- skipped because this uses some PS bullshit
|
||||
|
||||
- name: Babashka version
|
||||
id: babashka-version
|
||||
shell: bash
|
||||
run: |
|
||||
BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION)
|
||||
echo "##[set-output name=version;]${BABASHKA_VERSION}"
|
||||
|
||||
- name: Build
|
||||
shell: cmd
|
||||
run: |
|
||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.bat', 'lein.bat')"
|
||||
call lein self-install
|
||||
|
||||
set GRAALVM_HOME=%JAVA_HOME%
|
||||
call script/uberjar.bat
|
||||
|
||||
call script/compile.bat
|
||||
|
||||
echo Creating zip archive
|
||||
|
||||
set zip=babashka-%BABASHKA_VERSION%-windows-amd64.zip
|
||||
|
||||
jar -cMf %zip% bb.exe
|
||||
|
||||
bb --config .build/bb.edn --deps-root . release-artifact %zip%
|
||||
|
||||
|
||||
- name: Test binary and libs
|
||||
shell: cmd
|
||||
run: |
|
||||
set BABASHKA_CLASSPATH=
|
||||
set BABASHKA_TEST_ENV=native
|
||||
call script/test.bat :windows
|
||||
call script/run_lib_tests.bat
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: bb.exe
|
||||
name: babashka-${{ steps.babashka-version.outputs.version }}-${{ matrix.name }}-amd64
|
||||
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
|
@ -103,7 +103,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
LEIN_ROOT: "true"
|
||||
GRAALVM_VERSION: "23"
|
||||
GRAALVM_VERSION: "24"
|
||||
BABASHKA_PLATFORM: ${{ matrix.name }} # used in release script
|
||||
BABASHKA_TEST_ENV: native
|
||||
BABASHKA_XMX: "-J-Xmx6500m"
|
||||
|
|
@ -128,7 +128,7 @@ jobs:
|
|||
if: "matrix.static == false"
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
java-version: '23'
|
||||
java-version: '24'
|
||||
distribution: 'graalvm'
|
||||
components: 'native-image'
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -137,7 +137,7 @@ jobs:
|
|||
if: "matrix.static == true"
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
version: '23'
|
||||
version: '24'
|
||||
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="23"
|
||||
ENV GRAALVM_VERSION="24"
|
||||
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-23+37.1
|
||||
JAVA_HOME: C:\projects\babashka\graalvm\graalvm-jdk-23+37.1
|
||||
GRAALVM_HOME: C:\projects\babashka\graalvm\graalvm-jdk-24+36.1
|
||||
JAVA_HOME: C:\projects\babashka\graalvm\graalvm-jdk-24+36.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/23/archive/graalvm-jdk-23_windows-x64_bin.zip', 'graalvm.zip') }"
|
||||
powershell -Command "if (Test-Path('graalvm')) { return } else { (New-Object Net.WebClient).DownloadFile('https://download.oracle.com/graalvm/24/archive/graalvm-jdk-24_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 *Oracle GraalVM 23*.
|
||||
- Download [GraalVM](https://www.graalvm.org/downloads/). Currently we use *Oracle GraalVM 24*.
|
||||
- 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:
|
||||
|
|
|
|||
|
|
@ -40,7 +40,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 Oracle GraalVM 23.
|
||||
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 24.
|
||||
|
||||
## Clone repository
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@
|
|||
prismatic/plumbing {:git/url "https://github.com/plumatic/plumbing",
|
||||
:git/sha "424bc704f2db422de34269c139a5494314b3a43b"}
|
||||
org.clj-commons/hickory {:git/url "https://github.com/clj-commons/hickory"
|
||||
:git/sha "749ba998aa64f19092876cda967e6c562c56b81d"}}
|
||||
:git/sha "9385b6708ef35f161732d8464b3a3aa57dd79f30"}}
|
||||
:classpath-overrides {org.clojure/clojure nil
|
||||
org.clojure/spec.alpha nil}}
|
||||
:clj-nvd
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
"appveyor.yml"
|
||||
"project.clj"
|
||||
"script/bump_graal_version.clj"
|
||||
".circleci/script/short_ci.clj"
|
||||
".cirrus.yml"
|
||||
"script/install-graalvm"])
|
||||
|
||||
|
|
@ -55,7 +54,7 @@
|
|||
;; OR
|
||||
;;
|
||||
;; We could have them as environment variables
|
||||
(def current-graal-version "23")
|
||||
(def current-graal-version "24")
|
||||
|
||||
(def cl-options
|
||||
[["-g" "--graal VERSION" "graal version"]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ set -euo pipefail
|
|||
|
||||
INSTALL_DIR="${1:-$HOME}"
|
||||
|
||||
GRAALVM_VERSION="${GRAALVM_VERSION:-23}"
|
||||
GRAALVM_VERSION="${GRAALVM_VERSION:-24}"
|
||||
|
||||
GRAALVM_PLATFORM=$BABASHKA_PLATFORM
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue