File tree 3 files changed +26
-5
lines changed
3 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 9
9
- main
10
10
11
11
jobs :
12
+ build-jvm-matrix :
13
+ runs-on : ubuntu-latest
14
+ steps : # https://michaelheap.com/dynamic-matrix-generation-github-actions/
15
+ - id : set-matrix
16
+ 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')"
17
+ - name : verify-matrix
18
+ run : echo "The selected java versions are ${{ steps.set-matrix.outputs.version_matrix }}"
19
+ outputs :
20
+ version_matrix : ${{ steps.set-matrix.outputs.version_matrix }}
12
21
build :
22
+ needs : build-jvm-matrix
13
23
strategy :
14
24
fail-fast : false
15
25
matrix :
16
26
os : [ubuntu-latest, windows-latest]
17
- # Windows is failing with "out of memory" errors.
18
- continue-on-error : ${{ matrix.os == 'windows-latest' }}
27
+ java_version : ${{ fromJson(needs.build-jvm-matrix.outputs.version_matrix) }}
19
28
runs-on : ${{ matrix.os }}
20
29
steps :
21
30
- uses : actions/checkout@v2
22
- - name : set up JDK 1.8
31
+ - name : configure windows pagefile
32
+ if : ${{ matrix.os == 'windows-latest' }}
33
+ uses : al-cheb/configure-pagefile-action@v1.2
34
+ with :
35
+ minimum-size : 8GB
36
+ maximum-size : 8GB
37
+ disk-root : " D:"
38
+ - name : set up JDK
23
39
uses : actions/setup-java@v2
24
40
with :
25
- java-version : 8
41
+ java-version : ${{ matrix.java_version }}
26
42
distribution : ' zulu'
27
43
- name : Restore Gradle caches
28
44
uses : actions/cache@v2
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
13
13
- add ktlint version 0.48.2 to testing [ #632 ] ( https://github.com/JLLeitschuh/ktlint-gradle/pull/632 )
14
14
- update latest gradle version for testing to 7.6 [ #632 ] ( https://github.com/JLLeitschuh/ktlint-gradle/pull/632 )
15
15
- improve release process to update VERSION_LATEST_RELEASE automatically [ #631 ] ( https://github.com/JLLeitschuh/ktlint-gradle/pull/631 )
16
+ - test against all supported jvm versions [ #642 ] ( https://github.com/JLLeitschuh/ktlint-gradle/pull/642 )
16
17
17
18
## [ 11.2.0] - 2023-02-14
18
19
Original file line number Diff line number Diff line change @@ -83,7 +83,11 @@ tasks.named("test").configure {
83
83
84
84
tasks.withType<Test >().configureEach {
85
85
useJUnitPlatform()
86
- maxParallelForks = (Runtime .getRuntime().availableProcessors() / 2 ).takeIf { it > 0 } ? : 1
86
+ maxParallelForks = if (org.codehaus.plexus.util.Os .isFamily(org.codehaus.plexus.util.Os .FAMILY_WINDOWS )) {
87
+ (Runtime .getRuntime().availableProcessors() / 2 ).takeIf { it > 0 } ? : 1
88
+ } else {
89
+ (Runtime .getRuntime().availableProcessors() / 2 ).takeIf { it > 0 } ? : 1
90
+ }
87
91
doFirst {
88
92
logger.lifecycle(" maxParallelForks for '$path ' is $maxParallelForks " )
89
93
}
You can’t perform that action at this time.
0 commit comments