Skip to content

Install both latest LTS and current Java #287

Install both latest LTS and current Java

Install both latest LTS and current Java #287

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:
version:
- jdk11
- jdk11-alpine
- jdk11-focal
- jdk17
- jdk17-alpine
- jdk17-focal
- jdk17-graal
- jdk17-focal-graal
- jdk21
- jdk21-alpine
- jdk21-graal
- jdk21and22
- jdk21and22-alpine
- jdk21and22-graal
steps:
- name: checkout
uses: actions/checkout@v2
- name: build
env:
version: ${{ matrix.version }}
run: |
cd "${version}"
grep "FROM " Dockerfile | cut -d' ' -f2 | xargs -I{} docker pull {}
docker build --tag "gradle:${version}" .
- name: test
env:
version: ${{ matrix.version }}
expectedGradleVersion: "8.7"
run: |
if [[ "${version}" =~ "graal" ]]; then
cd test-graal
export JAVA_TOOLCHAIN_VERSION=$(echo "${version}" | grep --extended-regex --only-matching '[0-9]+-' | sed 's/-//')
echo "JAVA_TOOLCHAIN_VERSION=${JAVA_TOOLCHAIN_VERSION}"
else
cd test
fi
./run.sh "gradle:${version}" "${expectedGradleVersion}"