forked from hibernate/hibernate-reactive
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hibernate#2034] Build with JDK 11 when required
`workflow_dispatch` uses the workflow defined in the `main` branch. So, we need different JDK depending on the branch we are building using the scheduler or manually: * Hibernate Reactive 2.* (with ORM 6) requires JDK 11 * Hibernate Reactive 3.* (with ORM 7) requires JDK 17
- Loading branch information
Showing
1 changed file
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,14 @@ jobs: | |
.gradle/wrapper | ||
# refresh cache every month to avoid unlimited growth | ||
key: gradle-examples-${{ matrix.db }}-${{ steps.get-date.outputs.yearmonth }} | ||
- name: Set up JDK 11 | ||
if: ${{ startsWith( inputs.branch, 'wip/2' ) }} | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
- name: Set up JDK 17 | ||
if: ${{ !startsWith( inputs.branch, 'wip/2' ) }} | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
|
@@ -141,8 +148,16 @@ jobs: | |
.gradle/wrapper | ||
# refresh cache every month to avoid unlimited growth | ||
key: gradle-db-${{ matrix.db }}-${{ steps.get-date.outputs.yearmonth }} | ||
- name: Set up JDK 11 | ||
if: ${{ startsWith( inputs.branch, 'wip/2' ) }} | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
- name: Set up JDK 17 | ||
if: ${{ !startsWith( inputs.branch, 'wip/2' ) }} | ||
uses: actions/[email protected] | ||
|
||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
@@ -249,8 +264,15 @@ jobs: | |
- name: Export path to JDK ${{ matrix.java.name }} | ||
id: testjdk-exportpath | ||
run: echo "::set-output name=path::${JAVA_HOME}" | ||
# Always use JDK 11 to build the main code: that's what we use for releases. | ||
- name: Set up JDK 11 | ||
if: ${{ startsWith( inputs.branch, 'wip/2' ) }} | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
check-latest: true | ||
- name: Set up JDK 17 | ||
if: ${{ !startsWith( inputs.branch, 'wip/2' ) }} | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
|