Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(java): workflow to test using different jdk versions #1332

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,57 @@ jobs:
name: clients-${{matrix.client.language }}
path: clients-${{matrix.client.language }}.zip

java_compatibility_check:
runs-on: ubuntu-20.04
timeout-minutes: 10
needs:
- setup
- client_gen
if: |
always() &&
!contains(needs.*.result, 'cancelled') &&
!contains(needs.*.result, 'failure')

strategy:
fail-fast: false
matrix:
jdk: [temurin, zulu]
java: [8, 11, 17]
name: Java ${{ matrix.java }}/${{ matrix.jdk }} Build

steps:
- name: Checkout
aallam marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/checkout@v3

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Configure JDK
uses: actions/setup-java@v3
with:
distribution: ${{ matrix.jdk }}
java-version: ${{ matrix.java }}

- name: Setup
uses: ./.github/actions/setup
with:
type: minimal

- name: Download java artifacts
uses: ./.github/actions/restore-artifacts
with:
java: true

- name: Test
run: yarn cli cts run java

codegen:
runs-on: ubuntu-20.04
timeout-minutes: 10
needs:
- setup
- client_gen
- java_compatibility_check
if: |
always() &&
!contains(needs.*.result, 'cancelled') &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ repositories {
mavenCentral()
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}

compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}

dependencies {
implementation 'com.google.code.findbugs:jsr305:3.0.2'
api 'com.squareup.okhttp3:okhttp:4.10.0'
Expand Down