Skip to content

Add Amazon Corretto images (closes #301) #346

Add Amazon Corretto images (closes #301)

Add Amazon Corretto images (closes #301) #346

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-corretto
ltsJavaVersion: 11
variant: corretto
- directory: jdk11-focal
ltsJavaVersion: 11
variant: focal
- directory: jdk17
ltsJavaVersion: 17
- directory: jdk17-alpine
ltsJavaVersion: 17
variant: alpine
- directory: jdk17-corretto
ltsJavaVersion: 17
variant: corretto
- directory: jdk17-focal
ltsJavaVersion: 17
variant: focal
- directory: jdk17-graal
ltsJavaVersion: 17
variant: graal
- directory: jdk17-focal-graal
ltsJavaVersion: 17
variant: focal-graal
- directory: jdk21
ltsJavaVersion: 21
- directory: jdk21-alpine
ltsJavaVersion: 21
variant: alpine
- directory: jdk21-corretto
ltsJavaVersion: 21
variant: corretto
- directory: jdk21-graal
ltsJavaVersion: 21
variant: graal
- directory: jdk23
ltsJavaVersion: 23
- directory: jdk23-alpine
ltsJavaVersion: 23
variant: alpine
- directory: jdk23-corretto
ltsJavaVersion: 23
variant: corretto
- directory: jdk23-graal
ltsJavaVersion: 23
variant: graal
- directory: jdk-lts-and-current
ltsJavaVersion: 21
currentJavaVersion: 23
- directory: jdk-lts-and-current-alpine
ltsJavaVersion: 21
currentJavaVersion: 23
variant: alpine
- directory: jdk-lts-and-current-corretto
ltsJavaVersion: 21
currentJavaVersion: 23
variant: corretto
- directory: jdk-lts-and-current-graal
ltsJavaVersion: 21
currentJavaVersion: 23
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.10.2"
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}"