Skip to content

Commit 50add13

Browse files
committed
CI: Install JRuby 10 w/ Java 21 & JRuby 9 w/ Java 17
Without Java 10, JRuby 10.0.5.0 gives us: ``` attempting to run with existing JAVA_HOME /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -jar /home/runner/.rubies/jruby-10.0.5.0/lib/jruby.jar --version Error: LinkageError occurred while loading main class org.jruby.main.Main java.lang.UnsupportedClassVersionError: org/jruby/main/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0 JRuby failed to start, try Java 21 envs Setting JAVA_HOME to JAVA_HOME_21_X64 path /usr/lib/jvm/temurin-21-jdk-amd64 Adding /usr/lib/jvm/temurin-21-jdk-amd64/bin to PATH Took 0.24 seconds ``` Signed-off-by: Tim Meusel <tim@bastelfreak.de>
1 parent 662ea4d commit 50add13

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,20 @@ jobs:
4444
steps:
4545
- name: Checkout current PR
4646
uses: actions/checkout@v6
47-
47+
# we explictly force Java 17 because that's the lowest one we support when building packages with ezbake
48+
- name: Set up Java 17 for JRuby 9
49+
if: contains(matrix.ruby, 'jruby-9')
50+
uses: actions/setup-java@v4
51+
with:
52+
distribution: temurin
53+
java-version: '17'
54+
# JRuby 10.0.5 requires java 21 or 25
55+
- name: Set up Java 21 for JRuby 10
56+
if: contains(matrix.ruby, 'jruby-10')
57+
uses: actions/setup-java@v4
58+
with:
59+
distribution: temurin
60+
java-version: '21'
4861
- name: Rspec checks
4962
uses: ruby/setup-ruby@v1
5063
with:

0 commit comments

Comments
 (0)