Update JDK 21 and 23 casks with CPU releases. #89
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-14, macos-12] # M1 and Intel | |
java-version: [17, 21, 23] | |
distribution: ['', '-community'] | |
env: | |
CASK_NAME: 'graalvm${{ matrix.distribution }}-jdk${{ matrix.java-version }}' | |
name: Test graalvm${{ matrix.distribution }}-jdk${{ matrix.java-version }}.rb on ${{ matrix.os }} | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Check style | |
run: brew style Casks/${CASK_NAME}.rb | |
- name: Install cask | |
run: brew reinstall --cask --require-sha Casks/${CASK_NAME}.rb | |
- name: Validate installation | |
run: | | |
version=$(brew info --cask Casks/$CASK_NAME.rb | head -n 1 | awk '{print $3}') | |
graalvm_dir=$(find /Library/Java/JavaVirtualMachines/ -maxdepth 1 -type d -name "graalvm-*-${{ matrix.java-version }}") | |
export PATH="${graalvm_dir}/Contents/Home/bin:${PATH}" | |
echo "${PATH}" | |
which java | |
# Ensure the expected `java` version is installed | |
java -version | |
test ! -z "$(java -version 2>&1 | grep $version)" | |
# Ensure GraalVM is picked up by `java_home` | |
/usr/libexec/java_home | |
/usr/libexec/java_home -V 2>&1 | grep "GraalVM" | |
build-ce: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
java-version: [11, 17, 19, 8, 16] | |
release-stream: ['', '-lts'] | |
exclude: | |
- java-version: 19 | |
release-stream: '-lts' | |
- java-version: 17 | |
release-stream: '-lts' | |
- java-version: 16 | |
release-stream: '-lts' | |
env: | |
CASK_NAME: 'graalvm-ce${{ matrix.release-stream }}-java${{ matrix.java-version }}' | |
name: Test graalvm-ce${{ matrix.release-stream }}-java${{ matrix.java-version }}.rb | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Check style | |
run: brew style Casks/${CASK_NAME}.rb | |
- name: Install cask | |
run: brew reinstall --cask --require-sha Casks/${CASK_NAME}.rb | |
- name: Validate installation | |
run: | | |
version=$(brew info --cask Casks/$CASK_NAME.rb | head -n 1 | awk '{print $3}') | |
export PATH="/Library/Java/JavaVirtualMachines/${CASK_NAME}-${version}/Contents/Home/bin:${PATH}" | |
echo "${PATH}" | |
which java | |
# Ensure the expected `java` version is installed | |
java -version | |
test ! -z "$(java -version 2>&1 | grep $version)" | |
# Ensure GraalVM is picked up by `java_home` | |
/usr/libexec/java_home | |
/usr/libexec/java_home -V 2>&1 | grep "GraalVM CE" |