Skip to content

Commit 03c27ba

Browse files
transclaude
andcommitted
CI: give the JRuby leg Java 21
JRuby 10.x is compiled for Java 21, but the runner defaults to Java 17, so the jruby leg failed with UnsupportedClassVersionError before it could even start. Add a conditional actions/setup-java@v4 step (Temurin 21) for matrix entries that set java-version, and set java-version: "21" on jruby. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 86004ed commit 03c27ba

1 file changed

Lines changed: 20 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,46 @@ on: [push, pull_request]
44

55
jobs:
66
test:
7-
name: Ruby ${{matrix.ruby}} on ${{matrix.os}}
8-
runs-on: ${{matrix.os}}-latest
9-
continue-on-error: ${{matrix.experimental}}
7+
name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}-latest
9+
continue-on-error: ${{ matrix.experimental }}
1010

1111
strategy:
1212
matrix:
1313
os:
1414
- ubuntu
15-
1615
ruby:
1716
- "3.1"
1817
- "3.2"
1918
- "3.3"
2019
- "3.4"
21-
2220
experimental: [false]
23-
2421
include:
2522
- os: ubuntu
2623
ruby: truffleruby
2724
experimental: true
2825
- os: ubuntu
2926
ruby: jruby
3027
experimental: true
28+
java-version: "21"
3129
- os: ubuntu
3230
ruby: head
3331
experimental: true
3432

3533
steps:
36-
- uses: actions/checkout@v4
37-
- uses: ruby/setup-ruby@v1
38-
with:
39-
ruby-version: ${{matrix.ruby}}
40-
bundler-cache: true
41-
42-
- name: Run tests
43-
timeout-minutes: 5
44-
run: bundle exec rake test
34+
- uses: actions/checkout@v4
35+
36+
- uses: actions/setup-java@v4
37+
if: ${{ matrix.java-version }}
38+
with:
39+
distribution: temurin
40+
java-version: ${{ matrix.java-version }}
41+
42+
- uses: ruby/setup-ruby@v1
43+
with:
44+
ruby-version: ${{ matrix.ruby }}
45+
bundler-cache: true
46+
47+
- name: Run tests
48+
timeout-minutes: 5
49+
run: bundle exec rake test

0 commit comments

Comments
 (0)