Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce GraalVM JDK 23 #59

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [macos-14, macos-12] # M1 and Intel
java-version: [17, 20, 21, 22]
java-version: [17, 21, 23]
distribution: ['', '-community']
env:
CASK_NAME: 'graalvm${{ matrix.distribution }}-jdk${{ matrix.java-version }}'
Expand Down
43 changes: 43 additions & 0 deletions Casks/graalvm-community-jdk23.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cask "graalvm-community-jdk23" do
arch arm: "aarch64", intel: "x64"

version "23"
sha256 arm: "cda587f6d15134dc237fbb1111c7e339c8a0b2f4c1a4817a436c7c15d8ba2a9b",
intel: "1338b838e5c845688643ed9e91bf2a0236e4d53bf1dc9cb4f693bde0409d4daa"

installation_dir = "graalvm-community-openjdk-#{version}+37.1".freeze
jvms_dir = "/Library/Java/JavaVirtualMachines".freeze
target_dir = "#{jvms_dir}/graalvm-community-openjdk-#{version.split(".").first}".freeze

# github.com/graalvm/graalvm-ce-builds was verified as official when first introduced to the cask
url "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-#{version}.0.0/graalvm-community-jdk-#{version}.0.0_macos-#{arch}_bin.tar.gz"
name "GraalVM Community Edition for JDK 23"
homepage "https://www.graalvm.org/"

artifact installation_dir, target: target_dir

postflight do
# Correct symlink
macos_dir = "#{target_dir}/Contents/MacOS"
libjli_filename = "libjli.dylib"
libjli_path = "#{target_dir}/Contents/Home/lib/#{libjli_filename}"
libjli_symlink_path = "#{macos_dir}/#{libjli_filename}"
system_command "/bin/mkdir", args: ["-p", macos_dir], sudo: true
system_command "/bin/ln", args: ["-s", "-f", libjli_path, libjli_symlink_path], sudo: true
end

caveats <<~EOS
Installing GraalVM CE for JDK 23 in #{jvms_dir} requires root permission.
You may be asked to enter your password to proceed.

To use GraalVM, you may want to change your $JAVA_HOME:
export JAVA_HOME="#{target_dir}/Contents/Home"

or you may want to add its `bin` directory to your $PATH:
export PATH="#{target_dir}/Contents/Home/bin:$PATH"

GraalVM CE is licensed under the GPL 2 with Classpath exception:
https://github.com/oracle/graal/blob/master/LICENSE

EOS
end
43 changes: 43 additions & 0 deletions Casks/graalvm-jdk23.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cask "graalvm-jdk23" do
arch arm: "aarch64", intel: "x64"

version "23"
sha256 arm: "63290bf6242836ac46ca4c8c4ad048e4482fdb3f8276b9689088f059be430687",
intel: "d516ea854e361a821c7679d127ff7126c254b8c43c99e571e203df218df2764b"

installation_dir = "graalvm-jdk-#{version}+37.1".freeze
jvms_dir = "/Library/Java/JavaVirtualMachines".freeze
target_dir = "#{jvms_dir}/graalvm-jdk-#{version.split(".").first}".freeze

# download.oracle.com was verified as official when first introduced to the cask
url "https://download.oracle.com/graalvm/23/archive/graalvm-jdk-#{version}_macos-#{arch}_bin.tar.gz"
name "Oracle GraalVM for JDK 23"
homepage "https://www.graalvm.org/"

artifact installation_dir, target: target_dir

postflight do
# Correct symlink
macos_dir = "#{target_dir}/Contents/MacOS"
libjli_filename = "libjli.dylib"
libjli_path = "#{target_dir}/Contents/Home/lib/#{libjli_filename}"
libjli_symlink_path = "#{macos_dir}/#{libjli_filename}"
system_command "/bin/mkdir", args: ["-p", macos_dir], sudo: true
system_command "/bin/ln", args: ["-s", "-f", libjli_path, libjli_symlink_path], sudo: true
end

caveats <<~EOS
Installing Oracle GraalVM for JDK 23 in #{jvms_dir} requires root permission.
You may be asked to enter your password to proceed.

To use GraalVM, you may want to change your $JAVA_HOME:
export JAVA_HOME="#{target_dir}/Contents/Home"

or you may want to add its `bin` directory to your $PATH:
export PATH="#{target_dir}/Contents/Home/bin:$PATH"

Oracle GraalVM is licensed under the GraalVM Free Terms and Conditions:
https://www.oracle.com/downloads/licenses/graal-free-license.html

EOS
end
Loading