-
Notifications
You must be signed in to change notification settings - Fork 32
150 lines (127 loc) · 4.26 KB
/
gradle.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: CI
on:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'
# First build on Linux and Windows with JDK 11
# Then run tests with various Gradle and JDK versions (Linux only)
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Build with Gradle
id: gradle-build
uses: gradle/gradle-build-action@v2
with:
arguments: --scan build
- name: Store reports
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure')
uses: actions/upload-artifact@v3
with:
name: linux-reports
path: build/reports/
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Build with Gradle
id: gradle-build
uses: gradle/gradle-build-action@v2
with:
arguments: --scan build
- name: Store reports
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure')
uses: actions/upload-artifact@v3
with:
name: windows-reports
path: build/reports/
test-gradle:
needs: linux
runs-on: ubuntu-latest
strategy:
matrix:
gradle: [ '8.5', '8.4', '8.3', '8.2.1', '8.1.1', '8.0.2', '7.5.1', '7.4.2', '7.3.3', '7.2', '7.1.1', '7.0.2', '6.9.4', '6.8.3' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Build with Gradle
id: gradle-build
uses: gradle/gradle-build-action@v2
with:
arguments: --scan integrationTest "-Ptest.gradle-version=${{ matrix.gradle }}"
- name: Store reports
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure')
uses: actions/upload-artifact@v3
with:
name: gradle-${{ matrix.gradle }}-tests
path: build/reports/tests/integrationTest/
test-jdk:
needs: linux
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 17 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: |
${{ matrix.java }}
11
- name: Setup environment
run: |
echo "org.gradle.java.installations.auto-download=false" | tee -a gradle.properties
echo "org.gradle.java.installations.fromEnv=JAVA_HOME_${{ matrix.java }}_X64" | tee -a gradle.properties
- name: Build with Gradle
id: gradle-build
uses: gradle/gradle-build-action@v2
with:
arguments: --scan integrationTest "-Ptest.java-toolchain=${{ matrix.java }}"
- name: Store reports
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure')
uses: actions/upload-artifact@v3
with:
name: jdk-${{ matrix.java }}-tests
path: build/reports/tests/integrationTest/
test-jdk21-gradle85:
needs: linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: |
21
11
- name: Setup environment
run: |
echo "org.gradle.java.installations.auto-download=false" | tee -a gradle.properties
echo "org.gradle.java.installations.fromEnv=JAVA_HOME_21_X64" | tee -a gradle.properties
- name: Build with Gradle
id: gradle-build
uses: gradle/gradle-build-action@v2
with:
arguments: --scan integrationTest "-Ptest.java-toolchain=21" "-Ptest.gradle-version=8.5"
- name: Store reports
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure')
uses: actions/upload-artifact@v3
with:
name: jdk-21-tests
path: build/reports/tests/integrationTest/