Skip to content
New issue

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

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

Already on GitHub? # to your account

test against all supported versions of the JVM #642

Merged
merged 1 commit into from
Mar 2, 2023
Merged
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
24 changes: 20 additions & 4 deletions .github/workflows/build-and-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,36 @@ on:
- main

jobs:
build-jvm-matrix:
runs-on: ubuntu-latest
steps: # https://michaelheap.com/dynamic-matrix-generation-github-actions/
- id: set-matrix
run: echo "::set-output name=version_matrix::$(curl https://endoflife.date/api/java.json | jq -c '[.[] | select(.eol > (now | strftime("%Y-%m-%d"))) | .cycle]' | sed 's/ //g')"
- name: verify-matrix
run: echo "The selected java versions are ${{ steps.set-matrix.outputs.version_matrix }}"
outputs:
version_matrix: ${{ steps.set-matrix.outputs.version_matrix }}
build:
needs: build-jvm-matrix
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
# Windows is failing with "out of memory" errors.
continue-on-error: ${{ matrix.os == 'windows-latest' }}
java_version: ${{ fromJson(needs.build-jvm-matrix.outputs.version_matrix) }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
- name: configure windows pagefile
if: ${{ matrix.os == 'windows-latest' }}
uses: al-cheb/configure-pagefile-action@v1.2
with:
minimum-size: 8GB
maximum-size: 8GB
disk-root: "D:"
- name: set up JDK
uses: actions/setup-java@v2
with:
java-version: 8
java-version: ${{ matrix.java_version }}
distribution: 'zulu'
- name: Restore Gradle caches
uses: actions/cache@v2
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- add ktlint version 0.48.2 to testing [#632](https://github.com/JLLeitschuh/ktlint-gradle/pull/632)
- update latest gradle version for testing to 7.6 [#632](https://github.com/JLLeitschuh/ktlint-gradle/pull/632)
- improve release process to update VERSION_LATEST_RELEASE automatically [#631](https://github.com/JLLeitschuh/ktlint-gradle/pull/631)
- test against all supported jvm versions [#642](https://github.com/JLLeitschuh/ktlint-gradle/pull/642)

## [11.2.0] - 2023-02-14

Expand Down