-
Notifications
You must be signed in to change notification settings - Fork 1.1k
90 lines (90 loc) · 2.65 KB
/
ci.yml
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
name: CI
on:
- push
- pull_request
jobs:
Linux:
strategy:
fail-fast: false
matrix:
include:
- jdk: 8
- jdk: 11
- jdk: 17
- jdk: 21
name: JDK ${{ matrix.jdk }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'zulu'
java-version: |
${{ matrix.jdk }}
17
- name: 'Generate toolchains.xml'
env:
JDK_VERSION: ${{ matrix.jdk }}
JDK_HOME_VARIABLE_NAME: JAVA_HOME_${{ matrix.jdk }}_X64
run: |
echo "
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<id>$JDK_VERSION</id>
<version>$JDK_VERSION</version>
</provides>
<configuration>
<jdkHome>${!JDK_HOME_VARIABLE_NAME}</jdkHome>
</configuration>
</toolchain>
</toolchains>
" > toolchains.xml
- name: 'Build'
run: |
mvn -V -B -e --no-transfer-progress \
verify -Djdk.version=${{ matrix.jdk }} -Dbytecode.version=${{ matrix.jdk }} \
--toolchains=toolchains.xml
Windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'zulu'
java-version: |
6
17
- name: 'Generate toolchains.xml'
env:
JDK_VERSION: 6
JDK_HOME_VARIABLE_NAME: JAVA_HOME_6_X64
shell: bash
run: |
echo "
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<id>$JDK_VERSION</id>
<version>$JDK_VERSION</version>
</provides>
<configuration>
<jdkHome>${!JDK_HOME_VARIABLE_NAME}</jdkHome>
</configuration>
</toolchain>
</toolchains>
" > toolchains.xml
- name: 'Build'
shell: bash
run: |
mvn -V -B -e --no-transfer-progress \
verify -Djdk.version=6 -Dbytecode.version=5 \
--toolchains=toolchains.xml
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
id: artifact-upload-step
with:
name: jacoco
path: jacoco/target/*.zip
if-no-files-found: error