Skip to content

Commit

Permalink
Build with JDK 11 when required
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideD committed Dec 18, 2024
1 parent fb0c695 commit d5b8c15
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,15 @@ 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
uses: actions/[email protected]
if: ${{ startsWith( inputs.branch, 'wip/2' ) }}
with:
distribution: 'temurin'
java-version: 11
- name: Set up JDK 17
uses: actions/[email protected]
if: ${{ !startsWith( inputs.branch, 'wip/2' ) }}
with:
distribution: 'temurin'
java-version: 17
Expand Down Expand Up @@ -136,8 +143,15 @@ 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
uses: actions/[email protected]
if: ${{ startsWith( inputs.branch, 'wip/2' ) }}
with:
distribution: 'temurin'
java-version: 11
- name: Set up JDK 17
uses: actions/[email protected]
if: ${{ !startsWith( inputs.branch, 'wip/2' ) }}
with:
distribution: 'temurin'
java-version: 17
Expand Down Expand Up @@ -244,13 +258,20 @@ 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
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 11
check-latest: true
if: ${{ startsWith( inputs.branch, 'wip/2' ) }}
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 17
check-latest: true
if: ${{ !startsWith( inputs.branch, 'wip/2' ) }}
- name: Export path to JDK 11
id: mainjdk-exportpath
run: echo "::set-output name=path::${JAVA_HOME}"
Expand Down

0 comments on commit d5b8c15

Please sign in to comment.