Skip to content

Document Java 22 images #323

Document Java 22 images

Document Java 22 images #323

Workflow file for this run

name: GitHub CI
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: 'bash -o errexit -o nounset -o pipefail {0}'
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
versions:
- directory: jdk11
ltsJavaVersion: 11
- directory: jdk11-alpine
ltsJavaVersion: 11
variant: alpine
- directory: jdk11-focal
ltsJavaVersion: 11
variant: focal
- directory: jdk17
ltsJavaVersion: 17
- directory: jdk17-alpine
ltsJavaVersion: 17
variant: alpine
- directory: jdk17-focal
ltsJavaVersion: 17
variant: focal
- directory: jdk17-graal
ltsJavaVersion: 17
variant: graal
- directory: jdk22
ltsJavaVersion: 22
- directory: jdk22-alpine
ltsJavaVersion: 22
variant: alpine
- directory: jdk22-graal
ltsJavaVersion: 22
variant: graal
- directory: jdk17-focal-graal
ltsJavaVersion: 17
variant: focal-graal
- directory: jdk21
ltsJavaVersion: 21
- directory: jdk21-alpine
ltsJavaVersion: 21
variant: alpine
- directory: jdk21-graal
ltsJavaVersion: 21
variant: graal
- directory: jdk-lts-and-current
ltsJavaVersion: 21
currentJavaVersion: 22
- directory: jdk-lts-and-current-alpine
ltsJavaVersion: 21
currentJavaVersion: 22
variant: alpine
- directory: jdk-lts-and-current-graal
ltsJavaVersion: 21
currentJavaVersion: 22
variant: graal
steps:
- name: checkout
uses: actions/checkout@v2
- name: build
env:
directory: ${{ matrix.versions.directory }}
run: |
cd "${directory}"
grep "FROM " Dockerfile | cut -d' ' -f2 | xargs -I{} docker pull {}
docker build --tag "gradle:${directory}" .
- name: test
env:
directory: ${{ matrix.versions.directory }}
ltsJavaVersion: ${{ matrix.versions.ltsJavaVersion }}
currentJavaVersion: ${{ matrix.versions.currentJavaVersion }}
variant: ${{ matrix.versions.variant }}
expectedGradleVersion: "8.8"
run: |
toolchainJavaVersion="${currentJavaVersion:-${ltsJavaVersion}}"
if [[ "${variant:-''}" = "graal" ]]; then
cd test-graal
sed --regexp-extended --in-place "s/JavaLanguageVersion\.of\([0-9]+\)/JavaLanguageVersion.of(${toolchainJavaVersion})/" app/build.gradle
else
cd test
sed --regexp-extended --in-place "s/JavaLanguageVersion\.of\([0-9]+\)/JavaLanguageVersion.of(${toolchainJavaVersion})/" lib/build.gradle.kts
fi
./run.sh "gradle:${directory}" "${expectedGradleVersion}"