diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e73bd1..41d52d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 }}' diff --git a/Casks/graalvm-community-jdk23.rb b/Casks/graalvm-community-jdk23.rb new file mode 100644 index 0000000..3ac4941 --- /dev/null +++ b/Casks/graalvm-community-jdk23.rb @@ -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 diff --git a/Casks/graalvm-jdk23.rb b/Casks/graalvm-jdk23.rb new file mode 100644 index 0000000..9e86a0c --- /dev/null +++ b/Casks/graalvm-jdk23.rb @@ -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