Skip to content

internal: Support JDK21 #350

internal: Support JDK21

internal: Support JDK21 #350

Workflow file for this run

name: CI
on:
pull_request:
paths:
- '**.scala'
- '**.java'
- '**.sbt'
- '.github/workflows/*.yml'
- '**.so'
- '**.dll'
- 'src/main/resources/**'
- 'project/build.properties'
push:
branches:
- master
- main
paths:
- '**.scala'
- '**.java'
- '**.sbt'
- '.github/workflows/*.yml'
- 'src/main/resources/org/xerial/snappy/**'
- 'project/build.properties'
jobs:
code_format:
name: code format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: scalafmt test
run: ./sbt scalafmtCheckAll
test:
name: test jdk11
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- uses: actions/cache@v3
with:
path: ~/.cache
key: ${{ runner.os }}-jdk11-${{ hashFiles('**/*.sbt') }}
restore-keys: ${{ runner.os }}-jdk11-
- name: Test
run: ./sbt test
test_jdk8:
name: test jdk8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
- uses: actions/cache@v3
with:
path: ~/.cache
key: ${{ runner.os }}-jdk8-${{ hashFiles('**/*.sbt') }}
restore-keys: ${{ runner.os }}-jdk8-
- name: Test
run: ./sbt test
test_jdk17:
name: test jdk17
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- uses: actions/cache@v3
with:
path: ~/.cache
key: ${{ runner.os }}-jdk17-${{ hashFiles('**/*.sbt') }}
restore-keys: ${{ runner.os }}-jdk17-
- name: Test
run: ./sbt test
test_jdk21:
name: test jdk21
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
- uses: actions/cache@v3
with:
path: ~/.cache
key: ${{ runner.os }}-jdk21-${{ hashFiles('**/*.sbt') }}
restore-keys: ${{ runner.os }}-jdk21-
- name: Test
run: ./sbt test