22
22
fail-fast : true
23
23
matrix :
24
24
os : [ ubuntu-latest, macOS-latest, macOS-12, windows-latest ]
25
+ setup : [ graalvm ]
26
+ include :
27
+ - os : ubuntu-latest
28
+ setup : java
25
29
runs-on : ${{ matrix.os }}
26
30
steps :
27
31
- name : ' Checkout GitHub repository'
@@ -35,36 +39,46 @@ jobs:
35
39
uses : ilammy/msvc-dev-cmd@v1
36
40
37
41
- name : ' Set up GraalVM'
42
+ if : ${{ matrix.setup == 'graalvm' }}
38
43
uses : graalvm/setup-graalvm@v1
39
44
with :
40
45
java-version : ${{ env.JAVA_VERSION }}
41
46
distribution : ${{ env.GRAAL_DISTRIBUTION }}
42
47
github-token : ${{ secrets.GITHUB_TOKEN }}
43
48
native-image-job-reports : ' true'
44
49
50
+ - name : ' Set up Java'
51
+ if : ${{ matrix.setup == 'java' }}
52
+ uses : actions/setup-java@v4
53
+ with :
54
+ distribution : ${{ env.JAVA_DISTRO }}
55
+ java-version : ${{ env.JAVA_VERSION }}
56
+
45
57
- name : ' Build Native Image (Linux)'
46
- if : ${{ runner.os == 'Linux' }}
58
+ if : ${{ runner.os == 'Linux' && matrix.setup == 'graalvm' }}
47
59
run : |
48
60
./mvnw -ntp -B --file pom.xml -Pnative package
49
61
50
62
- name : ' Build Native Image (macOS)'
51
- if : ${{ runner.os == 'macOS' }}
63
+ if : ${{ runner.os == 'macOS' && matrix.setup == 'graalvm' }}
52
64
run : |
53
65
./mvnw -ntp -B --file pom.xml -Pnative package "-DskipTests"
54
66
55
67
- name : ' Build Native Image (Windows)'
56
- if : ${{ runner.os == 'windows' }}
68
+ if : ${{ runner.os == 'windows' && matrix.setup == 'graalvm' }}
57
69
run : |
58
70
./mvnw -ntp -B --file pom.xml -Pnative package "-DskipTests"
59
71
72
+ - name : ' Build Debian Package (Linux)'
73
+ if : ${{ runner.os == 'Linux' && matrix.setup == 'graalvm' }}
74
+ run : |
75
+ ./mvnw -ntp -B --file pom.xml -Pdeb package -DskipTests
76
+
60
77
- name : ' Build Distribution'
78
+ if : ${{ runner.os == 'Linux' && matrix.setup == 'java' }}
61
79
run : |
62
80
./mvnw -ntp -B --file pom.xml -Pdist package -DskipTests
63
81
64
- - name : ' Build Debian Package (Linux)'
65
- if : ${{ runner.os == 'Linux' }}
66
- run : |
67
- ./mvnw -ntp -B --file pom.xml -Pdeb package -DskipTests
68
82
69
83
- name : ' Upload build artifact'
70
84
uses : actions/upload-artifact@v4
0 commit comments