KAFKA-17684 Update our java build versions (#17350)

This updates the versions of Java we test on from 8 and 21 to 11 and 21. This also removes unnecessary Check and Compile Java variations.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
David Arthur 2024-10-03 21:46:27 -04:00 committed by GitHub
parent dbd50ff847
commit bbbf688f55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 11 deletions

View File

@ -34,11 +34,7 @@ on:
jobs: jobs:
validate: validate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: name: Compile and Check Java
fail-fast: false
matrix:
java: [ 21, 17, 11, 8 ]
name: Compile and Check Java ${{ matrix.java }}
outputs: outputs:
is-draft: ${{ steps.check-draft-pr.outputs.is-draft }} is-draft: ${{ steps.check-draft-pr.outputs.is-draft }}
steps: steps:
@ -62,7 +58,7 @@ jobs:
- name: Setup Gradle - name: Setup Gradle
uses: ./.github/actions/setup-gradle uses: ./.github/actions/setup-gradle
with: with:
java-version: ${{ matrix.java }} java-version: 21
gradle-cache-read-only: ${{ inputs.gradle-cache-read-only }} gradle-cache-read-only: ${{ inputs.gradle-cache-read-only }}
gradle-cache-write-only: ${{ inputs.gradle-cache-write-only }} gradle-cache-write-only: ${{ inputs.gradle-cache-write-only }}
develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }} develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }}
@ -80,20 +76,20 @@ jobs:
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: check-reports-${{ matrix.java }} name: check-reports
path: | path: |
**/build/**/*.html **/build/**/*.html
compression-level: 9 compression-level: 9
if-no-files-found: ignore if-no-files-found: ignore
- name: Annotate checkstyle errors - name: Annotate checkstyle errors
# Avoid duplicate annotations, only run on java 21 # Avoid duplicate annotations, only run on java 21
if: ${{ failure() && matrix.java == '21' }} if: failure()
run: python .github/scripts/checkstyle.py run: python .github/scripts/checkstyle.py
env: env:
GITHUB_WORKSPACE: ${{ github.workspace }} GITHUB_WORKSPACE: ${{ github.workspace }}
- name: Annotate Rat errors - name: Annotate Rat errors
# Avoid duplicate annotations, only run on java 21 # Avoid duplicate annotations, only run on java 21
if: ${{ failure() && matrix.java == '21' }} if: failure()
run: python .github/scripts/rat.py run: python .github/scripts/rat.py
env: env:
GITHUB_WORKSPACE: ${{ github.workspace }} GITHUB_WORKSPACE: ${{ github.workspace }}
@ -105,7 +101,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
java: [ 17, 11 ] # If we change these, make sure to adjust ci-complete.yml java: [ 21, 11 ] # If we change these, make sure to adjust ci-complete.yml
name: JUnit tests Java ${{ matrix.java }} name: JUnit tests Java ${{ matrix.java }}
steps: steps:
- name: Checkout code - name: Checkout code

View File

@ -43,7 +43,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
java: [ 17, 11 ] java: [ 21, 11 ]
steps: steps:
- name: Env - name: Env
run: printenv run: printenv